Look up a plain identifier in the current scope stack.
(vl-scopestack-find-item/ss/package name ss) → (mv item item-ss context-ss pkg-name)
Function:
(defun vl-scopestack-find-item/ss/package (name ss) (declare (xargs :guard (and (stringp name) (vl-scopestack-p ss)))) (let ((__function__ 'vl-scopestack-find-item/ss/package)) (declare (ignorable __function__)) (b* (((mv item context-ss pkg-name) (vl-scopestack-find-item/context name ss)) ((unless pkg-name) (mv item context-ss context-ss nil)) (design (vl-scopestack->design context-ss)) (pkg (and design (cdr (hons-get pkg-name (vl-design-scope-package-alist-top design))))) ((unless pkg) (mv item nil context-ss pkg-name)) (pkg-ss (vl-scopestack-push pkg (vl-scopestack-init design)))) (mv item pkg-ss context-ss pkg-name))))
Theorem:
(defthm return-type-of-vl-scopestack-find-item/ss/package.item (b* (((mv ?item ?item-ss ?context-ss ?pkg-name) (vl-scopestack-find-item/ss/package name ss))) (iff (vl-scopeitem-p item) item)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopestack-p-of-vl-scopestack-find-item/ss/package.item-ss (b* (((mv ?item ?item-ss ?context-ss ?pkg-name) (vl-scopestack-find-item/ss/package name ss))) (vl-scopestack-p item-ss)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopestack-p-of-vl-scopestack-find-item/ss/package.context-ss (b* (((mv ?item ?item-ss ?context-ss ?pkg-name) (vl-scopestack-find-item/ss/package name ss))) (vl-scopestack-p context-ss)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-scopestack-find-item/ss/package.pkg-name (b* (((mv ?item ?item-ss ?context-ss ?pkg-name) (vl-scopestack-find-item/ss/package name ss))) (iff (stringp pkg-name) pkg-name)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopestack-find-item/ss/package-of-str-fix-name (equal (vl-scopestack-find-item/ss/package (str-fix name) ss) (vl-scopestack-find-item/ss/package name ss)))
Theorem:
(defthm vl-scopestack-find-item/ss/package-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-scopestack-find-item/ss/package name ss) (vl-scopestack-find-item/ss/package name-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-scopestack-find-item/ss/package-of-vl-scopestack-fix-ss (equal (vl-scopestack-find-item/ss/package name (vl-scopestack-fix ss)) (vl-scopestack-find-item/ss/package name ss)))
Theorem:
(defthm vl-scopestack-find-item/ss/package-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-scopestack-find-item/ss/package name ss) (vl-scopestack-find-item/ss/package name ss-equiv))) :rule-classes :congruence)