• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
          • Lint-warning-suppression
          • Warning-basics
          • Vl-warning
          • Vl-warninglist-add-ctx
          • Vl-warninglist->types
          • Propagating-errors
          • Vl-reportcard
            • Vl-reportcard-p
            • Vl-apply-reportcard
            • Vl-reportcard-fix
            • Vl-extend-reportcard-list
            • Vl-design-reportcard
            • Vl-design-origname-reportcard
            • Vl-extend-reportcard
            • Vl-reportcard-revive-invalid-warnings
            • Vl-clean-reportcard
            • Vl-remove-from-reportcard
            • Vl-reportcard-equiv
            • Vl-print-reportcard
            • Vl-keep-from-reportcard
              • Vl-reportcard-to-string
              • Vl-reportcard-types
              • Vl-reportcardkey-p
            • Vl-some-warning-fatalp
            • Clean-warnings
            • Lint-whole-file-suppression
            • Warn
            • Vl-warninglist
            • Vl-remove-warnings
            • Vl-keep-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
      • 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-symbol-list-fix-types

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

    Theorem: vl-keep-from-reportcard-symbol-list-equiv-congruence-on-types

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

    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)