(vl-streamexpr-with expr range) → expr-with-range
Function:
(defun vl-streamexpr-with (expr range) (declare (xargs :guard (and (vl-expr-p expr) (vl-erange-p range)))) (let ((__function__ 'vl-streamexpr-with)) (declare (ignorable __function__)) (b* (((vl-erange range) range)) (make-vl-streamexpr :expr expr :part (case range.type (:vl-index (vl-expr->arrayrange range.left)) (:vl-colon (vl-range->arrayrange (make-vl-range :msb range.left :lsb range.right))) (:vl-pluscolon (vl-plusminus->arrayrange (make-vl-plusminus :base range.left :width range.right :minusp nil))) (:vl-minuscolon (vl-plusminus->arrayrange (make-vl-plusminus :base range.left :width range.right :minusp t))))))))
Theorem:
(defthm vl-streamexpr-p-of-vl-streamexpr-with (b* ((expr-with-range (vl-streamexpr-with expr range))) (vl-streamexpr-p expr-with-range)) :rule-classes :rewrite)