Evaluate a top-level form as a function body
Some forms, such as calls of with-local-stobj, are illegal
when supplied directly to the ACL2 top-level loop. The macro
ACL2 !>:pbt 0
0 (EXIT-BOOT-STRAP-MODE)
ACL2 !>(defstobj st fld)
Summary
Form: ( DEFSTOBJ ST ...)
Rules: NIL
Time: 0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
ST
ACL2 !>(top-level
(with-local-stobj
st
(mv-let (result st)
(let ((st (update-fld 17 st)))
(mv (fld st) st))
result)))
17
ACL2 !>(top-level
(with-local-stobj
st
(mv-let (result st)
(let ((st (update-fld 17 st)))
(mv (fld st) st))
(mv nil result state))))
17
ACL2 !>(top-level
(with-local-stobj
st
(mv-let (result st)
(let ((st (update-fld 17 st)))
(mv (fld st) st))
(mv result state))))
(17 <state>)
ACL2 !>:pbt 0
0 (EXIT-BOOT-STRAP-MODE)
d 1:x(DEFSTOBJ ST FLD)
ACL2 !>
Each argument of
Top-level generates a call of ld, so that the value
returned is printed in the normal way. The call of top-level itself
actually evaluates to
Since the defined function
Finally, note that since
ACL2 !>(top-level (car 3)) *********************************************** ************ ABORTING from raw Lisp *********** ********** (see :DOC raw-lisp-error) ********** Error: The value 3 is not of the expected type LIST. While executing: CAR ***********************************************