Generate all the overloaded Java methods for an ACL2 function natively implemented in AIJ or for an ACL2 function definition.
(atj-gen-shallow-fn-methods fn fns-that-may-throw qconsts pkg-class-names fn-method-names mv-typess guards$ no-aij-types$ verbose$ wrld) → (mv methods new-qconsts new-mv-typess)
We also add all the quoted constants to the collection. The collection does not change for native functions.
Function:
(defun atj-gen-shallow-fn-methods (fn fns-that-may-throw qconsts pkg-class-names fn-method-names mv-typess guards$ no-aij-types$ verbose$ wrld) (declare (xargs :guard (and (symbolp fn) (symbol-listp fns-that-may-throw) (atj-qconstants-p qconsts) (string-string-alistp pkg-class-names) (symbol-string-alistp fn-method-names) (atj-type-list-listp mv-typess) (booleanp guards$) (booleanp no-aij-types$) (booleanp verbose$) (plist-worldp wrld)))) (declare (xargs :guard (cons-listp mv-typess))) (let ((__function__ 'atj-gen-shallow-fn-methods)) (declare (ignorable __function__)) (if (aij-nativep fn) (mv (atj-gen-shallow-fnnative-all-methods fn fns-that-may-throw pkg-class-names fn-method-names guards$ verbose$ wrld) qconsts mv-typess) (atj-gen-shallow-fndef-all-methods fn fns-that-may-throw qconsts pkg-class-names fn-method-names mv-typess guards$ no-aij-types$ verbose$ wrld))))
Theorem:
(defthm jmethod-listp-of-atj-gen-shallow-fn-methods.methods (b* (((mv ?methods ?new-qconsts ?new-mv-typess) (atj-gen-shallow-fn-methods fn fns-that-may-throw qconsts pkg-class-names fn-method-names mv-typess guards$ no-aij-types$ verbose$ wrld))) (jmethod-listp methods)) :rule-classes :rewrite)
Theorem:
(defthm atj-qconstants-p-of-atj-gen-shallow-fn-methods.new-qconsts (implies (atj-qconstants-p qconsts) (b* (((mv ?methods ?new-qconsts ?new-mv-typess) (atj-gen-shallow-fn-methods fn fns-that-may-throw qconsts pkg-class-names fn-method-names mv-typess guards$ no-aij-types$ verbose$ wrld))) (atj-qconstants-p new-qconsts))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-atj-gen-shallow-fn-methods.new-mv-typess (implies (and (atj-type-list-listp mv-typess) (cons-listp mv-typess)) (b* (((mv ?methods ?new-qconsts ?new-mv-typess) (atj-gen-shallow-fn-methods fn fns-that-may-throw qconsts pkg-class-names fn-method-names mv-typess guards$ no-aij-types$ verbose$ wrld))) (and (atj-type-list-listp new-mv-typess) (cons-listp new-mv-typess)))) :rule-classes :rewrite)