Fixtype of Java unqualified method identifiers.
The grammar rule for
Accordingly, we model Java unqualified method identifiers as
regular identifiers
(the kinds used in most contexts, not in module-related contexts)
that differ from the Unicode sequence for
Function:
(defun umidentifierp (x) (declare (xargs :guard t)) (let ((__function__ 'umidentifierp)) (declare (ignorable __function__)) (and (identifierp x) (not (equal x (string=>unicode "yield"))))))
Theorem:
(defthm booleanp-of-umidentifierp (b* ((yes/no (umidentifierp x))) (booleanp yes/no)) :rule-classes :rewrite)
Function:
(defun umidentifier-fix (x) (declare (xargs :guard (umidentifierp x))) (mbe :logic (if (umidentifierp x) x (list (char-code #\$))) :exec x))
Theorem:
(defthm umidentifierp-of-umidentifier-fix (b* ((fixed-x (umidentifier-fix x))) (umidentifierp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm umidentifier-fix-when-umidentifierp (implies (umidentifierp x) (equal (umidentifier-fix x) x)))
Function:
(defun umidentifier-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (umidentifierp acl2::x) (umidentifierp acl2::y)))) (equal (umidentifier-fix acl2::x) (umidentifier-fix acl2::y)))
Theorem:
(defthm umidentifier-equiv-is-an-equivalence (and (booleanp (umidentifier-equiv x y)) (umidentifier-equiv x x) (implies (umidentifier-equiv x y) (umidentifier-equiv y x)) (implies (and (umidentifier-equiv x y) (umidentifier-equiv y z)) (umidentifier-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm umidentifier-equiv-implies-equal-umidentifier-fix-1 (implies (umidentifier-equiv acl2::x x-equiv) (equal (umidentifier-fix acl2::x) (umidentifier-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm umidentifier-fix-under-umidentifier-equiv (umidentifier-equiv (umidentifier-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-umidentifier-fix-1-forward-to-umidentifier-equiv (implies (equal (umidentifier-fix acl2::x) acl2::y) (umidentifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-umidentifier-fix-2-forward-to-umidentifier-equiv (implies (equal acl2::x (umidentifier-fix acl2::y)) (umidentifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm umidentifier-equiv-of-umidentifier-fix-1-forward (implies (umidentifier-equiv (umidentifier-fix acl2::x) acl2::y) (umidentifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm umidentifier-equiv-of-umidentifier-fix-2-forward (implies (umidentifier-equiv acl2::x (umidentifier-fix acl2::y)) (umidentifier-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)