(vl-import-check-undeclared x st warnings) → (mv new-warnings new-st)
Function:
(defun vl-import-check-undeclared (x st warnings) (declare (xargs :guard (and (vl-import-p x) (vl-implicitst-p st) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-import-check-undeclared)) (declare (ignorable __function__)) (b* (((vl-import x) (vl-import-fix x)) (package (vl-scopestack-find-package x.pkg (vl-implicitst->ss st))) (warnings (if package (ok) (fatal :type :vl-bad-import :msg "~a0: trying to import from undefined package ~s1." :args (list x x.pkg)))) (imports (vl-implicitst->imports st)) (imports (if (eq x.part :vl-import*) (hons-shrink-alist (and package (vl-package-scope-item-alist-top package)) imports) (hons-acons (the string x.part) t imports))) (st (change-vl-implicitst st :imports imports))) (mv warnings st))))
Theorem:
(defthm vl-warninglist-p-of-vl-import-check-undeclared.new-warnings (b* (((mv ?new-warnings ?new-st) (vl-import-check-undeclared x st warnings))) (vl-warninglist-p new-warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-implicitst-p-of-vl-import-check-undeclared.new-st (b* (((mv ?new-warnings ?new-st) (vl-import-check-undeclared x st warnings))) (vl-implicitst-p new-st)) :rule-classes :rewrite)
Theorem:
(defthm vl-import-check-undeclared-of-vl-import-fix-x (equal (vl-import-check-undeclared (vl-import-fix x) st warnings) (vl-import-check-undeclared x st warnings)))
Theorem:
(defthm vl-import-check-undeclared-vl-import-equiv-congruence-on-x (implies (vl-import-equiv x x-equiv) (equal (vl-import-check-undeclared x st warnings) (vl-import-check-undeclared x-equiv st warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-import-check-undeclared-of-vl-implicitst-fix-st (equal (vl-import-check-undeclared x (vl-implicitst-fix st) warnings) (vl-import-check-undeclared x st warnings)))
Theorem:
(defthm vl-import-check-undeclared-vl-implicitst-equiv-congruence-on-st (implies (vl-implicitst-equiv st st-equiv) (equal (vl-import-check-undeclared x st warnings) (vl-import-check-undeclared x st-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-import-check-undeclared-of-vl-warninglist-fix-warnings (equal (vl-import-check-undeclared x st (vl-warninglist-fix warnings)) (vl-import-check-undeclared x st warnings)))
Theorem:
(defthm vl-import-check-undeclared-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-import-check-undeclared x st warnings) (vl-import-check-undeclared x st warnings-equiv))) :rule-classes :congruence)