• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • 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-pre-translation-array-analysis
                  • Atj-pre-translation-type-annotation
                  • Atj-pre-translation-var-reuse
                  • Atj-pre-translate
                  • Atj-pre-translation-multiple-values
                  • Atj-pre-translation-no-aij-types-analysis
                  • Atj-pre-translation-var-renaming
                  • Atj-pre-translation-remove-return-last
                  • Atj-pre-translation-disjunctions
                  • Atj-pre-translation-trivial-vars
                  • Atj-pre-translation-conjunctions
                  • Atj-pre-translation-unused-vars
                  • Atj-pre-translation-remove-dead-if-branches
                • 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-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-code-generation

Atj-pre-translation

Pre-translation performed by ATJ, as part of code generation.

As mentioned in atj-code-generation, prior to generating Java code, ATJ performs an ACL2-to-ACL2 pre-translation. Currently, this pre-translation consists of the following steps. The first three steps apply to both the deep and the shallow embedding; the others apply only to the shallow embedding.

  1. We remove return-last. See atj-pre-translation-remove-return-last.
  2. We remove dead if branches. See atj-pre-translation-remove-dead-if-branches.
  3. We remove the unused lambda-bound variables. See atj-pre-translation-unused-vars.
  4. We remove the trivial lambda-bound variables. See atj-pre-translation-trivial-vars.
  5. We replace list calls with mv calls in functions that return multiple results. See atj-pre-translation-multiple-values.
  6. We check (on the ACL2 code translated to Java) that the generated Java code does not use AIJ types. See atj-pre-translation-no-aij-types-analysis.
  7. We annotate terms with ATJ type information. See atj-pre-translation-type-annotation.
  8. We perform a single-threadedness analysis of the Java primitive arrays, but only if :guards is t. See atj-pre-translation-array-analysis.
  9. We mark the lambda-bound variables that can be reused and destructively updated in Java. See atj-pre-translation-var-reuse.
  10. We rename variables so that their names are valid Java variable names and so that different variables with the same name are renamed apart, unless they have been marked for reuse in the previous step. See atj-pre-translation-var-renaming.
  11. We replace calls of the form (if a b nil) with calls of the form (and a b). See atj-pre-translation-conjunctions.
  12. We replace calls of the form (if a a b) with calls of the form (or a b). See atj-pre-translation-disjunctions.

Subtopics

Atj-pre-translation-array-analysis
Pre-translation step performed by ATJ: single-threadedness analysis of Java primitive arrays.
Atj-pre-translation-type-annotation
Pre-translation step performed by ATJ: addition of type annotations.
Atj-pre-translation-var-reuse
Pre-translation step performed by ATJ: marking of reusable lambda-bound variables.
Atj-pre-translate
Pre-translate the formal parameters and body of an ACL2 function definition.
Atj-pre-translation-multiple-values
Pre-translation step performed by ATJ: replacement of list calls with mv calls.
Atj-pre-translation-no-aij-types-analysis
Pre-translation step performed by ATJ: analysis for the :no-aij-types option.
Atj-pre-translation-var-renaming
Pre-translation step performed by ATJ: renaming of the ACL2 variables.
Atj-pre-translation-remove-return-last
Pre-translation step performed by ATJ: removal of return-last.
Atj-pre-translation-disjunctions
Pre-translation step performed by ATJ: replacement of (if a a b) calls with or calls.
Atj-pre-translation-trivial-vars
Pre-translation step performed by ATJ: removal of all the trivial lambda-bound variables.
Atj-pre-translation-conjunctions
Pre-translation step performed by ATJ: replacement of (if a b nil) calls with and calls.
Atj-pre-translation-unused-vars
Pre-translation step performed by ATJ: removal of all the unused lambda-bound variables.
Atj-pre-translation-remove-dead-if-branches
Pre-translation step performed by ATJ: removal of dead if branches.