• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
        • Gentle-introduction-to-ACL2-programming
        • ACL2-tutorial
        • About-ACL2
          • Recursion-and-induction
          • Operational-semantics
          • Soundness
          • Release-notes
            • Note-2-8
            • Note-2-7
            • Note-8-6
            • Note-8-7
            • Note-8-2
            • Note-7-0
            • Note-8-5
            • Note-8-3
            • Note-8-1
            • Note-8-0
            • Note-7-1
            • Note-6-4
            • Note-2-9-3
            • Note-2-9-1
            • Note-8-4
            • Note-7-2
            • Note-6-5
            • Note-4-0
              • Note-4-0-wormhole-changes
              • Note-2-9-2
              • Note-3-6
              • Note-3-3
              • Note-3-2-1
              • Note-3-0-1
              • Note-2-9-5
              • Note-2-5
              • Note-1-5
              • Note-6-1
              • Note-4-3
              • Note-4-2
              • Note-4-1
              • Note-3-5
              • Note-3-4
              • Note-3-2
              • Note-3-0-2
              • Note-2-9-4
              • Note-2-9
              • Note-1-8
              • Note-1-7
              • Note-1-6
              • Note-1-4
              • Note-1-3
              • Note-7-4
              • Note-7-3
              • Note-6-3
              • Note-6-2
              • Note-6-0
              • Note-5-0
              • Note-1-9
              • Note-2-2
              • Note-1-8-update
              • Note-3-5(r)
              • Note-2-3
              • Release-notes-books
              • Note-3-6-1
              • Note-1-2
              • Note-2-4
              • Note-2-6
              • Note-2-0
              • Note-3-0
              • Note-3-2(r)
              • Note-2-7(r)
              • Note-1-1
              • Note-3-4(r)
              • Note-3-1
              • Note-2-8(r)
              • Note-2-1
              • Note-2-9(r)
              • Note-2-6(r)
              • Note-3-1(r)
              • Note-3-0(r)
              • Note-3-0-1(r)
              • Note-2-5(r)
              • Note-4-3(r)
              • Note-4-2(r)
              • Note-4-1(r)
              • Note-4-0(r)
              • Note-3-6(r)
              • Note-3-3(r)
              • Note-3-2-1(r)
            • Version
            • Acknowledgments
            • Pre-built-binary-distributions
            • Common-lisp
            • Git-quick-start
            • Copyright
            • Building-ACL2
            • ACL2-help
            • Bibliography
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Note-4-0

    Note-4-0-wormhole-changes

    How to convert calls of wormhole for Version 4.0

    Here we describe how to convert an ``old-style'' call of wormhole — that is, a call suitable for ACL2 versions preceding 4.0 — in which the pseudo-flag was t. In order to convert such a call

    (wormhole t 'name input form ...)

    to a new-style call, the following steps must be carried out. Note that the wormhole name must always be quoted now.

    First, eliminate the first argument, t, and add a new second argument that is the quoted lambda expression

    '(lambda (whs) (set-wormhole-entry-code whs :ENTER))

    Setting the entry code to :ENTER is not necessary if you maintain the invariant (after initialization) that it is always :ENTER. In that case, the simpler quoted lambda will suffice:

    '(lambda (whs) whs)

    Second, change the form argument so that instead of talking about the state global variable wormhole-output it talks about the state global variable wormhole-status. Look for (@ wormhole-output), (assign wormhole-output ...), (f-get-global 'wormhole-output ...) and (f-put-global 'wormhole-output ...) in form and replace them with expressions involving wormhole-status.

    However, remember that the old data stored in wormhole-output is now in the wormhole-data component of the wormhole-status. Thus, for example, an old use of (@ wormhole-output) will typically be replaced by (wormhole-data (@ wormhole-status)) and an old use of (assign wormhole-output ...) will typically be replaced by

    (assign wormhole-status (set-wormhole-data (@ wormhole-status) ...))

    In summary, an old-style call like

    (wormhole t 'name
              input
              '(...1 (@ wormhole-output) ...2
                ...3 (assign wormhole-output ...4) ...5)
              ...6)

    can become

    (wormhole 'name
              '(lambda (whs) (set-wormhole-entry-code whs :ENTER))
              input
              '(...1 (wormhole-data (@ wormhole-status)) ...2
                ...3 (assign wormhole-status
                            (set-wormhole-data (@ wormhole-status)
                                               ...4) ...5)
              ...6)

    In any case, and especially if your wormhole call had a pseudo-flag other than t, we recommend that you see wormhole.