Find an item declaration and information about where it was declared.
(vl-scopestack-find-item/context name ss) → (mv item item-ss pkg-name)
Function:
(defun vl-scopestack-find-item/context (name ss) (declare (xargs :guard (and (stringp name) (vl-scopestack-p ss)))) (let ((__function__ 'vl-scopestack-find-item/context)) (declare (ignorable __function__)) (b* ((ss (vl-scopestack-fix ss))) (vl-scopestack-case ss :null (mv nil nil nil) :global (b* (((mv pkg-name item) (vl-scope-find-item-fast name ss.design ss.design))) (mv item (vl-scopestack-fix ss) pkg-name)) :local (b* ((design (vl-scopestack->design ss)) ((mv pkg-name item) (vl-scope-find-item-fast name ss.top design)) ((when (or pkg-name item)) (mv item ss pkg-name))) (vl-scopestack-find-item/context name ss.super))))))
Theorem:
(defthm return-type-of-vl-scopestack-find-item/context.item (b* (((mv ?item ?item-ss ?pkg-name) (vl-scopestack-find-item/context name ss))) (iff (vl-scopeitem-p item) item)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopestack-p-of-vl-scopestack-find-item/context.item-ss (b* (((mv ?item ?item-ss ?pkg-name) (vl-scopestack-find-item/context name ss))) (vl-scopestack-p item-ss)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-scopestack-find-item/context.pkg-name (b* (((mv ?item ?item-ss ?pkg-name) (vl-scopestack-find-item/context name ss))) (iff (stringp pkg-name) pkg-name)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopestack-find-item/context-of-str-fix-name (equal (vl-scopestack-find-item/context (str-fix name) ss) (vl-scopestack-find-item/context name ss)))
Theorem:
(defthm vl-scopestack-find-item/context-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-scopestack-find-item/context name ss) (vl-scopestack-find-item/context name-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-scopestack-find-item/context-of-vl-scopestack-fix-ss (equal (vl-scopestack-find-item/context name (vl-scopestack-fix ss)) (vl-scopestack-find-item/context name ss)))
Theorem:
(defthm vl-scopestack-find-item/context-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-scopestack-find-item/context name ss) (vl-scopestack-find-item/context name ss-equiv))) :rule-classes :congruence)