ACL2-DEFAULTS-TABLE

a table specifying certain defaults, e.g., the default defun-mode
Major Section:  OTHER

Example Forms:
(table acl2-defaults-table :defun-mode) ; current default defun-mode
(table acl2-defaults-table :defun-mode :program)
           ; set default defun-mode to :program

See table for a discussion of tables in general. The legal keys for this table are shown below. They may be accessed and changed via the general mechanisms provided by tables. However, there are often more convenient ways to access and/or change the defaults. (See also the note below.)

:defun-mode
the default defun-mode, which must be :program or :logic. See defun-mode for a general discussion of defun-modes. The :defun-mode key may be conveniently set by keyword commands naming the new defun-mode, :program and :logic. See program and see logic.
:verify-guards-eagerness
an integer between 0 and 2 indicating how eager the system is to verify the guards of a defun event. See set-verify-guards-eagerness.
:compile-fns
When this key's value is t, functions are compiled when they are defun'd; otherwise, the value is nil. To set the flag, see set-compile-fns.
:measure-function
the default measure function used by defun when no :measure is supplied in xargs. The default measure function must be a function symbol of one argument. Let mfn be the default measure function and suppose no :measure is supplied with some recursive function definition. Then defun finds the first formal, var, that is tested along every branch and changed in each recursive call. The system then ``guesses'' that (mfn var) is the :measure for that defun.
:well-founded-relation
the default well-founded relation used by defun when no :well-founded-relation is supplied in xargs. The default well-founded relation must be a function symbol, rel, of two arguments about which a :well-founded-relation rule has been proved. See well-founded-relation.
:bogus-mutual-recursion-ok
When this key's value is t, ACL2 skips the check that every function in a mutual-recursion (or defuns) ``clique'' calls at least one other function in that ``clique.'' Otherwise, the value is the keyword nil (the default) or :warn (which makes the check but merely warns when the check fails). See set-bogus-mutual-recursion-ok.
:irrelevant-formals-ok
When this key's value is t, the check for irrelevant formals is bypassed; otherwise, the value is the keyword nil (the default) or :warn (which makes the check but merely warns when the check fails). See irrelevant-formals and see set-irrelevant-formals-ok.
:ignore-ok
When this key's value is t, the check for ignored variables is bypassed; otherwise, the value is the keyword nil (the default) or :warn (which makes the check but merely warns when the check fails. See set-ignore-ok.
:inhibit-warnings
ACL2 prints warnings that may, from time to time, seem excessive to experienced users. Each warning is ``labeled'' with a string identifying the type of warning. Consider for example
ACL2 Warning [Use] in ( THM ...):  It is unusual to :USE ....
Here, the label is "Use". The value of the key :inhibit-warnings is a list of such labels, where case is ignored. Any warning whose label is a member of this list (where again, case is ignored) is suppressed. See set-inhibit-warnings and also see set-inhibit-output-lst.
:bdd-constructors
This key's value is a list of function symbols used to define the notion of ``BDD normal form.'' See bdd-algorithm and see hints.
:state-ok
This key's value is either t or nil and indicates whether the user is aware of the syntactic restrictions on the variable symbol STATE. See set-state-ok.
:backchain-limit
This key's value is either nil or a non-negative integer. It is used to set the backchain limit upon starting rewriting. See backchain-limit.
:default-backchain-limit
This key's value is either nil or a non-negative integer. It is used to set the backchain limit of a rule if one has not been specified. See backchain-limit.
:rewrite-stack-limit
This key's value is a nonnegative integer less than (expt 2 28). It is used to limit the depth of calls of ACL2 rewriter functions. See rewrite-stack-limit.
:let*-abstractionp
This key affects how the system displays subgoals. The value is either t or nil. When t, let* expressions are introduced before printing to eliminate common subexpressions. The actual goal being worked on is unchanged.
:nu-rewriter-mode
This key's value is nil, t, or :literals. When the value is non-nil, the rewriter gives special treatment to expressions and functions defined in terms of nth and update-nth. See set-nu-rewriter-mode.
:case-split-limitations
This key's value is a list of two ``numbers.'' Either ``number'' may optionally be nil, which is treated like positive infinity. The numbers control how the system handles case splits in the simplifier. See set-case-split-limitations.
:include-book-dir-alist
This key's value is used by include-book's :DIR argument to associate a directory with a keyword. It initially associates the distributed ACL2 books/ directory with the keyword :SYSTEM See add-include-book-dir, which contains a caveat for the case that the ACL2 executable was moved after it was built.
:match-free-default
This key's value is either :all, :once, or nil. See set-match-free-default.
:match-free-override
This key's value is a list of runes. See add-match-free-override.
:match-free-override-nume
This key's value is an integer used in the implementation of add-match-free-override, so that only existing runes are affected by that event.
:non-linearp
This key's value is either t or nil and indicates whether the user wishes ACL2 to extend the linear arithmetic decision procedure to include non-linear reasoning. See non-linear-arithmetic.

Note: Unlike all other tables, acl2-defaults-table can affect the soundness of the system. The table mechanism therefore enforces on it a restriction not imposed on other tables: when table is used to update the acl2-defaults-table, the key and value must be variable-free forms. Thus, while

(table acl2-defaults-table :defun-mode :program),

(table acl2-defaults-table :defun-mode ':program), and

(table acl2-defaults-table :defun-mode (compute-mode *my-data*))

are all examples of legal events (assuming compute-mode is a function of one non-state argument that produces a defun-mode as its single value),
(table acl2-defaults-table :defun-mode (compute-mode (w state)))
is not legal because the value form is state-sensitive.

Consider for example the following three events which one might make into the text of a book.

(in-package "ACL2")

(table acl2-defaults-table :defun-mode (if (ld-skip-proofsp state) :logic :program))

(defun crash-and-burn (x) (car x))

The second event is illegal because its value form is state-sensitive. If it were not illegal, then it would set the :defun-mode to :program when the book was being certified but would set the defun-mode to :logic when the book was being loaded by include-book. That is because during certification, ld-skip-proofsp is nil (proof obligations are generated and proved), but during book inclusion ld-skip-proofsp is non-nil (those obligations are assumed to have been satisfied.) Thus, the above book, when loaded, would create a function in :logic mode that does not actually meet the conditions for such status.

For similar reasons, table events affecting acl2-defaults-table are illegal within the scope of local forms. That is, the text

(in-package "ACL2")

(local (table acl2-defaults-table :defun-mode :program))

(defun crash-and-burn (x) (car x))

is illegal because acl2-defaults-table is changed locally. If this text were acceptable as a book, then when the book was certified, crash-and-burn would be processed in :program mode, but when the certified book was included later, crash-and-burn would have :logic mode because the local event would be skipped.

The text

(in-package "ACL2")

(program) ;which is (table acl2-defaults-table :defun-mode :program)

(defun crash-and-burn (x) (car x))

is acceptable and defines crash-and-burn in :program mode, both during certification and subsequent inclusion.

We conclude with an important observation about the relation between acl2-defaults-table and include-book, certify-book, and encapsulate. Including or certifying a book never has an effect on the acl2-defaults-table, nor does executing an encapsulate event; we always restore the value of this table as a final act. (Also see include-book, see encapsulate, and see certify-book.) That is, no matter how a book fiddles with the acl2-defaults-table, its value immediately after including that book is the same as immediately before including that book. If you want to set the acl2-defaults-table in a way that persists, you need to do so using commands that are not inside books. It may be useful to set your favorite defaults in your acl2-customization file; see acl2-customization.