• 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
        • 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
          • Er
          • Value-triple
          • Error-checking
          • Error-triple
          • Assert-event
          • Set-warnings-as-errors
          • Hard-error
          • Set-inhibit-er
          • Must-fail
          • Assert!-stobj
          • Breaks
          • Must-eval-to
          • Ctx
          • Assert!
          • Must-succeed
          • Assert$
          • Ctxp
          • Illegal
          • Er-progn
          • Error1
          • Er-hard
          • Must-succeed*
            • Toggle-inhibit-er
            • Break$
            • Assert*
            • Assert?
            • Er-soft+
            • Er-hard?
            • Must-fail-with-soft-error
            • Must-fail-with-hard-error
            • Must-fail-with-error
            • Must-eval-to-t
            • Er-soft-logic
            • Er-soft
            • Convert-soft-error
            • Toggle-inhibit-er!
            • Set-inhibit-er!
            • Must-prove
            • Must-not-prove
            • Must-fail!
            • Must-be-redundant
            • Must-succeed!
            • Must-fail-local
            • Assert-equal
          • 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
    • Std/testing
    • Errors
    • Must-succeed

    Must-succeed*

    A variant of must-succeed that accepts multiple forms.

    (must-succeed* form1
                   ...
                   formN
                   :with-output-off ...
                   :check-expansion ...)

    The N forms must be embedded event forms, because they are put into a progn so that earlier forms are evaluated before considering later forms in the sequence. This is a difference with must-succeed, whose form is required to return an error triple without necessarily being an embedded event form; since must-succeed takes only one form, there is no issue of earlier forms being evaluated before considering later forms as in must-succeed*.

    The forms may be followed by :with-output-off and/or :check-expansion, as in must-succeed.

    Macro: must-succeed*

    (defmacro must-succeed* (&rest args)
     (mv-let (erp forms options)
             (partition-rest-and-keyword-args
                  args
                  '(:with-output-off :check-expansion))
      (if erp
       '(er
         hard? 'must-succeed*
         "The arguments of MUST-SUCCEED* must be zero or more forms ~
                    followed by the options :WITH-OUTPUT-OFF and :CHECK-EXPANSION.")
       (let ((with-output-off-pair (assoc :with-output-off options))
             (check-expansion-pair (assoc :check-expansion options)))
        (cons
         'must-succeed
         (cons (cons 'progn forms)
               (append (if with-output-off-pair
                           (cons ':with-output-off
                                 (cons (cdr with-output-off-pair) 'nil))
                         nil)
                       (if check-expansion-pair
                           (cons ':check-expansion
                                 (cons (cdr check-expansion-pair) 'nil))
                         nil))))))))