• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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-restore-and-calls-in-term
                  • 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-pre-translation

Atj-pre-translation-conjunctions

Pre-translation step performed by ATJ: replacement of (if a b nil) calls with and calls.

This is done in the shallow embedding.

ACL2 turns untranslated calls of the form (and a b) into translated calls of the form (if a b nil). This pre-translation step performs the inverse transformation, so that the ACL2-to-Java translation step can more readily recognize this kind of calls and treat them specially.

Note that this pre-translation step turns (if a b nil) into (and a b) even when the original untranslated term was (if a b nil). But this is harmelss, as the two untranslated terms are equivalent.

Subtopics

Atj-restore-and-calls-in-term
Restore and calls in a translated term.