• 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-keep-warnings

    Keep only warnings of certain types.

    Signature
    (vl-keep-warnings types x) → ans
    Arguments
    types — Types of warnings to keep.
        Guard (symbol-listp types).
    x — The list of warnings to filter.
        Guard (vl-warninglist-p x).
    Returns
    ans — Type (vl-warninglist-p ans), given (force (vl-warninglist-p x)).

    This can be useful to highlight certain warnings that are of particular interest.

    Definitions and Theorems

    Function: vl-keep-warnings

    (defun vl-keep-warnings (types x)
           (declare (xargs :guard (and (symbol-listp types)
                                       (vl-warninglist-p x))))
           (let ((__function__ 'vl-keep-warnings))
                (declare (ignorable __function__))
                (cond ((atom x) nil)
                      ((member (vl-warning->type (car x))
                               (acl2::symbol-list-fix types))
                       (cons (vl-warning-fix (car x))
                             (vl-keep-warnings types (cdr x))))
                      (t (vl-keep-warnings types (cdr x))))))

    Theorem: vl-warninglist-p-of-vl-keep-warnings

    (defthm vl-warninglist-p-of-vl-keep-warnings
            (implies (force (vl-warninglist-p x))
                     (b* ((ans (vl-keep-warnings types x)))
                         (vl-warninglist-p ans)))
            :rule-classes :rewrite)

    Theorem: vl-keep-warnings-of-symbol-list-fix-types

    (defthm vl-keep-warnings-of-symbol-list-fix-types
            (equal (vl-keep-warnings (acl2::symbol-list-fix types)
                                     x)
                   (vl-keep-warnings types x)))

    Theorem: vl-keep-warnings-symbol-list-equiv-congruence-on-types

    (defthm vl-keep-warnings-symbol-list-equiv-congruence-on-types
            (implies (acl2::symbol-list-equiv types types-equiv)
                     (equal (vl-keep-warnings types x)
                            (vl-keep-warnings types-equiv x)))
            :rule-classes :congruence)

    Theorem: vl-keep-warnings-of-vl-warninglist-fix-x

    (defthm vl-keep-warnings-of-vl-warninglist-fix-x
            (equal (vl-keep-warnings types (vl-warninglist-fix x))
                   (vl-keep-warnings types x)))

    Theorem: vl-keep-warnings-vl-warninglist-equiv-congruence-on-x

    (defthm vl-keep-warnings-vl-warninglist-equiv-congruence-on-x
            (implies (vl-warninglist-equiv x x-equiv)
                     (equal (vl-keep-warnings types x)
                            (vl-keep-warnings types x-equiv)))
            :rule-classes :congruence)