• 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-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-reportcard-fix

    (vl-reportcard-fix x) is an ACL2::fty alist fixing function that follows the fix-keys strategy.

    Signature
    (vl-reportcard-fix x) → fty::newx
    Arguments
    x — Guard (vl-reportcard-p x).
    Returns
    fty::newx — Type (vl-reportcard-p fty::newx).

    Note that in the execution this is just an inline identity function.

    Definitions and Theorems

    Function: vl-reportcard-fix$inline

    (defun vl-reportcard-fix$inline (x)
      (declare (xargs :guard (vl-reportcard-p x)))
      (let ((__function__ 'vl-reportcard-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 x
               (if (consp (car x))
                   (cons (cons (vl-reportcardkey-fix (caar x))
                               (vl-warninglist-fix (cdar x)))
                         (vl-reportcard-fix (cdr x)))
                 (vl-reportcard-fix (cdr x))))
             :exec x)))

    Theorem: vl-reportcard-p-of-vl-reportcard-fix

    (defthm vl-reportcard-p-of-vl-reportcard-fix
      (b* ((fty::newx (vl-reportcard-fix$inline x)))
        (vl-reportcard-p fty::newx))
      :rule-classes :rewrite)

    Theorem: vl-reportcard-fix-when-vl-reportcard-p

    (defthm vl-reportcard-fix-when-vl-reportcard-p
      (implies (vl-reportcard-p x)
               (equal (vl-reportcard-fix x) x)))

    Function: vl-reportcard-equiv$inline

    (defun vl-reportcard-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (vl-reportcard-p acl2::x)
                                  (vl-reportcard-p acl2::y))))
      (equal (vl-reportcard-fix acl2::x)
             (vl-reportcard-fix acl2::y)))

    Theorem: vl-reportcard-equiv-is-an-equivalence

    (defthm vl-reportcard-equiv-is-an-equivalence
      (and (booleanp (vl-reportcard-equiv x y))
           (vl-reportcard-equiv x x)
           (implies (vl-reportcard-equiv x y)
                    (vl-reportcard-equiv y x))
           (implies (and (vl-reportcard-equiv x y)
                         (vl-reportcard-equiv y z))
                    (vl-reportcard-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: vl-reportcard-equiv-implies-equal-vl-reportcard-fix-1

    (defthm vl-reportcard-equiv-implies-equal-vl-reportcard-fix-1
      (implies (vl-reportcard-equiv acl2::x x-equiv)
               (equal (vl-reportcard-fix acl2::x)
                      (vl-reportcard-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-reportcard-fix-under-vl-reportcard-equiv

    (defthm vl-reportcard-fix-under-vl-reportcard-equiv
      (vl-reportcard-equiv (vl-reportcard-fix acl2::x)
                           acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-vl-reportcard-fix-1-forward-to-vl-reportcard-equiv

    (defthm equal-of-vl-reportcard-fix-1-forward-to-vl-reportcard-equiv
      (implies (equal (vl-reportcard-fix acl2::x)
                      acl2::y)
               (vl-reportcard-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-vl-reportcard-fix-2-forward-to-vl-reportcard-equiv

    (defthm equal-of-vl-reportcard-fix-2-forward-to-vl-reportcard-equiv
      (implies (equal acl2::x (vl-reportcard-fix acl2::y))
               (vl-reportcard-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: vl-reportcard-equiv-of-vl-reportcard-fix-1-forward

    (defthm vl-reportcard-equiv-of-vl-reportcard-fix-1-forward
      (implies (vl-reportcard-equiv (vl-reportcard-fix acl2::x)
                                    acl2::y)
               (vl-reportcard-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: vl-reportcard-equiv-of-vl-reportcard-fix-2-forward

    (defthm vl-reportcard-equiv-of-vl-reportcard-fix-2-forward
      (implies (vl-reportcard-equiv acl2::x (vl-reportcard-fix acl2::y))
               (vl-reportcard-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: cons-of-vl-reportcardkey-fix-k-under-vl-reportcard-equiv

    (defthm cons-of-vl-reportcardkey-fix-k-under-vl-reportcard-equiv
      (vl-reportcard-equiv (cons (cons (vl-reportcardkey-fix acl2::k)
                                       acl2::v)
                                 acl2::x)
                           (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-vl-reportcardkey-equiv-congruence-on-k-under-vl-reportcard-equiv

    (defthm
     cons-vl-reportcardkey-equiv-congruence-on-k-under-vl-reportcard-equiv
     (implies
          (vl-reportcardkey-equiv acl2::k k-equiv)
          (vl-reportcard-equiv (cons (cons acl2::k acl2::v) acl2::x)
                               (cons (cons k-equiv acl2::v) acl2::x)))
     :rule-classes :congruence)

    Theorem: cons-of-vl-warninglist-fix-v-under-vl-reportcard-equiv

    (defthm cons-of-vl-warninglist-fix-v-under-vl-reportcard-equiv
      (vl-reportcard-equiv
           (cons (cons acl2::k (vl-warninglist-fix acl2::v))
                 acl2::x)
           (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-vl-warninglist-equiv-congruence-on-v-under-vl-reportcard-equiv

    (defthm
     cons-vl-warninglist-equiv-congruence-on-v-under-vl-reportcard-equiv
     (implies
          (vl-warninglist-equiv acl2::v v-equiv)
          (vl-reportcard-equiv (cons (cons acl2::k acl2::v) acl2::x)
                               (cons (cons acl2::k v-equiv) acl2::x)))
     :rule-classes :congruence)

    Theorem: cons-of-vl-reportcard-fix-y-under-vl-reportcard-equiv

    (defthm cons-of-vl-reportcard-fix-y-under-vl-reportcard-equiv
      (vl-reportcard-equiv (cons acl2::x (vl-reportcard-fix acl2::y))
                           (cons acl2::x acl2::y)))

    Theorem: cons-vl-reportcard-equiv-congruence-on-y-under-vl-reportcard-equiv

    (defthm
     cons-vl-reportcard-equiv-congruence-on-y-under-vl-reportcard-equiv
     (implies (vl-reportcard-equiv acl2::y y-equiv)
              (vl-reportcard-equiv (cons acl2::x acl2::y)
                                   (cons acl2::x y-equiv)))
     :rule-classes :congruence)

    Theorem: vl-reportcard-fix-of-acons

    (defthm vl-reportcard-fix-of-acons
      (equal (vl-reportcard-fix (cons (cons acl2::a acl2::b) x))
             (cons (cons (vl-reportcardkey-fix acl2::a)
                         (vl-warninglist-fix acl2::b))
                   (vl-reportcard-fix x))))

    Theorem: vl-reportcard-fix-of-append

    (defthm vl-reportcard-fix-of-append
      (equal (vl-reportcard-fix (append std::a std::b))
             (append (vl-reportcard-fix std::a)
                     (vl-reportcard-fix std::b))))

    Theorem: consp-car-of-vl-reportcard-fix

    (defthm consp-car-of-vl-reportcard-fix
      (equal (consp (car (vl-reportcard-fix x)))
             (consp (vl-reportcard-fix x))))