• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
        • Defun
        • Verify-guards
        • Table
        • Mutual-recursion
        • Memoize
        • Make-event
        • Include-book
        • Encapsulate
        • Defun-sk
        • Defttag
        • Defstobj
        • Defpkg
        • Defattach
        • Defabsstobj
        • Defchoose
        • Progn
        • Verify-termination
        • Redundant-events
        • Defmacro
        • Defconst
        • Skip-proofs
        • In-theory
        • Embedded-event-form
        • Value-triple
        • Comp
        • Local
        • Defthm
        • Progn!
        • Defevaluator
        • Theory-invariant
        • Assert-event
        • Defun-inline
        • Project-dir-alist
        • Partial-encapsulate
        • Define-trusted-clause-processor
        • Defproxy
        • Defexec
        • Defun-nx
        • Defthmg
        • Defpun
        • Defabbrev
        • Set-table-guard
        • Name
        • Defrec
        • Add-custom-keyword-hint
        • Regenerate-tau-database
        • Defcong
        • Deftheory
          • Rulesets
            • Expand-ruleset
            • E/d*
            • Ruleset
            • Def-ruleset
            • Get-ruleset
            • Disable*
            • Def-ruleset!
            • Enable*
            • Add-to-ruleset
          • Defthy
        • Defaxiom
        • Deftheory-static
        • Defund
        • Evisc-table
        • Verify-guards+
        • Logical-name
        • Profile
        • Defequiv
        • Defmacro-untouchable
        • Add-global-stobj
        • Defthmr
        • Defstub
        • Defrefinement
        • Deflabel
        • In-arithmetic-theory
        • Unmemoize
        • Defabsstobj-missing-events
        • Defthmd
        • Fake-event
        • Set-body
        • Defun-notinline
        • Functions-after
        • Macros-after
        • Dump-events
        • Defund-nx
        • Defun$
        • Remove-global-stobj
        • Remove-custom-keyword-hint
        • Dft
        • Defthy
        • Defund-notinline
        • Defnd
        • Defn
        • Defund-inline
        • Defmacro-last
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Theories
  • Deftheory

Rulesets

Table-based alternative to ACL2's named theories.

Rulesets are like theories, but can be extended with additional rules after first being defined. That is, you can build up a ruleset incrementally, across many books, instead of having to define it all at once and having it be forever fixed.

Basic usage of rulesets is just like theories. You can:

  • Introduce rulesets with def-ruleset
  • Extend existing rulesets with add-to-ruleset.
  • Enable/disable rulesets with enable*, disable*, and e/d*

When we define a new package FOO, we often set up FOO::enable as an alias for enable*, to make using rulesets more convenient.

Advanced users can do some nifty things with rulesets, e.g., you can have a superior ruleset that contains other rulesets, and it will grow as you add rules to the contained rulesets.

A ruleset is actually a list of so-called ruleset designators. All ruleset operators, such as e/d* and def-ruleset, take arguments that are rulesets. See expand-ruleset for a discussion of ruleset designators and the corresponding theories that they represent.

Subtopics

Expand-ruleset
Expand rulesets to theories.
E/d*
Ruleset-aware version of e/d.
Ruleset
The ruleset associated with a given name
Def-ruleset
(def-ruleset name form) creates a new ruleset.
Get-ruleset
The ruleset associated with a given name
Disable*
Ruleset-aware version of disable.
Def-ruleset!
Same as def-ruleset except that it does not complain if the ruleset already exists, instead acting like add-to-ruleset in that case.
Enable*
Ruleset-aware version of enable.
Add-to-ruleset
(add-to-ruleset name form) adds additional rules to an existing ruleset.