• 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
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Mutual-recursion
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Defmacro
        • Loop$-primer
        • Fast-alists
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
          • Normed
          • Hons-note
          • Hons-resize
          • Hons-wash
          • Hons-clear
          • Hons-copy
          • Maybe-wash-memory
          • Hons-equal
          • Hons-summary
          • Hons-equal-lite
          • Hons-sublis
            • Hons-sublis-aux
          • Hons-wash!
          • Hons-clear!
          • Hons-copy-persistent
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
        • Efficiency
        • Irrelevant-formals
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • Invariant-risk
        • Errors
        • Defabbrev
        • Conses
        • Alists
        • Set-register-invariant-risk
        • Strings
        • Program-wrapper
        • Get-internal-time
        • Basics
        • Packages
        • Oracle-eval
        • Defmacro-untouchable
        • <<
        • Primitive
        • Revert-world
        • Unmemoize
        • Set-duplicate-keys-action
        • Symbols
        • Def-list-constructor
        • Easy-simplify-term
        • Defiteration
        • Fake-oracle-eval
        • Defopen
        • Sleep
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Hons
  • Sublis

Hons-sublis

memoized version of SUBLIS which uses fast-alists.

(hons-sublis fal x) is like sublis, but may be faster in two ways.

  1. It uses hons-get instead of assoc, which may provide a speedup when the alist in question is very long. Note that for good performance, the fast-alist argument, fal, must be a valid fast-alist.
  2. It uses a memoized auxiliary function, which may provide a speedup when the tree argument, x, contains large, shared structures.

Definitions and Theorems

Function: hons-sublis

(defun hons-sublis (fal x)
  (declare (xargs :guard t))
  (let ((ret (hons-sublis-aux fal x)))
    (prog2$ (clear-memoize-table 'hons-sublis-aux)
            ret)))

Theorem: hons-sublis-removal

(defthm hons-sublis-removal
  (implies (alistp fal)
           (equal (hons-sublis fal x)
                  (sublis fal x))))

Subtopics

Hons-sublis-aux
Memoized core of hons-sublis.