• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • 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-scopeinfo-find-item
            • Vl-scopestack-find-package/ss
            • Vl-scopestack-find-item/ss
            • Vl-scopestack
            • Vl-scopestack-find-class/ss
            • Scopestack-constants
            • Vl-scope-namespace
            • Vl-scopestack-push
            • Vl-maybe-scope
            • Vl-importresult
            • Vl-scope-find-item-fast
            • Vl-module-scope-find-item
              • Vl-module-scope-item-alist
            • Vl-interface-scope-find-item
            • Vl-import-stars-itemnames
            • Vl-genblob-scope-find-item
            • Vl-scope->scopeinfo
            • Vl-design-scope-find-definition
            • Vl-scopestack-find-item
            • Vl-scopestack-find-definition
            • Vl-package-scope-find-item
            • Vl-interface-scope-find-portdecl
            • Vl-design-scope-find-item
            • Vl-blockscope-scope-find-item
            • Vl-scopestack-find-package
            • Vl-scopeinfo->itemnames
            • Vl-scope-find-portdecl
            • Vl-scope-find-definition
            • Vl-module-scope-find-portdecl
            • Vl-genblob-scope-find-portdecl
            • Vl-design-scope-find-package
            • Vl-class-scope-find-item
            • Vl-scope-find-package
            • Vl-design-scope-find-class
            • Vl-scopestack-find-class
            • Vl-scope-find-class
            • Vl-scopestack->hashkey
            • Vl-scope-find-portdecl-fast
            • Vl-scope-definition-alist
            • Vl-package-scope-item-alist-top
            • Vl-scopestack->path-aux
            • Vl-scopedef
            • Vl-scope-portdecl-alist
            • Vl-scope-package-alist
            • Vl-scope-find-package-fast
            • Vl-scope-find-definition-fast
            • Vl-scope-class-alist
            • Vl-scope-find-class-fast
            • Vl-scopestack->path
            • Vl-scopestack->design
            • Vl-scopestack-init
            • Vl-scopeitem->name
            • Vl-scope
            • Vl-importlist->star-packages
            • Vl-scopestack->toplevel
            • Vl-scopestack-pop
            • Vl-scopestack-nesting-level
            • Vl-scope->scopetype
            • Vl-scope->id
            • Vl-bindlist->modinsts
            • Vl-design-scope-package-alist-top
            • Vl-scopestack-toplevel-p
            • Vl-scopestacks-free
            • Vl-importresult-alist
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
          • Hierarchy
          • Extract-vl-types
          • 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
    • Testing-utilities
    • Math
  • Scopestack

Vl-module-scope-find-item

Signature
(vl-module-scope-find-item name scope) → item
Arguments
name — Guard (stringp name).
scope — Guard (vl-module-p scope).
Returns
item — Type (iff (vl-scopeitem-p item) item).

Definitions and Theorems

Function: vl-module-scope-find-item

(defun vl-module-scope-find-item (name scope)
       (declare (xargs :guard (and (stringp name)
                                   (vl-module-p scope))))
       (let ((__function__ 'vl-module-scope-find-item))
            (declare (ignorable __function__))
            (b* (((vl-module scope))
                 (?name (string-fix name)))
                (or (vl-find-paramdecl name scope.paramdecls)
                    (vl-find-vardecl name scope.vardecls)
                    (vl-find-fundecl name scope.fundecls)
                    (vl-find-taskdecl name scope.taskdecls)
                    (vl-find-typedef name scope.typedefs)
                    (vl-find-dpiimport name scope.dpiimports)
                    (vl-find-modinst name scope.modinsts)
                    (vl-find-gateinst name scope.gateinsts)
                    (vl-find-genvar name scope.genvars)
                    (vl-find-genelement name scope.generates)
                    (vl-find-interfaceport name scope.ifports)))))

Theorem: return-type-of-vl-module-scope-find-item

(defthm return-type-of-vl-module-scope-find-item
        (b* ((item (vl-module-scope-find-item name scope)))
            (iff (vl-scopeitem-p item) item))
        :rule-classes :rewrite)

Theorem: vl-module-scope-find-item-of-str-fix-name

(defthm vl-module-scope-find-item-of-str-fix-name
        (equal (vl-module-scope-find-item (str-fix name)
                                          scope)
               (vl-module-scope-find-item name scope)))

Theorem: vl-module-scope-find-item-streqv-congruence-on-name

(defthm
     vl-module-scope-find-item-streqv-congruence-on-name
     (implies (streqv name name-equiv)
              (equal (vl-module-scope-find-item name scope)
                     (vl-module-scope-find-item name-equiv scope)))
     :rule-classes :congruence)

Theorem: vl-module-scope-find-item-of-vl-module-fix-scope

(defthm
     vl-module-scope-find-item-of-vl-module-fix-scope
     (equal (vl-module-scope-find-item name (vl-module-fix scope))
            (vl-module-scope-find-item name scope)))

Theorem: vl-module-scope-find-item-vl-module-equiv-congruence-on-scope

(defthm
     vl-module-scope-find-item-vl-module-equiv-congruence-on-scope
     (implies (vl-module-equiv scope scope-equiv)
              (equal (vl-module-scope-find-item name scope)
                     (vl-module-scope-find-item name scope-equiv)))
     :rule-classes :congruence)

Subtopics

Vl-module-scope-item-alist