Abbreviation of some keyword commands
Examples: (set-ld-keyword-aliases '((:q 0 q-fn) (:e 0 exit-acl2-macro)) state) (ld-keyword-aliases state) ; current value of the ld-keyword-aliases table
ACL2 provides functions to modify the
(Set-ld-keyword-aliases val state) : sets the table toval , which must be a legal alist as described above. This is an event that may go into a book (see events), but its effect will be local to that book.
Set-ld-keyword-aliases! is the same asset-ld-keyword-aliases , except that its effect is not local. Indeed, the form(set-ld-keyword-aliases val state) is equivalent to the form(local (set-ld-keyword-aliases! val state) .
(Add-ld-keyword-alias key val state) : modifies the table by binding the keywordkey toval , which must be a legal value as described above. This is an event that may go into a book (see events), but its effect will be local to that book.
Add-ld-keyword-alias! is the same asadd-ld-keyword-alias , except that its effect is not local. Indeed, the form(add-ld-keyword-alias key val state) is equivalent to the form(local (add-ld-keyword-alias! key val state) .
Consider the first example above:
(set-ld-keyword-aliases '((:q 0 q-fn) (:e 0 exit-acl2-macro)) state)
With this event,
(defmacro q-fn () '(er soft 'q "You un-bound :q and now we have a soft error."))
then
(defmacro exit-acl2-macro () '(exit-ld state))
then
The general-purpose ACL2 read-eval-print loop, ld, reads forms from standard-oi, evaluates them and prints the result to standard-co. Note that the ACL2 top-level loop (see lp) results from an invocation of ld.
However, there are various flags that control ld's behavior and