• 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
    • Rulesets

    Expand-ruleset

    Expand rulesets to theories.

    A ruleset is a list of so-called ruleset designators. The ruleset operators, such as e/d* and def-ruleset, expect arguments that are (or evaluate to) rulesets. Every ruleset represents an ACL2 theory, called its ``expansion''. Consider for example these ruleset definitions.

    (def-ruleset my-rules
      '(append reverse))
    
    (def-ruleset other-rules
      '(member-equal my-rules revappend))

    Then the symbol my-rules is a ruleset designator, which represents the theory containing append and reverse. The symbol other-rules is a ruleset designator, which represents the theory containing member-equal, append, reverse, and revappend. The function expand-ruleset returns the theory obtained by expanding every ruleset designator in a given ruleset, for example:

    ACL2 !>(expand-ruleset '(car-cons (:d nth) other-rules) (w state))
    (CAR-CONS (:D NTH)
              MEMBER-EQUAL APPEND REVERSE REVAPPEND)
    ACL2 !>

    We now list the valid ruleset designators and indicate the corresponding expansion, a theory, for each.

    • A symbol that names a rule (e.g., from a definition or a theorem) or names a theory is a ruleset designator. More generally, every runic designator x is also a ruleset designator, which expands to the theory containing exactly x. See theories for a discussion of runic designators.
    • If N is a symbol that is the name of a ruleset S, then N and (:ruleset N) are ruleset designators. They expand to the union of the expansions of the ruleset designators in S.
    • The ruleset designators (:executable-counterpart-theory name), (:current-theory name), and (:theory name) expand to the values in the current ACL2 world of the forms (executable-counterpart-theory name), (current-theory name), and (theory name), respectively.
    • The ruleset designator (:rules-of-class class name) represent the runes of the indicated class (see rule-classes) in the value of (universal-theory name).

    Definitions and Theorems

    Function: expand-ruleset

    (defun expand-ruleset (x world)
      (if (ruleset-designator-listp x world)
          (expand-ruleset1 x world)
        (er hard 'expand-ruleset
            "~x0 is not a valid ruleset.~%" x)))