(vl-interface-check-modinst-is-subinterface x ss warnings) → new-warnings
Function:
(defun vl-interface-check-modinst-is-subinterface (x ss warnings) (declare (xargs :guard (and (vl-modinst-p x) (vl-scopestack-p ss) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-interface-check-modinst-is-subinterface)) (declare (ignorable __function__)) (b* (((vl-modinst x) (vl-modinst-fix x)) (def (vl-scopestack-find-definition x.modname ss)) ((unless def) (fatal :type :vl-interface-instance-undefined :msg "~a0 refers to undefined interface ~m1." :args (list x x.modname))) ((unless (mbe :logic (vl-interface-p def) :exec (eq (tag def) :vl-interface))) (fatal :type :vl-interface-instantiates-noninterface :msg "~a0: can't instantiate ~s1 within an interface ~ (interfaces can instantiate other interfaces, but can't ~ have ~s2 instances.)" :args (list x x.modname (case (tag def) (:vl-module "submodule") (:vl-udp "primitive") (:vl-program "program") (:vl-class "class") (otherwise (impossible))))))) (ok))))
Theorem:
(defthm vl-warninglist-p-of-vl-interface-check-modinst-is-subinterface (b* ((new-warnings (vl-interface-check-modinst-is-subinterface x ss warnings))) (vl-warninglist-p new-warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-interface-check-modinst-is-subinterface-of-vl-modinst-fix-x (equal (vl-interface-check-modinst-is-subinterface (vl-modinst-fix x) ss warnings) (vl-interface-check-modinst-is-subinterface x ss warnings)))
Theorem:
(defthm vl-interface-check-modinst-is-subinterface-vl-modinst-equiv-congruence-on-x (implies (vl-modinst-equiv x x-equiv) (equal (vl-interface-check-modinst-is-subinterface x ss warnings) (vl-interface-check-modinst-is-subinterface x-equiv ss warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-interface-check-modinst-is-subinterface-of-vl-scopestack-fix-ss (equal (vl-interface-check-modinst-is-subinterface x (vl-scopestack-fix ss) warnings) (vl-interface-check-modinst-is-subinterface x ss warnings)))
Theorem:
(defthm vl-interface-check-modinst-is-subinterface-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-interface-check-modinst-is-subinterface x ss warnings) (vl-interface-check-modinst-is-subinterface x ss-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-interface-check-modinst-is-subinterface-of-vl-warninglist-fix-warnings (equal (vl-interface-check-modinst-is-subinterface x ss (vl-warninglist-fix warnings)) (vl-interface-check-modinst-is-subinterface x ss warnings)))
Theorem:
(defthm vl-interface-check-modinst-is-subinterface-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-interface-check-modinst-is-subinterface x ss warnings) (vl-interface-check-modinst-is-subinterface x ss warnings-equiv))) :rule-classes :congruence)