• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
            • Atj-implementation
              • Atj-types
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
              • Atj-input-processing
              • Atj-java-pretty-printer
              • Atj-code-generation
                • Atj-gen-test-method
                • Atj-shallow-code-generation
                • Atj-common-code-generation
                • Atj-shallow-quoted-constant-generation
                • Atj-pre-translation
                • Atj-gen-everything
                • Atj-name-translation
                • Atj-gen-test-cunit
                • Atj-gen-test-class
                • Atj-gen-main-file
                • Atj-post-translation
                • Atj-deep-code-generation
                  • Atj-gen-deep-term-fns
                  • Atj-gen-deep-test-code
                  • Atj-gen-deep-fndef-method
                  • Atj-gen-deep-fnapp
                  • Atj-gen-deep-env-class
                  • Atj-gen-deep-env-cunit
                    • Atj-gen-deep-lambda
                    • Atj-gen-deep-qconst
                    • Atj-gen-deep-main-class
                    • Atj-gen-deep-term
                    • Atj-gen-deep-terms
                    • Atj-gen-deep-build-method
                    • Atj-gen-deep-call-method
                    • Atj-gen-deep-main-cunit
                    • Atj-gen-deep-fndef-method-name
                    • Atj-gen-deep-fndef-methods
                    • Atj-gen-deep-fndefs
                    • Atj-gen-deep-formals
                    • Atj-gen-deep-var
                  • Atj-gen-test-methods
                  • Atj-gen-test-file
                  • Atj-gen-env-file
                  • Atj-gen-output-subdir
                • Atj-java-primitives
                • Atj-java-primitive-arrays
                • Atj-type-macros
                • Atj-java-syntax-operations
                • Atj-fn
                • Atj-library-extensions
                • Atj-java-input-types
                • Atj-test-structures
                • Aij-notions
                • Atj-macro-definition
              • Atj-tutorial
            • Aij
            • Language
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Atj-deep-code-generation

    Atj-gen-deep-env-cunit

    Generate the Java compilation unit with the environment Java class, in the deep embedding approach.

    Signature
    (atj-gen-deep-env-cunit guards$ java-package$ java-class$ 
                            pkgs fns-to-translate verbose$ wrld) 
     
      → 
    cunit
    Arguments
    guards$ — Guard (booleanp guards$).
    java-package$ — Guard (maybe-stringp java-package$).
    java-class$ — Guard (stringp java-class$).
    pkgs — Guard (string-listp pkgs).
    fns-to-translate — Guard (symbol-listp fns-to-translate).
    verbose$ — Guard (booleanp verbose$).
    wrld — Guard (plist-worldp wrld).
    Returns
    cunit — Type (jcunitp cunit).

    The compilation unit imports all the AIJ public classes, since it needs to reference (at least some of) them. It also imports BigInteger, used to build certain quoted constants. It also imports List and ArrayList, used to build the packages' import lists.

    Definitions and Theorems

    Function: atj-gen-deep-env-cunit

    (defun atj-gen-deep-env-cunit
           (guards$ java-package$ java-class$
                    pkgs fns-to-translate verbose$ wrld)
     (declare (xargs :guard (and (booleanp guards$)
                                 (maybe-stringp java-package$)
                                 (stringp java-class$)
                                 (string-listp pkgs)
                                 (symbol-listp fns-to-translate)
                                 (booleanp verbose$)
                                 (plist-worldp wrld))))
     (let ((__function__ 'atj-gen-deep-env-cunit))
      (declare (ignorable __function__))
      (b*
       ((class
             (atj-gen-deep-env-class pkgs fns-to-translate
                                     guards$ java-class$ verbose$ wrld))
        ((run-when verbose$)
         (cw
          "~%Generate the Java compilation unit ~
                 to build the ACL2 environment.~%")))
       (make-jcunit
            :package? java-package$
            :imports (list (jimport nil (str::cat *aij-package* ".*"))
                           (jimport nil "java.math.BigInteger")
                           (jimport nil "java.util.ArrayList")
                           (jimport nil "java.util.List"))
            :types (list class)))))

    Theorem: jcunitp-of-atj-gen-deep-env-cunit

    (defthm jcunitp-of-atj-gen-deep-env-cunit
     (b*
      ((cunit
          (atj-gen-deep-env-cunit guards$ java-package$ java-class$
                                  pkgs fns-to-translate verbose$ wrld)))
      (jcunitp cunit))
     :rule-classes :rewrite)