• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Hons-and-memoization
      • Events
      • History
      • Parallelism
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Mutual-recursion
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Loop$-primer
        • Fast-alists
          • Slow-alist-warning
          • Hons-acons
          • Fast-alist-fork
          • Hons-acons!
          • With-fast-alist
          • Fast-alist-clean
          • Fast-alist-pop
          • Fast-alist-free
            • Flush-hons-get-hash-table-link
          • Fast-alist-pop*
          • Hons-get
          • Hons-assoc-equal
          • Make-fast-alist
          • Make-fal
          • Fast-alist-free-on-exit
          • With-stolen-alist
          • Fast-alist-fork!
          • Fast-alist-summary
          • Fast-alist-clean!
          • Fast-alist-len
          • With-stolen-alists
          • Fast-alists-free-on-exit
          • Cons-subtrees
          • With-fast-alists
          • Hons-dups-p1
          • Ansfl
          • Hons-revappend
          • Hons-member-equal
          • Hons-make-list
          • Hons-reverse
          • Hons-list*
          • Hons-list
          • Hons-append
        • Defmacro
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
        • Irrelevant-formals
        • Efficiency
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • Invariant-risk
        • Errors
        • Defabbrev
        • Conses
        • Alists
          • Std/alists
          • Omaps
          • Fast-alists
            • Slow-alist-warning
            • Hons-acons
            • Fast-alist-fork
            • Hons-acons!
            • With-fast-alist
            • Fast-alist-clean
            • Fast-alist-pop
            • Fast-alist-free
              • Flush-hons-get-hash-table-link
            • Fast-alist-pop*
            • Hons-get
            • Hons-assoc-equal
            • Make-fast-alist
            • Make-fal
            • Fast-alist-free-on-exit
            • With-stolen-alist
            • Fast-alist-fork!
            • Fast-alist-summary
            • Fast-alist-clean!
            • Fast-alist-len
            • With-stolen-alists
            • Fast-alists-free-on-exit
            • Cons-subtrees
            • With-fast-alists
            • Hons-dups-p1
            • Ansfl
            • Hons-revappend
            • Hons-member-equal
            • Hons-make-list
            • Hons-reverse
            • Hons-list*
            • Hons-list
            • Hons-append
          • Alistp
          • Misc/records
          • Remove-assocs
          • Assoc
          • Symbol-alistp
          • Rassoc
          • Remove-assoc
          • Remove1-assoc
          • Alist-map-vals
          • Depgraph
          • Alist-map-keys
          • Put-assoc
          • Strip-cars
          • Pairlis$
          • Strip-cdrs
          • Sublis
          • Acons
          • Eqlable-alistp
          • Assoc-string-equal
          • Standard-string-alistp
          • Alist-to-doublets
          • Character-alistp
          • Alist-keys-subsetp
          • R-symbol-alistp
          • R-eqlable-alistp
          • Pairlis
          • Pairlis-x2
          • Pairlis-x1
          • Delete-assoc
        • Set-register-invariant-risk
        • Strings
        • Program-wrapper
        • Get-internal-time
        • Basics
        • Packages
        • Defmacro-untouchable
        • Primitive
        • <<
        • Revert-world
        • Set-duplicate-keys-action
        • Unmemoize
        • Symbols
        • Def-list-constructor
        • Easy-simplify-term
        • Defiteration
        • Defopen
        • Sleep
      • Start-here
      • Real
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Fast-alists
  • ACL2-built-ins

Fast-alist-free

(fast-alist-free alist) throws away the hash table associated with a fast alist.

Logically, this function is the identity; we leave it enabled and would think it odd to ever prove a theorem about it.

Under the hood, fast-alist-free removes the hash table associated with this alist, if one exists. This effectively converts the alist into an ordinary alist.

Also see fast-alist-free-on-exit.

When the host Lisp is CCL or SBCL, the associated hash table may be freed up automatically by the garbage collector when the corresponding alist is no longer referenced. (To trigger garbage collection manually, see gc$.) But for Lisp implementations other than CCL and SBCL this is not the case so, to avoid memory leaks, you should use fast-alist-free to free up associated hash tables that will no longer be used. You may find fast-alist-summary useful in tracking down alists that were not properly freed.

It is safe to call fast-alist-free on any argument, including fast alists that have already been freed and objects which are not alists at all.

Function: fast-alist-free

(defun fast-alist-free (alist)
       (declare (xargs :guard t))
       alist)

Subtopics

Flush-hons-get-hash-table-link
Deprecated feature