Pretty-printer for expressions.
(vl-pp-expr x &key (ps 'ps)) → ps
(vl-pp-expr x &key (ps 'ps)) pretty-prints the expression
Originally we defensively introduced parens around every operator. But that was kind of ugly. Now each operator is responsible for putting parens around its arguments, if necessary.
Theorem:
(defthm vl-pp-expr-fn-of-vl-expr-fix-x (equal (vl-pp-expr-fn (vl-expr-fix x) ps) (vl-pp-expr-fn x ps)))
Theorem:
(defthm vl-pp-atts-aux-fn-of-vl-atts-fix-x (equal (vl-pp-atts-aux-fn (vl-atts-fix x) ps) (vl-pp-atts-aux-fn x ps)))
Theorem:
(defthm vl-pp-atts-fn-of-vl-atts-fix-x (equal (vl-pp-atts-fn (vl-atts-fix x) ps) (vl-pp-atts-fn x ps)))
Theorem:
(defthm vl-pp-exprlist-fn-of-vl-exprlist-fix-x (equal (vl-pp-exprlist-fn (vl-exprlist-fix x) ps) (vl-pp-exprlist-fn x ps)))
Theorem:
(defthm vl-pp-expr-fn-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-pp-expr-fn x ps) (vl-pp-expr-fn x-equiv ps))) :rule-classes :congruence)
Theorem:
(defthm vl-pp-atts-aux-fn-vl-atts-equiv-congruence-on-x (implies (vl-atts-equiv x x-equiv) (equal (vl-pp-atts-aux-fn x ps) (vl-pp-atts-aux-fn x-equiv ps))) :rule-classes :congruence)
Theorem:
(defthm vl-pp-atts-fn-vl-atts-equiv-congruence-on-x (implies (vl-atts-equiv x x-equiv) (equal (vl-pp-atts-fn x ps) (vl-pp-atts-fn x-equiv ps))) :rule-classes :congruence)
Theorem:
(defthm vl-pp-exprlist-fn-vl-exprlist-equiv-congruence-on-x (implies (vl-exprlist-equiv x x-equiv) (equal (vl-pp-exprlist-fn x ps) (vl-pp-exprlist-fn x-equiv ps))) :rule-classes :congruence)