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
|
<html>
<head><title>SET-NU-REWRITER-MODE.html -- ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>SET-NU-REWRITER-MODE</h2>to turn on and off the nu-rewriter
<pre>Major Section: <a href="EVENTS.html">EVENTS</a>
</pre><p>
Note: This is an event! It does not print the usual event summary
but nevertheless changes the ACL2 logical <a href="WORLD.html">world</a> and is so
recorded.<p>
This event sets a flag that controls whether the ACL2 rewriter uses
the special-purpose <code>nth</code>/<code>update-nth</code> rewriter (nu-rewriter).
The flag may have one of three values: <code>nil</code>, <code>t</code>, or <code>:literals</code>.
<p>
<pre>
:set-nu-rewriter-mode nil ; do not use nu-rewriter
:set-nu-rewriter-mode t ; use nu-rewriter in rewriting
:set-nu-rewriter-mode :literals ; use nu-rewriter in rewriting after
; a pre-pass through every literal
(set-nu-rewriter-mode :literals) ; same as above
</pre>
<p>
The value <code>nil</code> prevents the use of the nu-rewriter. The other two
values allow the use of the nu-rewriter.<p>
When the flag is non-<code>nil</code> and the rewriter encounters a term that
``begins with an <code>nth</code>'', the nu-rewriter is applied. By ``begins
with an <code>nth</code>'' here we mean either the term is an application of
<code>nth</code> or is an application of some nonrecursive function or
<code>lambda</code> expression whose body contains an expression that begins
with an <code>nth</code>.<p>
Note that the use of the nu-rewriter here described above is driven
by the rewriter, i.e., the nu-rewriter is applied only to terms
visited by the rewriter in its inside-out sweep. When the flag is
set to <code>:literals</code> the system makes a pre-pass through every goal
clause and applies the nu-rewriter to every subterm. The rewriter
is then used on the output of that pre-pass.<p>
Note: This is an event! It does not print the usual event summary
but nevertheless changes the ACL2 logical <a href="WORLD.html">world</a> and is so
recorded. Moreover, its effect is to set the <code><a href="ACL2-DEFAULTS-TABLE.html">acl2-defaults-table</a></code>, and
hence its effect is <code><a href="LOCAL.html">local</a></code> to the book or <code><a href="ENCAPSULATE.html">encapsulate</a></code> form
containing it; see <a href="ACL2-DEFAULTS-TABLE.html">acl2-defaults-table</a>.<p>
We expect to write more documentation as we gain experience with the
nu-rewriter.
<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>
|