• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • 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-var-to-jvar
                  • Atj-char-to-jchars-id
                  • Atj-fn-to-method
                  • Atj-pkg-to-class
                  • Atj-fns-to-methods
                  • *atj-disallowed-class-names*
                    • Atj-pkgs-to-classes
                    • *atj-predefined-method-names*
                    • Atj-chars-to-jchars-id
                    • *atj-disallowed-jvar-names*
                    • Atj-get-pkg-class-name
                    • Atj-get-fn-method-name
                    • Atj-var-add-index
                    • *atj-disallowed-method-names*
                  • 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-name-translation

    *atj-disallowed-class-names*

    Disallowed Java class names.

    In the shallow embedding approach, a Java class is generated for each ACL2 package that includes ACL2 functions for which we generate Java code; each ACL2 function is turned into a Java method in that Java class.

    The name of the Java class is obtained from the name of the ACL2 package via atj-pkg-to-class, but since the generated Java code imports some classes from other Java packages, we need to make sure that the Java class name for an ACL2 package does not conflict with any of the imported classes. The generated Java code imports all the classes in the Java package of AIJ, as well as some Java library classes and interfaces, including all the ones in java.lang. This constant collects all of these. This constant must be kept in sync with atj-gen-shallow-main-cunit, which generates the Java imports.

    We also disallow Java keywords, boolean literals, and the null literal, which are not valid Java identiers. There is no need to exclude the empty string explicitly (unlike *atj-disallowed-jvar-names*), because ACL2 package names are never empty and the mapping in atj-pkg-to-class never produces empty strings.

    Definition: *atj-disallowed-class-names*

    (defconst *atj-disallowed-class-names*
      (append *jkeywords*
              *boolean-literals* (list *null-literal*)
              *aij-class-names*
              (list "BigInteger" "ArrayList" "List")))