• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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-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
          • Riscv
          • 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-get-pkg-class-name

    Retrieve the Java class name for an ACL2 package name from the mapping, ensuring that the name is present.

    Signature
    (atj-get-pkg-class-name pkg pkg-class-names) → class
    Arguments
    pkg — Guard (stringp pkg).
    pkg-class-names — Guard (string-string-alistp pkg-class-names).
    Returns
    class — Type (stringp class), given (string-string-alistp pkg-class-names).

    This function causes an error if the package name is not in the alist, but it should always be called with arguments that do not result in the error. In other words, the error is never expected to actually happen.

    Definitions and Theorems

    Function: atj-get-pkg-class-name

    (defun atj-get-pkg-class-name (pkg pkg-class-names)
      (declare
           (xargs :guard (and (stringp pkg)
                              (string-string-alistp pkg-class-names))))
      (let ((__function__ 'atj-get-pkg-class-name))
        (declare (ignorable __function__))
        (b* ((pair (assoc-equal pkg pkg-class-names))
             ((unless (consp pair))
              (raise "Internal error: no class name for package ~x0."
                     pkg)
              ""))
          (cdr pair))))

    Theorem: stringp-of-atj-get-pkg-class-name

    (defthm stringp-of-atj-get-pkg-class-name
     (implies (string-string-alistp pkg-class-names)
              (b* ((class (atj-get-pkg-class-name pkg pkg-class-names)))
                (stringp class)))
     :rule-classes :rewrite)