(vl-port-check-style x warnings) → warnings
Function:
(defun vl-port-check-style (x warnings) (declare (xargs :guard (and (vl-port-p x) (vl-warninglist-p warnings)))) (declare (xargs :guard (vl-port-wellformed-p x))) (let ((__function__ 'vl-port-check-style)) (declare (ignorable __function__)) (b* ((x (vl-port-fix x)) ((when (eq (tag x) :vl-interfaceport)) (ok)) ((vl-regularport x)) ((when (and x.name x.expr (vl-idexpr-p x.expr) (equal (vl-idexpr->name x.expr) x.name))) (ok)) ((when (not x.expr)) (if x.name (ok) (warn :type :vl-warn-port-style :msg "~a0: completely blank port without even a name. Is ~ this an accidental extra comma? If not, while blank ~ ports are legal, they will prevent you from ~ instantiating the module using named port connections. ~ Consider giving this port a name using syntax like ~ \".myportname()\" instead to avoid this." :args (list x)))) ((when (and (not x.name) (not (vl-idexpr-p x.expr)) (vl-atomicportexpr-p x.expr))) (warn :type :vl-warn-port-style :msg "~a0: the port expression ~a1 has a range. This is legal, ~ but means you can't connect the port by name, etc. It ~ would be better to move the range to the port's ~ input/output declaration, or (better yet) to use the more ~ modern \"ANSI\" syntax for combined port declarations." :args (list x x.expr)))) (warn :type :vl-warn-port-style :msg "~a0: port has complex expression ~s1" :args (list x (vl-pps-expr-elided x.expr))))))
Theorem:
(defthm vl-warninglist-p-of-vl-port-check-style (b* ((warnings (vl-port-check-style x warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-port-check-style-of-vl-port-fix-x (equal (vl-port-check-style (vl-port-fix x) warnings) (vl-port-check-style x warnings)))
Theorem:
(defthm vl-port-check-style-vl-port-equiv-congruence-on-x (implies (vl-port-equiv x x-equiv) (equal (vl-port-check-style x warnings) (vl-port-check-style x-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-port-check-style-of-vl-warninglist-fix-warnings (equal (vl-port-check-style x (vl-warninglist-fix warnings)) (vl-port-check-style x warnings)))
Theorem:
(defthm vl-port-check-style-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-port-check-style x warnings) (vl-port-check-style x warnings-equiv))) :rule-classes :congruence)