Recognize non-concatenations that can occur in port expressions.
Function:
(defun vl-atomicportexpr-p (x) (declare (xargs :guard (vl-expr-p x))) (let ((__function__ 'vl-atomicportexpr-p)) (declare (ignorable __function__)) (b* (((when (vl-fast-atom-p x)) (vl-idexpr-p x)) ((vl-nonatom x)) ((when (and (or (eq x.op :vl-bitselect) (eq x.op :vl-index)))) (vl-idexpr-p (first x.args))) ((when (and (or (eq x.op :vl-select-colon) (eq x.op :vl-partselect-colon)))) (vl-idexpr-p (first x.args)))) nil)))
Theorem:
(defthm booleanp-of-vl-atomicportexpr-p (b* ((okp (vl-atomicportexpr-p x))) (booleanp okp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-atomicportexpr-p-of-vl-expr-fix-x (equal (vl-atomicportexpr-p (vl-expr-fix x)) (vl-atomicportexpr-p x)))
Theorem:
(defthm vl-atomicportexpr-p-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-atomicportexpr-p x) (vl-atomicportexpr-p x-equiv))) :rule-classes :congruence)