• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Defmacro
        • 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-wash!
            • Hons-clear!
            • Hons-copy-persistent
          • 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
          • 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
    • Hons
    • ACL2-built-ins

    Hons-wash

    (hons-wash) is like gc$ but can also garbage collect normed objects (CCL and GCL Only).

    Logically, hons-wash just returns nil; we leave it enabled and would think it odd to ever prove a theorem about it.

    Under the hood, in CCL and GCL, hons-wash runs a garbage collection after taking special measures to allow normed conses to be collected. In Lisps other than CCL, hons-wash does nothing. This is because the efficient implementation of hons-wash is specific to the "static honsing" scheme which requires CCL-specific features.

    Why is this function needed? Ordinarily, it is not possible to garbage collect any normed conses. This is because the Hons Space includes pointers to any normed conses, and hence Lisp's garbage collector thinks these objects are live. To correct for this, hons-wash (1) clears out these pointers, (2) runs a garbage collection, then (3) re-norms any previously-normed conses which have survived the garbage collection.

    Notes.

    • It is not recommended to interrupt this function. Doing so may cause persistently normed conses and fast alist keys to become un-normed, which might lead to less efficient re-norming and/or violations of the fast-alist discipline.
    • (For ACL2(p) users only; see parallelism) If parallel execution is enabled (see set-parallel-execution), as it is by default in ACL2(p), then hons-wash may be a no-op (other than to print a warning), in order to avoid thread-unsafe behavior. (However, In CCL you are unlikely to see this restriction unless you are running more than one thread.) To get around this restriction, you can instead use hons-wash!, which however requires a trust-tag.

    Function: hons-wash

    (defun hons-wash nil (declare (xargs :guard t))
           nil)