• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Community
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
            • Vl-find-basename/extension-aux
            • Vl-find-highest-priority-extension
            • Vl-split-filename
            • Vl-dirxcache
              • Vl-dirxcache-p
              • Vl-dirxcache-fix
                • Vl-make-dirxcache
                • Vl-dirxcache-equiv
              • Vl-dirxlist-cache
            • Vl-load-file
            • Vl-loadresult
            • Scope-of-defines
            • Vl-find-file
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-read-file
            • Vl-includeskips-report-gather
            • Vl-load-main
            • Extended-characters
            • Vl-load
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-preprocess-debug
            • Vl-write-preprocessor-debug-file
            • Vl-read-file-report-gather
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-read-file-report
            • Vl-loadstate-pad
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-dirxcache

    Vl-dirxcache-fix

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

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

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

    Definitions and Theorems

    Function: vl-dirxcache-fix$inline

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

    Theorem: vl-dirxcache-p-of-vl-dirxcache-fix

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

    Theorem: vl-dirxcache-fix-when-vl-dirxcache-p

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

    Function: vl-dirxcache-equiv$inline

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

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

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

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

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

    Theorem: vl-dirxcache-fix-under-vl-dirxcache-equiv

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

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

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

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

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

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

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

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

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

    Theorem: cons-of-str-fix-k-under-vl-dirxcache-equiv

    (defthm cons-of-str-fix-k-under-vl-dirxcache-equiv
      (vl-dirxcache-equiv (cons (cons (str-fix acl2::k) acl2::v)
                                acl2::x)
                          (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-streqv-congruence-on-k-under-vl-dirxcache-equiv

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

    Theorem: cons-of-string-list-fix-v-under-vl-dirxcache-equiv

    (defthm cons-of-string-list-fix-v-under-vl-dirxcache-equiv
      (vl-dirxcache-equiv (cons (cons acl2::k (string-list-fix acl2::v))
                                acl2::x)
                          (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-string-list-equiv-congruence-on-v-under-vl-dirxcache-equiv

    (defthm
        cons-string-list-equiv-congruence-on-v-under-vl-dirxcache-equiv
      (implies
           (str::string-list-equiv acl2::v v-equiv)
           (vl-dirxcache-equiv (cons (cons acl2::k acl2::v) acl2::x)
                               (cons (cons acl2::k v-equiv) acl2::x)))
      :rule-classes :congruence)

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

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

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

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

    Theorem: vl-dirxcache-fix-of-acons

    (defthm vl-dirxcache-fix-of-acons
      (equal (vl-dirxcache-fix (cons (cons acl2::a acl2::b) x))
             (cons (cons (str-fix acl2::a)
                         (string-list-fix acl2::b))
                   (vl-dirxcache-fix x))))

    Theorem: vl-dirxcache-fix-of-append

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

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

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