• 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
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
        • Term
        • Ld
          • Wormhole
          • Ld-skip-proofsp
          • Ld-redefinition-action
          • Lp
          • Ld-error-action
          • Ld-history
          • Guarantees-of-the-top-level-loop
          • Ld-post-eval-print
          • Ld-keyword-aliases
          • Current-package
          • Ld-query-control-alist
          • Ld-prompt
          • Keyword-commands
          • Redef+
          • Rebuild
          • Prompt
          • Ld-pre-eval-print
          • Calling-ld-in-bad-contexts
          • P!
            • Ld-pre-eval-filter
            • Ld-error-triples
            • Ld-evisc-tuple
            • Ld-verbose
            • A!
            • Default-print-prompt
            • Reset-ld-specials
            • Ld-always-skip-top-level-locals
            • Ld-missing-input-ok
            • Redef
            • Redef!
            • Redef-
            • I-am-here
            • Abort!
          • Hints
          • Type-set
          • Ordinals
          • Clause
          • ACL2-customization
          • With-prover-step-limit
          • Set-prover-step-limit
          • With-prover-time-limit
          • Local-incompatibility
          • Set-case-split-limitations
          • Subversive-recursions
          • Specious-simplification
          • Defsum
          • Gcl
          • Oracle-timelimit
          • Thm
          • Defopener
          • Case-split-limitations
          • Set-gc-strategy
          • Default-defun-mode
          • Top-level
          • Reader
          • Ttags-seen
          • Adviser
          • Ttree
          • Abort-soft
          • Defsums
          • Gc$
          • With-timeout
          • Coi-debug::fail
          • Expander
          • Gc-strategy
          • Coi-debug::assert
          • Sin-cos
          • Def::doc
          • Syntax
          • Subversive-inductions
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Ld

    P!

    To pop up (at least) one level of ACL2's command loop

    Logically speaking, (p!) = nil. If you are already at the top level of the ACL2 command loop, rather than being in a subsidiary call of ld, then the keyword then a call of (p!) returns nil and has no other effect.

    Otherwise, (p!) is evaluated inside a call of ld that was made inside ACL2's command loop. In that case, the current computation is aborted and treating as causing an error, and control returns to the superior call of ld.

    Here is a more detailed description of the effect of (p!) when not at the top level of the ACL2 command loop. The current call of LD is treated as though ld-error-action is :RETURN! (the default; here we ignore the case (:exit N)) and hence immediately returns control to the superior call of ld. If all calls of ld were made with the default ld-error-action of :RETURN!, then all superior calls of ld will then complete until you are back at top level of the ACL2 loop. For more information, see ld-error-action.

    If you are at an ACL2 prompt (as opposed to a raw Lisp break), then you may type :p! in place of (p!); see keyword-commands.

    If you are actually in a break caused by break-rewrite, :p! and (p!) just print a message and otherwise are no-ops. (A comment in the source code definition of p! explains why break-rewrite cannot support ``popping up one level'' in the sense that you would probably expect.)