Print a unary operator.
Function:
(defun print-unop (op pstate) (declare (xargs :guard (and (unopp op) (pristatep pstate)))) (let ((__function__ 'print-unop)) (declare (ignorable __function__)) (unop-case op :address (print-astring "&" pstate) :indir (print-astring "*" pstate) :plus (print-astring "+" pstate) :minus (print-astring "-" pstate) :bitnot (print-astring "~" pstate) :lognot (print-astring "!" pstate) :preinc (print-astring "++" pstate) :predec (print-astring "--" pstate) :postinc (print-astring "++" pstate) :postdec (print-astring "--" pstate) :sizeof (print-astring "sizeof" pstate))))
Theorem:
(defthm pristatep-of-print-unop (b* ((new-pstate (print-unop op pstate))) (pristatep new-pstate)) :rule-classes :rewrite)
Theorem:
(defthm print-unop-of-unop-fix-op (equal (print-unop (unop-fix op) pstate) (print-unop op pstate)))
Theorem:
(defthm print-unop-unop-equiv-congruence-on-op (implies (unop-equiv op op-equiv) (equal (print-unop op pstate) (print-unop op-equiv pstate))) :rule-classes :congruence)
Theorem:
(defthm print-unop-of-pristate-fix-pstate (equal (print-unop op (pristate-fix pstate)) (print-unop op pstate)))
Theorem:
(defthm print-unop-pristate-equiv-congruence-on-pstate (implies (pristate-equiv pstate pstate-equiv) (equal (print-unop op pstate) (print-unop op pstate-equiv))) :rule-classes :congruence)