• 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
          • Memoize-partial
          • Protect-memoize-statistics
          • Profile-all
          • Profile-ACL2
          • Memoized-prover-fns
            • Unmemoize
            • Verify-guard-implication
            • Memsum
            • Set-bad-lisp-consp-memoize
            • Memoize-summary
            • Save-and-clear-memoization-settings
            • Never-memoize
            • Clear-memoize-tables
            • Clear-memoize-statistics
            • Clear-memoize-table
            • Restore-memoization-settings
          • 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
          • 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
    • Memoize

    Memoized-prover-fns

    Memoize some theorem prover functions

    In the community-books, the book tools/memoize-prover-fns.lisp arranges to memoize some functions in the theorem prover. Including this book MAY, in some cases, improve performance; perhaps more likely, including this book may degrade performance! So if you decide to include this book, it would serve you well to experiment by changing the list of prover functions to memoize. To do this you can proceed as follows.

    (progn
      (unmemoize-lst (f-get-global 'memoized-prover-fns state))
      (make-event
       (pprogn (f-put-global 'memoized-prover-fns '(... <your_list> ...) state)
               (value '(value-triple nil))))
      (memoize-lst (f-get-global 'memoized-prover-fns state)))

    Of course, you can run experiments that compare times for your proofs with different prover functions memoized (or, no prover functions memoized). In addition, as usual with memoization, you can evaluate (memsum) after trying some proofs to see if the functions you have memoized result in good ratios of hits to calls.

    Note that this book automatically provides an attachment to finalize-event-user. So it might not work well with other books that provide such an attachment. For this book, the attachment clears the memoization tables after each book not under include-book. (That restriction could easily be lifted, but perhaps it's useful for performance. And perhaps not — feel free to experiment!)

    If you find a good set of prover functions to memoize, please consider modifying the f-put-global call in the aforementioned book, tools/memoize-prover-fns.lisp, for your own set of prover functions.