Recognizes all expressions that can validly occur in a (possibly blank) port.
(vl-maybe-portexpr-p x) → okp
Function:
(defun vl-maybe-portexpr-p (x) (declare (xargs :guard (vl-maybe-expr-p x))) (let ((__function__ 'vl-maybe-portexpr-p)) (declare (ignorable __function__)) (b* ((x (vl-maybe-expr-fix x))) (or (not x) (vl-portexpr-p x)))))
Theorem:
(defthm booleanp-of-vl-maybe-portexpr-p (b* ((okp (vl-maybe-portexpr-p x))) (booleanp okp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-maybe-portexpr-p-when-nonnil (implies x (equal (vl-maybe-portexpr-p x) (vl-portexpr-p x))))
Theorem:
(defthm vl-maybe-portexpr-p-of-vl-maybe-expr-fix-x (equal (vl-maybe-portexpr-p (vl-maybe-expr-fix x)) (vl-maybe-portexpr-p x)))
Theorem:
(defthm vl-maybe-portexpr-p-vl-maybe-expr-equiv-congruence-on-x (implies (vl-maybe-expr-equiv x x-equiv) (equal (vl-maybe-portexpr-p x) (vl-maybe-portexpr-p x-equiv))) :rule-classes :congruence)