• 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-gen-everything
                • Atj-name-translation
                • Atj-gen-test-cunit
                • Atj-gen-test-class
                • Atj-gen-main-file
                • Atj-post-translation
                  • Atj-post-translation-remove-array-write-calls
                  • Atj-post-translation-cache-const-methods
                  • Atj-post-translation-tailrec-elimination
                  • Atj-post-translation-fold-returns
                  • Atj-post-translate-body
                  • Atj-post-translation-lift-loop-tests
                  • Atj-post-translation-simplify-conds
                  • Atj-post-translate-jcbody-elements
                  • Atj-post-translation-remove-continue
                • 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-post-translation

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

As mentioned in atj-code-generation, after translating ACL2 to Java, ATJ performs a Java-to-Java post-translation. Currently, this post-translation consists of the following steps. These steps only apply to the shallow embedding approach.

  1. We fold return statements into if branches. See here.
  2. We eliminate tail recursions, replacing them with loops. See here.
  3. We lift tests from conditionals to loops. See here.
  4. We eliminate unnecessary continues from loops. See here.
  5. We eliminate calls of the Java primitive array writing methods. See here.
  6. We simplify conditional expressions with true or false tests. See here.

Subtopics

Atj-post-translation-remove-array-write-calls
Post-translation step: remove calls of the array writing methods.
Atj-post-translation-cache-const-methods
Post-translation step: cache constant methods in static final fields.
Atj-post-translation-tailrec-elimination
Post-translation step: eliminate tail recursions in favor of loops.
Atj-post-translation-fold-returns
Post-translation step: folding of returns into ifs.
Atj-post-translate-body
Post-translate a Java method body generated from an ACL2 function.
Atj-post-translation-lift-loop-tests
Post-translation step: lifting to loop tests.
Atj-post-translation-simplify-conds
Post-translation step: simplify conditional expressions.
Atj-post-translate-jcbody-elements
Post-translate a list of Java class body elements.
Atj-post-translation-remove-continue
Post-translation step: remove unnecessary continue statements.