Add fatal warnings about names that are used but not declared.
(vl-warn-about-undeclared-wires ctx names st warnings) → new-warnings
Function:
(defun vl-warn-about-undeclared-wires (ctx names st warnings) (declare (xargs :guard (and (vl-modelement-p ctx) (string-listp names) (vl-implicitst-p st) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-warn-about-undeclared-wires)) (declare (ignorable __function__)) (b* ((ctx (vl-modelement-fix ctx)) (undeclared (mergesort (vl-remove-declared-wires names st))) ((when (atom undeclared)) (ok))) (fatal :type :vl-warn-undeclared :msg (if (atom (cdr undeclared)) "~a0: identifier ~w1 is used but not yet declared." "~a0: identifiers ~&2 are used but not yet declared.") :args (list ctx (car undeclared) undeclared)))))
Theorem:
(defthm vl-warninglist-p-of-vl-warn-about-undeclared-wires (b* ((new-warnings (vl-warn-about-undeclared-wires ctx names st warnings))) (vl-warninglist-p new-warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-warn-about-undeclared-wires-of-vl-modelement-fix-ctx (equal (vl-warn-about-undeclared-wires (vl-modelement-fix ctx) names st warnings) (vl-warn-about-undeclared-wires ctx names st warnings)))
Theorem:
(defthm vl-warn-about-undeclared-wires-vl-modelement-equiv-congruence-on-ctx (implies (vl-modelement-equiv ctx ctx-equiv) (equal (vl-warn-about-undeclared-wires ctx names st warnings) (vl-warn-about-undeclared-wires ctx-equiv names st warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-warn-about-undeclared-wires-of-string-list-fix-names (equal (vl-warn-about-undeclared-wires ctx (string-list-fix names) st warnings) (vl-warn-about-undeclared-wires ctx names st warnings)))
Theorem:
(defthm vl-warn-about-undeclared-wires-string-list-equiv-congruence-on-names (implies (str::string-list-equiv names names-equiv) (equal (vl-warn-about-undeclared-wires ctx names st warnings) (vl-warn-about-undeclared-wires ctx names-equiv st warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-warn-about-undeclared-wires-of-vl-implicitst-fix-st (equal (vl-warn-about-undeclared-wires ctx names (vl-implicitst-fix st) warnings) (vl-warn-about-undeclared-wires ctx names st warnings)))
Theorem:
(defthm vl-warn-about-undeclared-wires-vl-implicitst-equiv-congruence-on-st (implies (vl-implicitst-equiv st st-equiv) (equal (vl-warn-about-undeclared-wires ctx names st warnings) (vl-warn-about-undeclared-wires ctx names st-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-warn-about-undeclared-wires-of-vl-warninglist-fix-warnings (equal (vl-warn-about-undeclared-wires ctx names st (vl-warninglist-fix warnings)) (vl-warn-about-undeclared-wires ctx names st warnings)))
Theorem:
(defthm vl-warn-about-undeclared-wires-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-warn-about-undeclared-wires ctx names st warnings) (vl-warn-about-undeclared-wires ctx names st warnings-equiv))) :rule-classes :congruence)