• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
          • Vl-warninglist->types
          • Vl-warning
            • Vl-warning-p
              • Vl-warning-fix
              • Vl-warning-equiv
              • Make-vl-warning
              • Change-vl-warning
              • Vl-warning->type
              • Vl-warning->fatalp
              • Vl-warning->args
              • Vl-warning->msg
              • Vl-warning->fn
            • Propagating-errors
            • Vl-reportcard
            • Vl-warning-sort
            • Lint-warning-suppression
            • Clean-warnings
            • Warn
            • Vl-print-warnings-with-header
            • Vl-some-warning-fatalp
            • Vl-print-warnings-with-named-header
            • Flat-warnings
            • Vl-remove-warnings
            • Vl-keep-warnings
            • Vl-print-warnings
            • Vl-some-warning-of-type-p
            • Vl-clean-warnings
            • Vl-warnings-to-string
            • Vl-warninglist
            • Vl-print-warning
            • Ok
            • Vl-trace-warnings
            • Fatal
          • Primitives
          • Use-set
          • Syntax
          • Getting-started
          • Utilities
          • Loader
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-warning

    Vl-warning-p

    Recognizer for vl-warning structures.

    Signature
    (vl-warning-p x) → *

    Definitions and Theorems

    Function: vl-warning-p

    (defun vl-warning-p (x)
     (declare (xargs :guard t))
     (let ((__function__ 'vl-warning-p))
      (declare (ignorable __function__))
      (and
          (consp x)
          (eq (car x) :vl-warning)
          (mbe :logic (and (alistp (cdr x))
                           (equal (strip-cars (cdr x))
                                  '(type fatalp msg args fn)))
               :exec (fty::alist-with-carsp (cdr x)
                                            '(type fatalp msg args fn)))
          (b* ((type (cdr (std::da-nth 0 (cdr x))))
               (fatalp (cdr (std::da-nth 1 (cdr x))))
               (msg (cdr (std::da-nth 2 (cdr x))))
               (args (cdr (std::da-nth 3 (cdr x))))
               (fn (cdr (std::da-nth 4 (cdr x)))))
            (and (symbolp type)
                 (booleanp fatalp)
                 (stringp msg)
                 (true-listp args)
                 (symbolp fn))))))

    Theorem: consp-when-vl-warning-p

    (defthm consp-when-vl-warning-p
      (implies (vl-warning-p x) (consp x))
      :rule-classes :compound-recognizer)