Check for undeclared wires in an arbitrary vl-blockitem-p, and
extends
(vl-blockitem-check-undeclared x st warnings) → (mv new-warnings new-st)
Function:
(defun vl-blockitem-check-undeclared (x st warnings) (declare (xargs :guard (and (vl-blockitem-p x) (vl-implicitst-p st) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-blockitem-check-undeclared)) (declare (ignorable __function__)) (b* ((x (vl-blockitem-fix x)) ((when (eq (tag x) :vl-import)) (vl-import-check-undeclared x st warnings)) ((mv name exprs) (case (tag x) (:vl-vardecl (mv (vl-vardecl->name x) (vl-vardecl-exprs-for-implicit-wires x))) (otherwise (mv (vl-paramdecl->name x) (vl-paramdecl-allexprs x))))) (used-names (vl-exprlist-varnames exprs)) (warnings (vl-warn-about-undeclared-wires x used-names st warnings)) (decls (hons-acons name nil (vl-implicitst->decls st))) (st (change-vl-implicitst st :decls decls))) (mv warnings st))))
Theorem:
(defthm vl-warninglist-p-of-vl-blockitem-check-undeclared.new-warnings (b* (((mv ?new-warnings ?new-st) (vl-blockitem-check-undeclared x st warnings))) (vl-warninglist-p new-warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-implicitst-p-of-vl-blockitem-check-undeclared.new-st (b* (((mv ?new-warnings ?new-st) (vl-blockitem-check-undeclared x st warnings))) (vl-implicitst-p new-st)) :rule-classes :rewrite)
Theorem:
(defthm vl-blockitem-check-undeclared-of-vl-blockitem-fix-x (equal (vl-blockitem-check-undeclared (vl-blockitem-fix x) st warnings) (vl-blockitem-check-undeclared x st warnings)))
Theorem:
(defthm vl-blockitem-check-undeclared-vl-blockitem-equiv-congruence-on-x (implies (vl-blockitem-equiv x x-equiv) (equal (vl-blockitem-check-undeclared x st warnings) (vl-blockitem-check-undeclared x-equiv st warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-blockitem-check-undeclared-of-vl-implicitst-fix-st (equal (vl-blockitem-check-undeclared x (vl-implicitst-fix st) warnings) (vl-blockitem-check-undeclared x st warnings)))
Theorem:
(defthm vl-blockitem-check-undeclared-vl-implicitst-equiv-congruence-on-st (implies (vl-implicitst-equiv st st-equiv) (equal (vl-blockitem-check-undeclared x st warnings) (vl-blockitem-check-undeclared x st-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-blockitem-check-undeclared-of-vl-warninglist-fix-warnings (equal (vl-blockitem-check-undeclared x st (vl-warninglist-fix warnings)) (vl-blockitem-check-undeclared x st warnings)))
Theorem:
(defthm vl-blockitem-check-undeclared-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-blockitem-check-undeclared x st warnings) (vl-blockitem-check-undeclared x st warnings-equiv))) :rule-classes :congruence)