• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
          • Vl-warninglist->types
          • Vl-warning
          • Propagating-errors
          • Vl-reportcard
            • Vl-reportcard-p
            • Vl-apply-reportcard
            • Vl-reportcard-fix
            • Vl-extend-reportcard-list
            • Vl-design-origname-reportcard
            • Vl-design-reportcard
            • Vl-extend-reportcard
            • Vl-reportcard-revive-invalid-warnings
            • Vl-clean-reportcard
            • Vl-reportcard-equiv
            • Vl-print-reportcard
            • Vl-reportcard-to-string
            • Vl-keep-from-reportcard
              • Vl-reportcard-types
              • Vl-reportcardkey-p
            • 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-reportcard

    Vl-keep-from-reportcard

    Filter a reportcard to only keep the warnings of certain types.

    Signature
    (vl-keep-from-reportcard types x) → sub-reportcard
    Arguments
    types — Guard (symbol-listp types).
    x — Guard (vl-reportcard-p x).
    Returns
    sub-reportcard — Fast alist.
        Type (vl-reportcard-p sub-reportcard).

    Definitions and Theorems

    Function: vl-keep-from-reportcard

    (defun vl-keep-from-reportcard (types x)
      (declare (xargs :guard (and (symbol-listp types)
                                  (vl-reportcard-p x))))
      (let ((__function__ 'vl-keep-from-reportcard))
        (declare (ignorable __function__))
        (b* ((x (vl-reportcard-fix x))
             ((when (atom x)) nil)
             ((cons name1 warnings1) (car x))
             (keep1 (vl-keep-warnings types warnings1))
             (rest (vl-keep-from-reportcard types (cdr x)))
             ((when keep1)
              (hons-acons name1 keep1 rest)))
          rest)))

    Theorem: vl-reportcard-p-of-vl-keep-from-reportcard

    (defthm vl-reportcard-p-of-vl-keep-from-reportcard
      (b* ((sub-reportcard (vl-keep-from-reportcard types x)))
        (vl-reportcard-p sub-reportcard))
      :rule-classes :rewrite)

    Theorem: vl-keep-from-reportcard-of-vl-reportcard-fix-x

    (defthm vl-keep-from-reportcard-of-vl-reportcard-fix-x
      (equal (vl-keep-from-reportcard types (vl-reportcard-fix x))
             (vl-keep-from-reportcard types x)))

    Theorem: vl-keep-from-reportcard-vl-reportcard-equiv-congruence-on-x

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