• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
        • Atj
        • Aij
        • Language
          • Syntax
            • Grammar
            • Unicode-escapes
            • Unicode-input-char
            • Escape-sequence
            • Identifiers
            • Primitive-types
              • Primitive-type
              • Primitive-type-<=
              • Numeric-type
              • Primitive-type-<
              • Integral-type
              • Primitive-type-<1
              • Floating-point-type
            • Reference-types
            • Unicode-characters
            • Keywords
            • Integer-literals
            • String-literals
            • Octal-digits
            • Hexadecimal-digits
            • Decimal-digits
            • Binary-digits
            • Character-literals
            • Null-literal
            • Floating-point-literals
            • Boolean-literals
            • Package-names
            • Literals
          • Semantics
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Syntax

Primitive-types

Java primitive types [JLS14:4.2].

We formalize Java primitive types as syntactic entities. Primitive values are formalized here.

According to the grammar rule for primitive-type [JLS14:4.2], primitive types (as syntactic entities) include annotations. The grammar also includes a rule for unann-primitive-type [JLS14:8.3], which captures the ``core'' eight primitive types without annotations, as they were in the pre-annotations versions of Java. However, note that the rules for integral-type, floating-point-type, and numeric-type do not include annotations, even though integral, floating-point, and numeric types are considered a subset of the primitive types.

For our formalization, it seems more practical to define the `primitive types' as the ones without annotations, and have a separate notion for `annotated primitive types'. This is just nomenclature, the substance does not change.

For now we just define (unannotated) primitive types. Annotated primitive types will be added later.

We also formalize the subtype relation on primitive types [JLS14:4.10].

Subtopics

Primitive-type
Fixtype of Java (unannotated) primitive types [JLS14:4.2] [JLS14:8.3].
Primitive-type-<=
Subtype relation over primitive types [JLS14:4.10].
Numeric-type
Fixtype of Java numeric types [JLS14:4.2].
Primitive-type-<
Proper subtype relation over primitive types [JLS14:4.10].
Integral-type
Fixtype of Java integral types [JLS14:4.2].
Primitive-type-<1
Direct subtype relation over primitive types [JLS14:4.10.1].
Floating-point-type
Fixtype of Java floating-point types [JLS14:4.2].