• 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-java-primitives
                • Atj-jprim-deconstr-fn-to-ptype
                • Atj-jprim-constr-fn-to-ptype
                • Atj-jprim-deconstr-fn-p
                • *atj-jprim-binop-fns*
                • Atj-jprim-unop-fn-p
                • Atj-jprim-conv-fn-p
                • Atj-jprim-constr-fn-p
                • Atj-jprim-binop-fn-p
                • Atj-jprim-fn-p
                • *atj-jprim-deconstr-fns*
                • *atj-jprim-conv-fns*
                • *atj-jprim-constr-fns*
                • *atj-jprim-unop-fns*
                • *atj-jprim-fns*
                • Atj-types-for-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-implementation

Atj-java-primitives

Representation of Java primitive types and operations for ATJ.

In order to have ATJ generate Java code that manipulates Java primitive values, we use ACL2 functions that correspond to the Java primitive values and operations: when ATJ encounters these specific ACL2 functions, it translates them to corresponding Java constructs that operate on primitive types; this happens only when :deep is nil and :guards is t.

When deriving a Java implementation from a specification, where ATJ is used as the last step of the derivation, the steps just before the last one can refine the ACL2 code to use the aforementioned ACL2 functions, ideally using APT transformations, so that ATJ can produce Java code that operates on primitive values where needed. Such refinement steps could perhaps be somewhat automated, and incorporated into a code generation step that actually encompasses some APT transformation steps before the final ATJ code generation step.

The natural place for the aforementioned ACL2 functions that correspond to Java primitive values and operations is the language formalization that is being developed. So ATJ recognizes those functions from the language formalization, and translates them to Java code that manipulates Java primitive values.

Note that here `primitive' refers to Java primitive types, values, and operations. It has nothing to do with the ACL2 primitive functions.

Subtopics

Atj-jprim-deconstr-fn-to-ptype
Map an ACL2 function that models a Java primitive deconstructor to the corresponding Java primitive type.
Atj-jprim-constr-fn-to-ptype
Map an ACL2 function that models a Java primitive constructor to the corresponding Java primitive type.
Atj-jprim-deconstr-fn-p
Recognize the ACL2 function symbols that model the deconstruction of Java primitive types.
*atj-jprim-binop-fns*
List of (the names of) the ACL2 functions that model Java primitive binary operations.
Atj-jprim-unop-fn-p
Recognize the ACL2 function symbols that model the Java primitive unary operations.
Atj-jprim-conv-fn-p
Recognize the ACL2 function symbols that model the Java primitive conversions.
Atj-jprim-constr-fn-p
Recognize the ACL2 function symbols that model the construction of Java primitive types.
Atj-jprim-binop-fn-p
Recognize the ACL2 function symbols that model the Java primitive binary operations.
Atj-jprim-fn-p
Recognize the ACL2 function symbols that model the Java primitive value constructions, operations, and conversions.
*atj-jprim-deconstr-fns*
List of (the names of) the ACL2 functions that model the deconstruction of Java primitive values.
*atj-jprim-conv-fns*
List of (the names of) the ACL2 functions that model Java primitive conversions.
*atj-jprim-constr-fns*
List of (the names of) the ACL2 functions that model the construction of Java primitive values.
*atj-jprim-unop-fns*
List of (the names of) the ACL2 functions that model Java primitive unary operations.
*atj-jprim-fns*
List of (the names of) the ACL2 functions that model Java primitive value constructions and operations.
Atj-types-for-java-primitives
ATJ types for the Java primitive constructors and operations.