Generate a shallowly embedded ACL2 call of a Java primitive unary operation.
(atj-gen-shallow-jprim-unop-call fn arg-block arg-expr src-types dst-types) → (mv block expr)
This is called only if
We generate a Java unary expression whose operator corresponds to the function.
Function:
(defun atj-gen-shallow-jprim-unop-call (fn arg-block arg-expr src-types dst-types) (declare (xargs :guard (and (atj-jprim-unop-fn-p fn) (jblockp arg-block) (jexprp arg-expr) (atj-type-listp src-types) (atj-type-listp dst-types)))) (declare (xargs :guard (and (consp src-types) (consp dst-types)))) (let ((__function__ 'atj-gen-shallow-jprim-unop-call)) (declare (ignorable __function__)) (b* ((unop (atj-jprim-unop-fn-to-junop fn)) (expr (jexpr-unary unop arg-expr)) (block (jblock-fix arg-block))) (mv block (atj-adapt-expr-to-type expr (atj-type-list-to-type src-types) (atj-type-list-to-type dst-types) t)))))
Theorem:
(defthm jblockp-of-atj-gen-shallow-jprim-unop-call.block (b* (((mv common-lisp::?block ?expr) (atj-gen-shallow-jprim-unop-call fn arg-block arg-expr src-types dst-types))) (jblockp block)) :rule-classes :rewrite)
Theorem:
(defthm jexprp-of-atj-gen-shallow-jprim-unop-call.expr (b* (((mv common-lisp::?block ?expr) (atj-gen-shallow-jprim-unop-call fn arg-block arg-expr src-types dst-types))) (jexprp expr)) :rule-classes :rewrite)