Major Section: TRACE
Example: (trace$ foo bar)where theGeneral Form: (trace$ fn1 fn2 ... fnk)
fni
are defined or even constrained functions.
see untrace$ for how to undo the effect of trace$
.
Basically, trace$
calls on the underlying Lisp to trace the specified
functions as well as their executable-counterpart
s. However, for GCL
and Allegro CL the underlying Lisp trace routines are modified before an
image is saved in order to hide the ACL2 world and other large data
structures and provide slightly prettier output.
Recursive calls of functions whose guards have not been verified will
not generally be traced. If you want to see traces for corresponding
evaluations in raw Lisp, which will generally show recursive calls (except,
in some Lisp implementations, for compiled tail recursive functions), then
you can quit into raw Lisp (:q
) and execute your form there.
Alternatively, you can avoid executable-counterpart functions by using
:
set-raw-mode
to enter a raw Lisp version of the ACL2 loop,
provided you do not intend to run certify-book
later in that session;
see set-raw-mode.
Output from trace$
normally goes to the screen, i.e.,
standard-co
. But it can be redirected to a file;
see open-trace-file.
Also see wet (``with-error-trace
'') for a different way that ACL2
takes advantage of the underlying Lisp, namely to provide a backtrace when
there is an error.
Note that from a logical perspective all trace printing is a fiction. For a
related fiction, see cw. Trace$
returns nil