Pretty-print a binary operator.
Function:
(defun print-jbinop (binop) (declare (xargs :guard (jbinopp binop))) (let ((__function__ 'print-jbinop)) (declare (ignorable __function__)) (jbinop-case binop :mul "*" :div "/" :rem "%" :add "+" :sub "-" :shl "<<" :sshr ">>" :ushr ">>>" :lt "<" :gt ">" :le "<=" :ge ">=" :eq "==" :ne "!=" :and "&" :xor "^" :ior "|" :condand "&&" :condor "||" :asg "=" :asg-mul "*=" :asg-div "/=" :asg-rem "%=" :asg-add "+=" :asg-sub "-=" :asg-shl "<<=" :asg-sshr ">>=" :asg-ushr ">>>=" :asg-and "&=" :asg-xor "^=" :asg-ior "|=")))
Theorem:
(defthm msgp-of-print-jbinop (b* ((part (print-jbinop binop))) (msgp part)) :rule-classes :rewrite)