Build a Java expression to access a field.
In the Java grammar,
not all expressions that access fields
can be derived from
Function:
(defun jexpr-get-field (expr name) (declare (xargs :guard (and (jexprp expr) (stringp name)))) (let ((__function__ 'jexpr-get-field)) (declare (ignorable __function__)) (if (jexpr-case expr :name) (jexpr-name (str::cat (jexpr-name->get expr) "." name)) (jexpr-field expr name))))
Theorem:
(defthm jexprp-of-jexpr-get-field (b* ((get-field-expr (jexpr-get-field expr name))) (jexprp get-field-expr)) :rule-classes :rewrite)