• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
        • Memoize
        • Fast-alists
        • 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
        • Set-max-mem
        • Hons-enabled
        • Unmemoize
        • Number-subtrees
      • Events
      • Parallelism
      • History
      • Programming
      • 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.