ACL2 events are special terms which define new functions or logical rules. Defined names are in scope within their own definition and below; forward references are not allowed. Use the event for mutually recursive functions.
|( test form)|
Raises an error if the given test fails.
|> ( ( 0 1) )|
|> ( ( 1 0) )|
assert$: Assertion failed! (< 1 0)
|( name term :rule-classes rule-classes :doc doc-string)|
Defines an axiom. Using is not recommended.
|(deflabel name :doc doc-string)|
Defines a label, for adding a landmark and/or adding a documentation topic.
eval:588:0: deflabel: undefined in: deflabel
|( name args-sig => output-sig :doc doc-string)|
|( name term :doc doc-string)|
Defines a theory (to enable or disable a set of rules)
Defines a theorem to be proved and named.
|> ( x+x=2x ( ( x x) ( 2 x)))|
|( term :doc doc-string)|
|( "<basename>" :dir :system)|
|( "<basename>" :dir :teachpacks)|
Without a :dir option, Dracula adds a ".lisp" extension to the base name and attempts to load a file relative to the current directory. In the case above, the program must reside in a directory with a "my-path" subdirectory containing a book named "my-book.lisp".
Books must be valid Dracula programs; they must start with ( "ACL2"); and they must contain only events, no top-level expressions.
( "my-path/my-book" :dir :system)
This variant loads a book from the system directory included with an ACL2 installation. Dracula simulates only a couple of the definitions from these books, but allows other books to be included for theorem proving purposes. See ACL2 Books for the list of books supported by Dracula.
( "my-path/my-book" :dir :teachpack)
The third variant loads one of the books provided with Dracula, called teachpacks. These books make use of DrScheme features such as interactive animations and other i/o, and are also reflected in the ACL2 logic. See Teachpacks for the list of provided teachpacks.
|( def1 defn)|
For defining mutually-recursive functions.
|( term :key key :error t/nil)|
|( name val)|
Defines a constant value. The name must begin and end with asterisks.
|> ( *PI* 22/7)|
|> ( 2 *PI*)|
|( name (args) (declare decl ) body)|
Defines a function.
|> (absolute-value 5)|
|> (absolute-value -5)|
|( d )|
Used in to give ACL2 extra information about a function.
Declares pred to be an equivalence predicate. It is equivalent to the following, with the supplied name substituted for pred in all identifiers:
|( ( (pred x y))|
|(pred x x)|
|( (pred x y) (pred y x))|
|( ( (pred x y)|
|(pred y z))|
|(pred x z)))|