(vl-pp-repetition x &key (ps 'ps)) → ps
Function:
(defun vl-pp-repetition-fn (x ps) (declare (xargs :stobjs (ps))) (declare (xargs :guard (vl-repetition-p x))) (let ((__function__ 'vl-pp-repetition)) (declare (ignorable __function__)) (b* (((vl-repetition x))) (case x.type (:vl-repetition-consecutive (cond ((and (vl-expr-resolved-p x.left) (equal (vl-resolved->val x.left) 0) x.right (vl-expr-dollarsign-p x.right)) (vl-print "[*]")) ((and (vl-expr-resolved-p x.left) (equal (vl-resolved->val x.left) 1) x.right (vl-expr-dollarsign-p x.right)) (vl-print "[+]")) (t (vl-ps-seq (vl-print "[* ") (vl-pp-expr x.left) (if x.right (vl-ps-seq (vl-print ":") (vl-pp-expr x.right)) ps) (vl-print "]"))))) (:vl-repetition-goto (vl-ps-seq (vl-print "[-> ") (vl-pp-expr x.left) (if x.right (vl-ps-seq (vl-print ":") (vl-pp-expr x.right)) ps) (vl-print "]"))) (:vl-repetition-nonconsecutive (vl-ps-seq (vl-print "[= ") (vl-pp-expr x.left) (if x.right (vl-ps-seq (vl-print ":") (vl-pp-expr x.right)) ps) (vl-print "]"))) (otherwise (progn$ (impossible) ps))))))
Theorem:
(defthm vl-pp-repetition-fn-of-vl-repetition-fix-x (equal (vl-pp-repetition-fn (vl-repetition-fix x) ps) (vl-pp-repetition-fn x ps)))
Theorem:
(defthm vl-pp-repetition-fn-vl-repetition-equiv-congruence-on-x (implies (vl-repetition-equiv x x-equiv) (equal (vl-pp-repetition-fn x ps) (vl-pp-repetition-fn x-equiv ps))) :rule-classes :congruence)