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