1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
<html>
<head><title>CURRENT-THEORY.html -- ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>CURRENT-THEORY</h2>currently <a href="ENABLE.html">enable</a>d rules as of logical name
<pre>Major Section: <a href="THEORIES.html">THEORIES</a>
</pre><p>
<pre>
Examples:
(current-theory :here)
(current-theory 'lemma3)
</pre>
See <a href="LOGICAL-NAME.html">logical-name</a>.
<p>
<pre>
General Form:
(current-theory logical-name)
</pre>
Returns the current theory as it existed immediately after the
introduction of <code><a href="LOGICAL-NAME.html">logical-name</a></code> provided it is evaluated in
an environment in which the variable symbol WORLD is bound to the
current ACL2 logical world, <code>(w state)</code>. Thus,
<pre>
ACL2 !>(current-theory :here)
</pre>
will cause an (unbound variable) error while
<pre>
ACL2 !>(let ((world (w state))) (current-theory :here))
</pre>
will return the current theory in world.<p>
See <a href="THEORIES.html">theories</a> and see <a href="LOGICAL-NAME.html">logical-name</a> for a discussion of
theories in general and why the commonly used ``theory functions''
such as <code>current-theory</code> are really macros that expand into terms
involving the variable <code>world</code>. <p>
The theory returned by <code>current-theory</code> is in fact the theory selected by
the <code><a href="IN-THEORY.html">in-theory</a></code> event most recently preceding logical name, extended by
the rules introduced up through <code><a href="LOGICAL-NAME.html">logical-name</a></code>.<p>
You may experience a fencepost problem in deciding which logical
name to use. <code><a href="DEFLABEL.html">Deflabel</a></code> can always be used to mark unambiguously for
future reference a particular point in the development of your
theory. The order of <a href="EVENTS.html">events</a> in the vicinity of an <code><a href="ENCAPSULATE.html">encapsulate</a></code> is
confusing. See <a href="ENCAPSULATE.html">encapsulate</a>.<p>
This ``function'' is actually a macro that expands to a term
mentioning the single free variable <code><a href="WORLD.html">world</a></code>. When theory expressions
are evaluated by <code><a href="IN-THEORY.html">in-theory</a></code> or the <code>:</code><code><a href="IN-THEORY.html">in-theory</a></code> hint, <code><a href="WORLD.html">world</a></code> is bound to
the current ACL2 <a href="WORLD.html">world</a>.
<br><br><br><a href="acl2-doc.html"><img src="llogo.gif"></a> <a href="acl2-doc-index.html"><img src="index.gif"></a>
</body>
</html>
|