• 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
          • 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
    • Warnings

    Vl-remove-warnings

    Remove warnings of certain types.

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

    This can be useful to filter out mundane warnings that you do not want to bother the user with.

    Definitions and Theorems

    Function: vl-remove-warnings

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

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

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

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

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

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

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