Memoized version.
(vl-scope->scopeinfo-aux scope design) → scopeinfo
Function:
(defun vl-scope->scopeinfo-aux (scope design) (declare (xargs :guard (and (vl-scope-p scope) (vl-maybe-design-p design)))) (let ((__function__ 'vl-scope->scopeinfo-aux)) (declare (ignorable __function__)) (b* ((scope (vl-scope-fix scope))) (case (tag scope) (:vl-interface (b* (((vl-interface scope :quietp t))) (make-vl-scopeinfo :scopetype (vl-scope->scopetype scope) :id (vl-scope->id scope) :locals (make-fast-alist (vl-interface-scope-item-alist scope nil)) :imports (make-fast-alist (vl-importlist->explicit-item-alist scope.imports design nil)) :star-packages (vl-importlist->star-packages scope.imports)))) (:vl-module (b* (((vl-module scope :quietp t))) (make-vl-scopeinfo :scopetype (vl-scope->scopetype scope) :id (vl-scope->id scope) :locals (make-fast-alist (vl-module-scope-item-alist scope nil)) :imports (make-fast-alist (vl-importlist->explicit-item-alist scope.imports design nil)) :star-packages (vl-importlist->star-packages scope.imports)))) (:vl-class (b* (((vl-class scope :quietp t))) (make-vl-scopeinfo :scopetype (vl-scope->scopetype scope) :id (vl-scope->id scope) :locals (make-fast-alist (vl-class-scope-item-alist scope nil)) :imports (make-fast-alist (vl-importlist->explicit-item-alist scope.imports design nil)) :star-packages (vl-importlist->star-packages scope.imports)))) (:vl-genblob (b* (((vl-genblob scope :quietp t))) (make-vl-scopeinfo :scopetype (vl-scope->scopetype scope) :id (vl-scope->id scope) :locals (make-fast-alist (vl-genblob-scope-item-alist scope nil)) :imports (make-fast-alist (vl-importlist->explicit-item-alist scope.imports design nil)) :star-packages (vl-importlist->star-packages scope.imports)))) (:vl-blockscope (b* (((vl-blockscope scope :quietp t))) (make-vl-scopeinfo :scopetype (vl-scope->scopetype scope) :id (vl-scope->id scope) :locals (make-fast-alist (vl-blockscope-scope-item-alist scope nil)) :imports (make-fast-alist (vl-importlist->explicit-item-alist scope.imports design nil)) :star-packages (vl-importlist->star-packages scope.imports)))) (:vl-design (b* (((vl-design scope :quietp t))) (make-vl-scopeinfo :scopetype (vl-scope->scopetype scope) :id (vl-scope->id scope) :locals (make-fast-alist (vl-design-scope-item-alist scope nil)) :imports (make-fast-alist (vl-importlist->explicit-item-alist scope.imports design nil)) :star-packages (vl-importlist->star-packages scope.imports)))) (:vl-package (b* (((vl-package scope :quietp t))) (make-vl-scopeinfo :scopetype (vl-scope->scopetype scope) :id (vl-scope->id scope) :locals (make-fast-alist (vl-package-scope-item-alist scope nil)) :imports (make-fast-alist (vl-importlist->explicit-item-alist scope.imports design nil)) :star-packages (vl-importlist->star-packages scope.imports)))) (:vl-scopeinfo (vl-scopeinfo-fix scope)) (otherwise (make-vl-scopeinfo))))))
Theorem:
(defthm vl-scopeinfo-p-of-vl-scope->scopeinfo-aux (b* ((scopeinfo (vl-scope->scopeinfo-aux scope design))) (vl-scopeinfo-p scopeinfo)) :rule-classes :rewrite)
Theorem:
(defthm vl-scope->scopeinfo-aux-correct (implies (stringp name) (equal (vl-scopeinfo-find-item name (vl-scope->scopeinfo-aux scope design) design) (vl-scope-find-item name scope design))))
Theorem:
(defthm vl-scope->scopeinfo-aux-of-vl-scope-fix-scope (equal (vl-scope->scopeinfo-aux (vl-scope-fix scope) design) (vl-scope->scopeinfo-aux scope design)))
Theorem:
(defthm vl-scope->scopeinfo-aux-vl-scope-equiv-congruence-on-scope (implies (vl-scope-equiv scope scope-equiv) (equal (vl-scope->scopeinfo-aux scope design) (vl-scope->scopeinfo-aux scope-equiv design))) :rule-classes :congruence)
Theorem:
(defthm vl-scope->scopeinfo-aux-of-vl-maybe-design-fix-design (equal (vl-scope->scopeinfo-aux scope (vl-maybe-design-fix design)) (vl-scope->scopeinfo-aux scope design)))
Theorem:
(defthm vl-scope->scopeinfo-aux-vl-maybe-design-equiv-congruence-on-design (implies (vl-maybe-design-equiv design design-equiv) (equal (vl-scope->scopeinfo-aux scope design) (vl-scope->scopeinfo-aux scope design-equiv))) :rule-classes :congruence)