Pretty-print an integer constant.
If the constant is unsigned, we print the uppercase
Function:
(defun pprint-iconst (c) (declare (xargs :guard (iconstp c))) (let ((__function__ 'pprint-iconst)) (declare (ignorable __function__)) (b* (((iconst c) c)) (msg "~@0~@1~@2" (iconst-base-case c.base :dec (pprint-dec-const c.value) :oct (pprint-oct-const c.value) :hex (pprint-hex-const c.value)) (if c.unsignedp "U" "") (pprint-iconst-length c.length)))))
Theorem:
(defthm msgp-of-pprint-iconst (b* ((part (pprint-iconst c))) (msgp part)) :rule-classes :rewrite)
Theorem:
(defthm pprint-iconst-of-iconst-fix-c (equal (pprint-iconst (iconst-fix c)) (pprint-iconst c)))
Theorem:
(defthm pprint-iconst-iconst-equiv-congruence-on-c (implies (iconst-equiv c c-equiv) (equal (pprint-iconst c) (pprint-iconst c-equiv))) :rule-classes :congruence)