(vl-modport-portcheck x oknames warnings) → new-warnings
Function:
(defun vl-modport-portcheck (x oknames warnings) (declare (xargs :guard (and (vl-modport-p x) (string-listp oknames) (vl-warninglist-p warnings)))) (declare (xargs :guard (setp oknames))) (let ((__function__ 'vl-modport-portcheck)) (declare (ignorable __function__)) (b* ((oknames (string-list-fix oknames)) ((vl-modport x) (vl-modport-fix x)) (external-names (vl-modport-portlist->names x.ports)) (dupes (duplicated-members external-names)) ((when dupes) (fatal :type :vl-bad-modport :msg "~a0: Duplicated modport port names: ~&1." :args (list x dupes))) ((mv warnings internalnames) (vl-modport-portlist-check-wellformed x.ports x warnings nil)) (internalnames (mergesort internalnames)) (badnames (difference internalnames oknames)) ((when badnames) (fatal :type :vl-bad-modport :msg "~a0: Modport refers to unknown name~s1: ~&2." :args (list x (if (vl-plural-p badnames) "s" "") badnames)))) (ok))))
Theorem:
(defthm vl-warninglist-p-of-vl-modport-portcheck (b* ((new-warnings (vl-modport-portcheck x oknames warnings))) (vl-warninglist-p new-warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-modport-portcheck-of-vl-modport-fix-x (equal (vl-modport-portcheck (vl-modport-fix x) oknames warnings) (vl-modport-portcheck x oknames warnings)))
Theorem:
(defthm vl-modport-portcheck-vl-modport-equiv-congruence-on-x (implies (vl-modport-equiv x x-equiv) (equal (vl-modport-portcheck x oknames warnings) (vl-modport-portcheck x-equiv oknames warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modport-portcheck-of-string-list-fix-oknames (equal (vl-modport-portcheck x (string-list-fix oknames) warnings) (vl-modport-portcheck x oknames warnings)))
Theorem:
(defthm vl-modport-portcheck-string-list-equiv-congruence-on-oknames (implies (str::string-list-equiv oknames oknames-equiv) (equal (vl-modport-portcheck x oknames warnings) (vl-modport-portcheck x oknames-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modport-portcheck-of-vl-warninglist-fix-warnings (equal (vl-modport-portcheck x oknames (vl-warninglist-fix warnings)) (vl-modport-portcheck x oknames warnings)))
Theorem:
(defthm vl-modport-portcheck-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-modport-portcheck x oknames warnings) (vl-modport-portcheck x oknames warnings-equiv))) :rule-classes :congruence)