• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
      • Break-rewrite
      • Proof-builder
      • Accumulated-persistence
      • Cgen
      • Forward-chaining-reports
      • Proof-tree
      • Print-gv
      • Dmr
      • With-brr-data
      • Splitter
      • Guard-debug
      • Set-debugger-enable
      • Redo-flat
      • Time-tracker
      • Set-check-invariant-risk
      • Removable-runes
      • Efficiency
      • Explain-near-miss
      • Tail-biting
      • Failed-forcing
      • Sneaky
      • Invariant-risk
      • Failure
      • Measure-debug
      • Dead-events
      • Compare-objects
      • Prettygoals
      • Remove-hyps
      • Type-prescription-debugging
      • Pstack
      • Trace
        • Trace$
        • Wet
        • Trace!
        • Break-on-error
          • Set-trace-evisc-tuple
          • Untrace$
          • Open-trace-file
          • Open-trace-file!
          • Close-trace-file
        • Set-register-invariant-risk
        • Walkabout
        • Disassemble$
        • Nil-goal
        • Cw-gstack
        • Set-guard-msg
        • Find-lemmas
        • Watch
        • Quick-and-dirty-subsumption-replacement-step
        • Profile-all
        • Profile-ACL2
        • Set-print-gv-defaults
        • Minimal-runes
        • Spacewalk
        • Try-gl-concls
        • Near-misses
      • 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
          • Break-rewrite
          • Proof-builder
          • Accumulated-persistence
          • Cgen
          • Forward-chaining-reports
          • Proof-tree
          • Print-gv
          • Dmr
          • With-brr-data
          • Splitter
          • Guard-debug
          • Set-debugger-enable
          • Redo-flat
          • Time-tracker
          • Set-check-invariant-risk
          • Removable-runes
          • Efficiency
          • Explain-near-miss
          • Tail-biting
          • Failed-forcing
          • Sneaky
          • Invariant-risk
          • Failure
          • Measure-debug
          • Dead-events
          • Compare-objects
          • Prettygoals
          • Remove-hyps
          • Type-prescription-debugging
          • Pstack
          • Trace
            • Trace$
            • Wet
            • Trace!
            • Break-on-error
              • Set-trace-evisc-tuple
              • Untrace$
              • Open-trace-file
              • Open-trace-file!
              • Close-trace-file
            • Set-register-invariant-risk
            • Walkabout
            • Disassemble$
            • Nil-goal
            • Cw-gstack
            • Set-guard-msg
            • Find-lemmas
            • Watch
            • Quick-and-dirty-subsumption-replacement-step
            • Profile-all
            • Profile-ACL2
            • Set-print-gv-defaults
            • Minimal-runes
            • Spacewalk
            • Try-gl-concls
            • Near-misses
          • Miscellaneous
          • Output-controls
          • Macros
          • Interfacing-tools
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Trace
      • ACL2-built-ins

      Break-on-error

      Break when encountering a hard or soft error caused by ACL2

      General forms:
      (break-on-error t)    ; installs a trace causing a continuable error (break)
                            ;   when an error is invoked by ACL2.
      (break-on-error)      ; same as above
      (break-on-error :all) ; same as above, but even when inside the prover
      (break-on-error nil)  ; uninstall any above trace

      Evaluation of (break-on-error :all) generates a suitable trace of error functions, so that the Lisp debugger is entered whenever ACL2 calls them. You can then continue the interrupted computation by suitable exit from the debugger (with a command that depends on the host Lisp). Evaluation of (Break-on-error t), or equivalently, (break-on-error), is similar except that certain errors are ignored when inside the theorem prover; this is probably preferable, in general, to (break-on-error :all). Finally, evaluation of (break-on-error nil) removes those traces.

      Remarks.

      • The argument, if supplied, is evaluated and must evaluate to t, nil, or :all.
      • For technical reasons, you may see breaks or error messages more than once.
      • It is an error to call break-on-error while in raw-mode.
      • Break-on-error is implemented using ACL2 trace!, which is a version of trace$ that uses a ttag and hence generates a ``TTAG NOTE'' message. You can use :trans1 to see the trace! call generated by a given call of break-on-error. Evaluate (trace$) if you want to see the current trace specs.

      You are of course welcome to define your own version of break-on-error by modifying a copy of the source definition (search for ``(defmacro break-on-error)'' in ACL2 source file other-events.lisp). Please feel free to send your version of break-on-error to the ACL2 implementors, to consider for inclusion into ACL2.

      Also see set-debugger-enable for how to get raw-Lisp backtrace information when an error occurs as a result of break-on-error, or even of a raw Lisp error, by calling set-debugger-enable with argument :bt, :bt-break, or :break-bt. Note that for ACL2 errors (as opposed to raw Lisp errors), i.e. errors affected by break-on-error, all three of those keyword values are treated equivalently (and, all are ignored for non-ANSI GCL; see set-debugger-enable).