• 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
      • Output-controls
        • With-output
        • Summary
        • Set-inhibit-output-lst
        • Set-gag-mode
        • Goal-spec
        • Set-warnings-as-errors
        • Saving-event-data
        • Pso
        • Finalize-event-user
        • Set-inhibit-er
        • Checkpoint-list
        • Set-inhibit-warnings
        • Get-event-data
        • Set-inhibited-summary-types
        • Set-print-clause-ids
        • Set-let*-abstractionp
        • Gag-mode
        • Initialize-event-user
        • Set-raw-proof-format
        • Checkpoint-list-pretty
        • Psof
        • Set-raw-warning-format
        • Toggle-inhibit-warning
        • Toggle-inhibit-er
        • Warnings
          • Set-warnings-as-errors
          • Patbind-wmv
            • Patbind-wtmv
          • Show-checkpoint-list
          • Wof
          • Psog
          • Checkpoint-info-list
          • Pso!
          • Toggle-inhibit-warning!
          • Set-duplicate-keys-action!
          • Toggle-inhibit-er!
          • Set-inhibit-warnings!
          • Set-inhibit-er!
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Warnings

    Patbind-wmv

    B* binder to automatically append together returned warnings

    This is a b* binder introduced with ACL2::def-b*-binder.

    Macro: patbind-wmv

    (defmacro patbind-wmv (args acl2::forms acl2::rest-expr)
     (b*
      (((mv ctx args)
        (b* ((acl2::mem (member :ctx args)))
          (if acl2::mem (mv (cadr acl2::mem)
                            (append (take (- (len args) (len acl2::mem))
                                          args)
                                    (cddr acl2::mem)))
            (mv nil args)))))
      (cons
       'b*
       (cons
        (cons
         (if (equal args '(warnings))
             (cons '__tmp__warnings acl2::forms)
           (cons (cons 'mv
                       (subst '__tmp__warnings 'warnings args))
                 acl2::forms))
         (cons
          (cons
           'warnings
           (cons
            (cons
             'append-without-guard
             (cons
                  (if ctx (cons 'vl-warninglist-add-ctx
                                (cons '__tmp__warnings (cons ctx 'nil)))
                    '__tmp__warnings)
                  '(warnings)))
            'nil))
          'nil))
        (cons acl2::rest-expr 'nil)))))