(vl-funname-lookup x ss) → (mv err decl decl-ss elabpath)
Function:
(defun vl-funname-lookup (x ss) (declare (xargs :guard (and (vl-scopeexpr-p x) (vl-scopestack-p ss)))) (let ((__function__ 'vl-funname-lookup)) (declare (ignorable __function__)) (b* (((mv err trace ?context ?tail) (vl-follow-scopeexpr x ss)) ((when err) (mv err nil nil nil)) ((unless (vl-hidtrace-resolved-p trace)) (mv (vmsg "Function ~a0 has unresolved indices??" :args (list (vl-scopeexpr-fix x))) nil nil nil)) ((vl-hidstep lookup) (car trace)) ((unless (eq (tag lookup.item) :vl-fundecl)) (mv (vmsg "Function name ~a0 does not refer to a fundecl but instead ~ ~a1" :args (list (vl-scopeexpr-fix x) lookup.item)) nil nil nil))) (mv nil lookup.item lookup.ss lookup.elabpath))))
Theorem:
(defthm return-type-of-vl-funname-lookup.err (b* (((mv ?err ?decl ?decl-ss ?elabpath) (vl-funname-lookup x ss))) (iff (vl-msg-p err) err)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-funname-lookup.decl (b* (((mv ?err ?decl ?decl-ss ?elabpath) (vl-funname-lookup x ss))) (implies (not err) (vl-fundecl-p decl))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-funname-lookup.decl-ss (b* (((mv ?err ?decl ?decl-ss ?elabpath) (vl-funname-lookup x ss))) (implies (not err) (vl-scopestack-p decl-ss))) :rule-classes :rewrite)
Theorem:
(defthm vl-elabtraversal-p-of-vl-funname-lookup.elabpath (b* (((mv ?err ?decl ?decl-ss ?elabpath) (vl-funname-lookup x ss))) (vl-elabtraversal-p elabpath)) :rule-classes :rewrite)
Theorem:
(defthm vl-funname-lookup-of-vl-scopeexpr-fix-x (equal (vl-funname-lookup (vl-scopeexpr-fix x) ss) (vl-funname-lookup x ss)))
Theorem:
(defthm vl-funname-lookup-vl-scopeexpr-equiv-congruence-on-x (implies (vl-scopeexpr-equiv x x-equiv) (equal (vl-funname-lookup x ss) (vl-funname-lookup x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-funname-lookup-of-vl-scopestack-fix-ss (equal (vl-funname-lookup x (vl-scopestack-fix ss)) (vl-funname-lookup x ss)))
Theorem:
(defthm vl-funname-lookup-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-funname-lookup x ss) (vl-funname-lookup x ss-equiv))) :rule-classes :congruence)