• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
          • Lint-warning-suppression
          • Warning-basics
          • Vl-warning
          • Vl-warninglist-add-ctx
          • Vl-warninglist->types
          • Propagating-errors
          • Vl-reportcard
          • Vl-some-warning-fatalp
          • Clean-warnings
          • Lint-whole-file-suppression
          • Vl-keep-warnings
          • Warn
          • Vl-warninglist
          • Vl-remove-warnings
          • Flat-warnings
          • Vl-some-warning-of-type-p
            • Vl-msg
            • Vl-warning-add-ctx
            • Vl-print-warning
            • Vmsg-binary-concat
            • Ok
            • Vl-trace-warnings
            • Fatal
            • Vmsg
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • 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 (acl2::symbol-list-fix 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-symbol-list-fix-types

    (defthm
         vl-some-warning-of-type-p-of-symbol-list-fix-types
         (equal (vl-some-warning-of-type-p (acl2::symbol-list-fix types)
                                           x)
                (vl-some-warning-of-type-p types x)))

    Theorem: vl-some-warning-of-type-p-symbol-list-equiv-congruence-on-types

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

    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)