Look up a plain identifier to find a package in a scope.
(vl-scope-find-package name scope) → package
Function:
(defun vl-scope-find-package (name scope) (declare (xargs :guard (and (stringp name) (vl-scope-p scope)))) (let ((__function__ 'vl-scope-find-package)) (declare (ignorable __function__)) (b* ((scope (vl-scope-fix scope))) (case (tag scope) (:vl-design (vl-design-scope-find-package name scope)) (otherwise nil)))))
Theorem:
(defthm return-type-of-vl-scope-find-package (b* ((package (vl-scope-find-package name scope))) (iff (vl-package-p package) package)) :rule-classes :rewrite)
Theorem:
(defthm vl-scope-find-package-of-str-fix-name (equal (vl-scope-find-package (str-fix name) scope) (vl-scope-find-package name scope)))
Theorem:
(defthm vl-scope-find-package-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-scope-find-package name scope) (vl-scope-find-package name-equiv scope))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-find-package-of-vl-scope-fix-scope (equal (vl-scope-find-package name (vl-scope-fix scope)) (vl-scope-find-package name scope)))
Theorem:
(defthm vl-scope-find-package-vl-scope-equiv-congruence-on-scope (implies (vl-scope-equiv scope scope-equiv) (equal (vl-scope-find-package name scope) (vl-scope-find-package name scope-equiv))) :rule-classes :congruence)