Print an attribute name.
(print-attrib-name attrname pstate) → new-pstate
Function:
(defun print-attrib-name (attrname pstate) (declare (xargs :guard (and (attrib-namep attrname) (pristatep pstate)))) (declare (xargs :guard (attrib-name-aidentp attrname (pristate->gcc pstate)))) (let ((__function__ 'print-attrib-name)) (declare (ignorable __function__)) (attrib-name-case attrname :ident (print-ident attrname.unwrap pstate) :keyword (b* ((chars (acl2::string=>nats attrname.unwrap)) ((unless (grammar-character-listp chars)) (raise "Misusage error: ~ the attribute name keyword consists of ~ the character codes ~x0, ~ not all of which are allowed by the ABNF grammar." chars) (pristate-fix pstate))) (print-astring attrname.unwrap pstate)))))
Theorem:
(defthm pristatep-of-print-attrib-name (b* ((new-pstate (print-attrib-name attrname pstate))) (pristatep new-pstate)) :rule-classes :rewrite)
Theorem:
(defthm pristate->gcc-of-print-attrib-name (b* ((?new-pstate (print-attrib-name attrname pstate))) (equal (pristate->gcc new-pstate) (pristate->gcc pstate))))
Theorem:
(defthm print-attrib-name-of-attrib-name-fix-attrname (equal (print-attrib-name (attrib-name-fix attrname) pstate) (print-attrib-name attrname pstate)))
Theorem:
(defthm print-attrib-name-attrib-name-equiv-congruence-on-attrname (implies (attrib-name-equiv attrname attrname-equiv) (equal (print-attrib-name attrname pstate) (print-attrib-name attrname-equiv pstate))) :rule-classes :congruence)
Theorem:
(defthm print-attrib-name-of-pristate-fix-pstate (equal (print-attrib-name attrname (pristate-fix pstate)) (print-attrib-name attrname pstate)))
Theorem:
(defthm print-attrib-name-pristate-equiv-congruence-on-pstate (implies (pristate-equiv pstate pstate-equiv) (equal (print-attrib-name attrname pstate) (print-attrib-name attrname pstate-equiv))) :rule-classes :congruence)