• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
          • Vl-warninglist->types
          • Vl-warning
          • Propagating-errors
          • Vl-reportcard
          • Vl-warning-sort
          • Lint-warning-suppression
          • Clean-warnings
          • Warn
          • Vl-some-warning-fatalp
          • Vl-print-warnings-with-header
          • Vl-print-warnings-with-named-header
          • Flat-warnings
          • Vl-keep-warnings
          • Vl-remove-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
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Warnings

    Vl-some-warning-of-type-p

    Check if there are any warnings of certain types.

    Signature
    (vl-some-warning-of-type-p types x) → bool
    Arguments
    types — Guard (symbol-listp types).
    x — Guard (vl-warninglist-p x).
    Returns
    bool — Type (booleanp bool).

    Note: we just leave this function enabled.

    Definitions and Theorems

    Function: vl-some-warning-of-type-p

    (defun
     vl-some-warning-of-type-p (types x)
     (declare (xargs :guard (and (symbol-listp types)
                                 (vl-warninglist-p x))))
     (let
      ((__function__ 'vl-some-warning-of-type-p))
      (declare (ignorable __function__))
      (mbe :logic (intersectp-equal types (vl-warninglist->types x))
           :exec (cond ((atom x) nil)
                       ((member (vl-warning->type (car x))
                                types)
                        t)
                       (t (vl-some-warning-of-type-p types (cdr x)))))))

    Theorem: booleanp-of-vl-some-warning-of-type-p

    (defthm booleanp-of-vl-some-warning-of-type-p
            (b* ((bool (vl-some-warning-of-type-p types x)))
                (booleanp bool))
            :rule-classes :type-prescription)

    Theorem: vl-some-warning-of-type-p-of-vl-warninglist-fix-x

    (defthm
         vl-some-warning-of-type-p-of-vl-warninglist-fix-x
         (equal (vl-some-warning-of-type-p types (vl-warninglist-fix x))
                (vl-some-warning-of-type-p types x)))

    Theorem: vl-some-warning-of-type-p-vl-warninglist-equiv-congruence-on-x

    (defthm
         vl-some-warning-of-type-p-vl-warninglist-equiv-congruence-on-x
         (implies (vl-warninglist-equiv x x-equiv)
                  (equal (vl-some-warning-of-type-p types x)
                         (vl-some-warning-of-type-p types x-equiv)))
         :rule-classes :congruence)