(vl-interface-basicsanity x ss) → new-x
Function:
(defun vl-interface-basicsanity (x ss) (declare (xargs :guard (and (vl-interface-p x) (vl-scopestack-p ss)))) (let ((__function__ 'vl-interface-basicsanity)) (declare (ignorable __function__)) (b* (((vl-interface x) (vl-interface-fix x)) (ss (vl-scopestack-push x ss)) (bad-warnings (vl-portlist-check-wellformed x.ports)) ((when bad-warnings) (change-vl-interface x :warnings (append bad-warnings x.warnings))) (warnings x.warnings) (warnings (vl-portlist-check-style x.ports warnings)) (decl-names (mergesort (vl-portdecllist->names x.portdecls))) (port-names (mergesort (vl-portlist->internalnames x.ports))) (warnings (if (subset decl-names port-names) warnings (fatal :type :vl-port-mismatch :msg "Port declarations for non-ports: ~&0." :args (list (difference decl-names port-names))))) (warnings (if (subset port-names decl-names) warnings (fatal :type :vl-port-mismatch :msg "Missing port declarations for ~&0." :args (list (difference port-names decl-names))))) (external-names (vl-portlist->names x.ports)) (dupes (duplicated-members (remove nil external-names))) (warnings (if (not dupes) warnings (fatal :type :vl-bad-ports :msg "Duplicate port names: ~&0." :args (list dupes)))) (oknames (mergesort (append (vl-portdecllist->names x.portdecls) (vl-vardecllist->names x.vardecls)))) (warnings (vl-modportlist-portcheck x.modports oknames warnings)) (warnings (vl-interface-check-modinsts-are-subinterfaces x.modinsts ss warnings))) (change-vl-interface x :warnings warnings))))
Theorem:
(defthm vl-interface-p-of-vl-interface-basicsanity (b* ((new-x (vl-interface-basicsanity x ss))) (vl-interface-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-interface-basicsanity-of-vl-interface-fix-x (equal (vl-interface-basicsanity (vl-interface-fix x) ss) (vl-interface-basicsanity x ss)))
Theorem:
(defthm vl-interface-basicsanity-vl-interface-equiv-congruence-on-x (implies (vl-interface-equiv x x-equiv) (equal (vl-interface-basicsanity x ss) (vl-interface-basicsanity x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-interface-basicsanity-of-vl-scopestack-fix-ss (equal (vl-interface-basicsanity x (vl-scopestack-fix ss)) (vl-interface-basicsanity x ss)))
Theorem:
(defthm vl-interface-basicsanity-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-interface-basicsanity x ss) (vl-interface-basicsanity x ss-equiv))) :rule-classes :congruence)