• 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
          • World
          • Io
          • Wormhole
            • Wormhole-eval
            • Wormhole-status
            • Wormhole-programming-tips
            • Wormhole-implementation
            • Sync-ephemeral-whs-with-persistent-whs
            • Get-persistent-whs
              • Set-persistent-whs-and-ephemeral-whs
              • Make-wormhole-status
              • Set-wormhole-entry-code
              • Set-wormhole-data
              • Wormhole-data
              • Wormhole-entry-code
              • Wormhole-statusp
              • Wormhole-p
            • Programming-with-state
            • W
            • Set-state-ok
            • Random$
          • 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
          • 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
    • Wormhole

    Get-persistent-whs

    Make a wormhole's status visible outside the wormhole

    General Form:
    (get-persistent-whs name state)

    Name should be the name of a wormhole (see wormhole). This function returns an error-triple of the form (mv nil s state), where s is the persistent-whs of the named wormhole (i.e., the status of of wormhole stored outside of the ACL2 state). The status is obtained by reading the oracle in the ACL2 state with read-ACL2-oracle.

    Recall that the status of a wormhole is some ACL2 object largely determined by the author of the wormhole. It is always treated as a pair whose car is the “entry code” (:enter or :skip) or, more precisely, is either :skip or not :skip, the latter case being treated like :enter. But the cdr of the status can be whatever the author of the wormhole chooses to hold the data of the wormhole. When a wormhole is entered its persistent status, aka its persistent-whs, is used to configure the state of the read-eval-print loop the user sees inside the wormhole. In particular, upon entry the persistent-whs is moved to the value of the state global variable 'wormhole-status and is thus accessible via (f-get-global 'wormhole-status state). We call this copy of the status the ephemeral-whs because when the wormhole is exited the ephemeral-whs is moved to the persistent-whs and the state global 'wormhole-status is restored to whatever value it had when the wormhole was entered.

    See wormhole-status for a discussion of these two senses of the status of a wormhole. See also wormhole-programming-tips.