(vl-vardecl-is-really-interfaceport x ss) → (mv warnings ifport)
Function:
(defun vl-vardecl-is-really-interfaceport (x ss) (declare (xargs :guard (and (vl-vardecl-p x) (vl-scopestack-p ss)))) (let ((__function__ 'vl-vardecl-is-really-interfaceport)) (declare (ignorable __function__)) (b* (((vl-vardecl x) (vl-vardecl-fix x)) (warnings nil) ((when (or x.varp x.nettype (not (vl-datatype-case x.type :vl-usertype)) (not (vl-idscope-p (vl-usertype->name x.type))) (consp (vl-datatype->pdims x.type)))) (mv warnings nil)) (typename (vl-idscope->name (vl-usertype->name x.type))) ((wmv warnings is-interface is-type :ctx x) (vl-name-is-interface-or-type typename ss)) (warnings (if (iff is-interface is-type) (fatal :type :vl-ambiguous-declaration :msg "~a0: Ambiguous whether this is a variable or ~ interfaceport declaration, because ~a1 is ~ ~s2 an interface ~s3 a type name." :args (if is-interface (list x typename "both" "and") (list x typename "neither" "nor"))) warnings))) (mv warnings (and is-interface (make-vl-interfaceport :name x.name :ifname typename :modport nil :udims (vl-datatype->udims x.type) :loc x.loc))))))
Theorem:
(defthm vl-warninglist-p-of-vl-vardecl-is-really-interfaceport.warnings (b* (((mv ?warnings ?ifport) (vl-vardecl-is-really-interfaceport x ss))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-vardecl-is-really-interfaceport.ifport (b* (((mv ?warnings ?ifport) (vl-vardecl-is-really-interfaceport x ss))) (iff (vl-interfaceport-p ifport) ifport)) :rule-classes :rewrite)
Theorem:
(defthm vl-vardecl-is-really-interfaceport-of-vl-vardecl-fix-x (equal (vl-vardecl-is-really-interfaceport (vl-vardecl-fix x) ss) (vl-vardecl-is-really-interfaceport x ss)))
Theorem:
(defthm vl-vardecl-is-really-interfaceport-vl-vardecl-equiv-congruence-on-x (implies (vl-vardecl-equiv x x-equiv) (equal (vl-vardecl-is-really-interfaceport x ss) (vl-vardecl-is-really-interfaceport x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-vardecl-is-really-interfaceport-of-vl-scopestack-fix-ss (equal (vl-vardecl-is-really-interfaceport x (vl-scopestack-fix ss)) (vl-vardecl-is-really-interfaceport x ss)))
Theorem:
(defthm vl-vardecl-is-really-interfaceport-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-vardecl-is-really-interfaceport x ss) (vl-vardecl-is-really-interfaceport x ss-equiv))) :rule-classes :congruence)