(vl-ansi-portdecl-consistency-check x) → warnings
Function:
(defun vl-ansi-portdecl-consistency-check (x) (declare (xargs :guard (vl-ansi-portdecl-p x))) (let ((__function__ 'vl-ansi-portdecl-consistency-check)) (declare (ignorable __function__)) (b* (((vl-ansi-portdecl x) (vl-ansi-portdecl-fix x)) (warnings nil) (warnings (if (and x.typename (or x.type x.signedness x.pdims)) (warn :type :vl-ansi-portdecl-programming-error :msg "~a0: If there is a typename there shouldn't ~ be type, signedness, or pdims." :args (list x)) warnings)) (warnings (if (and x.type (or x.signedness x.pdims)) (warn :type :vl-ansi-portdecl-programming-error :msg "~a0: If there is an explicit datatype there ~ shouldn't be signedness or pdims." :args (list x)) warnings)) (warnings (if (and x.modport (not x.typename)) (warn :type :vl-ansi-portdecl-programming-error :msg "~a0: If there is a modport there should be a ~ typename." :args (list x)) warnings)) (warnings (if (and x.modport (or x.varp x.dir x.nettype)) (warn :type :vl-ansi-portdecl-programming-error :msg "~a0: If there is a modport there shouldn't ~ be a direction or nettype or the var keyword." :args (list x)) warnings))) warnings)))
Theorem:
(defthm vl-warninglist-p-of-vl-ansi-portdecl-consistency-check (b* ((warnings (vl-ansi-portdecl-consistency-check x))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-ansi-portdecl-consistency-check-of-vl-ansi-portdecl-fix-x (equal (vl-ansi-portdecl-consistency-check (vl-ansi-portdecl-fix x)) (vl-ansi-portdecl-consistency-check x)))
Theorem:
(defthm vl-ansi-portdecl-consistency-check-vl-ansi-portdecl-equiv-congruence-on-x (implies (vl-ansi-portdecl-equiv x x-equiv) (equal (vl-ansi-portdecl-consistency-check x) (vl-ansi-portdecl-consistency-check x-equiv))) :rule-classes :congruence)