• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
            • Vl-interfaceportlist->ifnames
            • Vl-blockscope
            • Vl-scope-find-item
            • Vl-scopestack-find-item/ss/package
            • Vl-importlist-find-explicit-item
            • Vl-scopestack-find-item/context
            • Vl-importlist-find-implicit-item
            • Vl-import-stars-find-item
            • Vl-scopeinfo
            • Vl-importlist->explicit-item-alist
            • Vl-scopestack-find-definition/ss
            • Vl-scopeitem
              • Vl-scopeitem-p
              • Vl-scopeitem-fix
              • Vl-maybe-scopeitem
              • Vl-scopeitem-equiv
              • Vl-scopeitem-alist-count
              • Vl-scopeitem-alist
                • Vl-scopeitem-alist-p
                • Vl-scopeitem-alist-fix
                  • Vl-scopeitem-alist-equiv
                • Vl-scopeitemlist
              • Vl-scopestack-find-package/ss
              • Vl-scopestack
              • Vl-scopeinfo-find-item
              • Vl-scopestack-find-item/ss
              • Vl-scopestack-find-class/ss
              • Scopestack-constants
              • Vl-scope-namespace
              • Vl-maybe-scope
              • Vl-importresult
              • Vl-scopestack-push
              • Vl-import-stars-itemnames
              • Vl-scope->scopeinfo
              • Vl-scope-find-item-fast
              • Vl-interface-scope-find-item
              • Vl-genblob-scope-find-item
              • Vl-module-scope-find-item
              • Vl-design-scope-find-definition
              • Vl-scopestack-find-item
              • Vl-scopestack-find-definition
              • Vl-scopeinfo->itemnames
              • Vl-scope-find-portdecl
              • Vl-scope-find-definition
              • Vl-package-scope-find-item
              • Vl-interface-scope-find-portdecl
              • Vl-genblob-scope-find-portdecl
              • Vl-design-scope-find-item
              • Vl-blockscope-scope-find-item
              • Vl-scopestack-find-package
              • Vl-scope-find-package
              • Vl-module-scope-find-portdecl
              • Vl-design-scope-find-package
              • Vl-design-scope-find-class
              • Vl-class-scope-find-item
              • Vl-scopestack-find-class
              • Vl-scope-find-class
              • Vl-scopestack->hashkey
              • Vl-scope-find-portdecl-fast
              • Vl-package-scope-item-alist-top
              • Vl-scopestack->path-aux
              • Vl-scopedef
              • Vl-scope-portdecl-alist
              • Vl-scope-package-alist
              • Vl-scope-find-definition-fast
              • Vl-scope-definition-alist
              • Vl-scope-find-package-fast
              • Vl-scope-find-class-fast
              • Vl-scope-class-alist
              • Vl-scopestack->path
              • Vl-scopestack->design
              • Vl-scopeitem->name
              • Vl-scope
              • Vl-scopestack-init
              • Vl-importlist->star-packages
              • Vl-scopestack-pop
              • Vl-scopestack-nesting-level
              • Vl-scopestack->toplevel
              • Vl-scope->scopetype
              • Vl-scope->id
              • Vl-design-scope-package-alist-top
              • Vl-bindlist->modinsts
              • Vl-scopestack-toplevel-p
              • Vl-scopestacks-free
              • Vl-importresult-alist
            • Hid-tools
            • Filtering-by-name
            • Vl-interface-mocktype
            • Stripping-functions
            • Genblob
            • Expr-tools
            • Extract-vl-types
            • Hierarchy
            • Range-tools
            • Finding-by-name
            • Stmt-tools
            • Modnamespace
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-scopeitem-alist

    Vl-scopeitem-alist-fix

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

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

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

    Definitions and Theorems

    Function: vl-scopeitem-alist-fix$inline

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

    Theorem: vl-scopeitem-alist-p-of-vl-scopeitem-alist-fix

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

    Theorem: vl-scopeitem-alist-fix-when-vl-scopeitem-alist-p

    (defthm vl-scopeitem-alist-fix-when-vl-scopeitem-alist-p
      (implies (vl-scopeitem-alist-p x)
               (equal (vl-scopeitem-alist-fix x) x)))

    Function: vl-scopeitem-alist-equiv$inline

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

    Theorem: vl-scopeitem-alist-equiv-is-an-equivalence

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

    Theorem: vl-scopeitem-alist-equiv-implies-equal-vl-scopeitem-alist-fix-1

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

    Theorem: vl-scopeitem-alist-fix-under-vl-scopeitem-alist-equiv

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

    Theorem: equal-of-vl-scopeitem-alist-fix-1-forward-to-vl-scopeitem-alist-equiv

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

    Theorem: equal-of-vl-scopeitem-alist-fix-2-forward-to-vl-scopeitem-alist-equiv

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

    Theorem: vl-scopeitem-alist-equiv-of-vl-scopeitem-alist-fix-1-forward

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

    Theorem: vl-scopeitem-alist-equiv-of-vl-scopeitem-alist-fix-2-forward

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

    Theorem: cons-of-str-fix-k-under-vl-scopeitem-alist-equiv

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

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

    Theorem: cons-of-vl-scopeitem-fix-v-under-vl-scopeitem-alist-equiv

    (defthm cons-of-vl-scopeitem-fix-v-under-vl-scopeitem-alist-equiv
      (vl-scopeitem-alist-equiv
           (cons (cons acl2::k (vl-scopeitem-fix acl2::v))
                 acl2::x)
           (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-vl-scopeitem-equiv-congruence-on-v-under-vl-scopeitem-alist-equiv

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

    Theorem: cons-of-vl-scopeitem-alist-fix-y-under-vl-scopeitem-alist-equiv

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

    Theorem: cons-vl-scopeitem-alist-equiv-congruence-on-y-under-vl-scopeitem-alist-equiv

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

    Theorem: vl-scopeitem-alist-fix-of-acons

    (defthm vl-scopeitem-alist-fix-of-acons
      (equal (vl-scopeitem-alist-fix (cons (cons acl2::a acl2::b) x))
             (cons (cons (str-fix acl2::a)
                         (vl-scopeitem-fix acl2::b))
                   (vl-scopeitem-alist-fix x))))

    Theorem: vl-scopeitem-alist-fix-of-append

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

    Theorem: consp-car-of-vl-scopeitem-alist-fix

    (defthm consp-car-of-vl-scopeitem-alist-fix
      (equal (consp (car (vl-scopeitem-alist-fix x)))
             (consp (vl-scopeitem-alist-fix x))))