• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
            • Vl-remove-unnecessary-elements
            • Vl-necessary-elements-transitive
            • Vl-dependent-elements-transitive
            • Vl-necessary-elements-direct
            • Vl-modulelist-everinstanced
            • Vl-dependent-elements-direct
            • Vl-modulelist-toplevel
            • Vl-design-deporder-modules
            • Vl-design-check-complete
            • Vl-design-upgraph
            • Immdeps
              • Immdeps-main
              • Vl-immdeps
              • Immdeps-top
              • Vl-immdepgraph
              • Vl-depgraph
                • Vl-depgraph-p
                • Vl-depgraph-fix
                  • Vl-depgraph-equiv
                  • Vl-depgraph-p-of-invert
                  • String-listp-of-transdeps
              • Vl-design-downgraph
              • Vl-collect-dependencies
              • Vl-hierarchy-free
            • Finding-by-name
            • Expr-tools
            • Expr-slicing
            • Stripping-functions
            • Stmt-tools
            • Modnamespace
            • Vl-parse-expr-from-str
            • Welltyped
            • Reordering-by-name
            • Flat-warnings
            • Genblob
            • Expr-building
            • Datatype-tools
            • Syscalls
            • Relocate
            • Expr-cleaning
            • Namemangle
            • Caremask
            • Port-tools
            • Lvalues
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-depgraph

    Vl-depgraph-fix

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

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

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

    Definitions and Theorems

    Function: vl-depgraph-fix$inline

    (defun vl-depgraph-fix$inline (x)
      (declare (xargs :guard (vl-depgraph-p x)))
      (let ((__function__ 'vl-depgraph-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-depgraph-fix (cdr x)))
                 (vl-depgraph-fix (cdr x))))
             :exec x)))

    Theorem: vl-depgraph-p-of-vl-depgraph-fix

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

    Theorem: vl-depgraph-fix-when-vl-depgraph-p

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

    Function: vl-depgraph-equiv$inline

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

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

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

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

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

    Theorem: vl-depgraph-fix-under-vl-depgraph-equiv

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

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

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

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

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

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

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

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

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

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

    (defthm cons-of-str-fix-k-under-vl-depgraph-equiv
      (vl-depgraph-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-depgraph-equiv

    (defthm cons-streqv-congruence-on-k-under-vl-depgraph-equiv
     (implies (streqv acl2::k k-equiv)
              (vl-depgraph-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-depgraph-equiv

    (defthm cons-of-string-list-fix-v-under-vl-depgraph-equiv
      (vl-depgraph-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-depgraph-equiv

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

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

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

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

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

    Theorem: vl-depgraph-fix-of-acons

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

    Theorem: vl-depgraph-fix-of-append

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

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

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