• 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-fn-method-name

    Retrieve the Java method name for an ACL2 function name from the mapping, ensuring that the name is present.

    Signature
    (atj-get-fn-method-name fn fn-method-names) → method
    Arguments
    fn — Guard (symbolp fn).
    fn-method-names — Guard (symbol-string-alistp fn-method-names).
    Returns
    method — Type (stringp method), given (symbol-string-alistp fn-method-names).

    This function causes an error if the function 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-fn-method-name

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

    Theorem: stringp-of-atj-get-fn-method-name

    (defthm stringp-of-atj-get-fn-method-name
     (implies (symbol-string-alistp fn-method-names)
              (b* ((method (atj-get-fn-method-name fn fn-method-names)))
                (stringp method)))
     :rule-classes :rewrite)