• 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
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
          • Atj
            • Atj-implementation
              • Atj-types
                • Atj-type-<=
                • Atj-function-type
                  • Atj-function-type-fix
                  • Atj-function-type-equiv
                  • Make-atj-function-type
                  • Atj-function-type->outputs
                  • Atj-function-type->inputs
                  • Atj-function-type->arrays
                  • Change-atj-function-type
                  • Atj-function-type-p
                • Atj-type-to-jitype
                • Atj-type
                • Atj-function-type-of-min-input-types
                • Atj-type-top-join
                • Atj-atype
                • Atj-type-bottom-meet
                • Atj-type-bottom-<=
                • Atj-type-top-<=
                • Atj-type-top-list-join
                • Atj-type-bottom-list-<=
                • Atj-type-top-list-<=
                • Atj-type-bottom-list-meet
                • Atj-type-list-<=
                • Atj-type-to-pred
                • Atj-maybe-function-type-info
                • Atj-atype-<=
                • Atj-maybe-function-type
                • Atj-maybe-type
                • Atj-type-to-keyword
                • Atj-function-type-info
                • Atj-type-list-join
                • Atj-type-list-to-type
                • Atj-type-list-<
                • Atj-type-list-meet
                • Atj-type-from-keyword
                • Atj-function-type-of-min-input-types-aux
                • Atj-type-<
                • Atj-type-list-to-type-list-list
                • Atj-number-of-results
                • Atj-function-type-info-default
                • Atj-type-to-pred-gen-mono-thms-2
                • Atj-get-function-type-info-from-table
                • Atj-get-function-type-info
                • Atj-type-to-pred-gen-mono-thms-1
                • Atj-type-to-pred-gen-mono-thm
                • Atj-type-meet
                • Atj-type-to-type-list
                • Atj-type-list-to-jitype-list
                • Atj-type-join
                • Atj-type-of-value
                • Atj-type-list-to-keyword-list
                • Atj-type-semilattices
                • Atj-type-to-pred-gen-mono-thms
                • Atj-function-type-info->outputs
                • Atj-function-type-list->outputs
                • Atj-function-type-list->inputs
                • Atj-type-list-from-keyword-list
                • Atj-type-irrelevant
                • Atj-symbol-type-alist
                • Atj-type-list
                • Atj-function-type-list
                • Atj-type-list-list
                • Atj-maybe-type-list
                • Atj-function-type-info-table
                • *atj-function-type-info-table-name*
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
              • Atj-input-processing
              • Atj-java-pretty-printer
              • Atj-code-generation
              • 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
        • Zcash
        • Yul
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Axe
        • Lists-light
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Atj-types

Atj-function-type

Fixtype of ATJ function types.

This is a product type introduced by fty::defprod.

Fields
inputs — atj-type-list
outputs — atj-type-list
arrays — symbol-list

An ATJ function type consists of (zero or more) types for the arguments (i.e. inputs) and (one or more) types for the results (i.e. outputs). This is like an arrow type in higher-order languages.

We also augment the output types with array names. These are represented via a list of symbols, whose length must match the length of the output type list (this length constraint is not explicitly captured in this fixtype, but it is an expected invariant). The nil symbol may be used in any position of the array name list, meaning that there is no array name for the corresponding output type. A non-nil symbol may be used only in a position whose corresponding output type is a :jprimarr type. In this case the symbol must match a formal parameter of the function that has the same array type as input type. The non-nil symbols must be all distinct.

The purpose of these array names is to support the analysis of single-threaded use of Java primitive arrays described at atj-pre-translation-array-analysis. The idea is that if a function takes an array as input (i.e. that input type is a :jprimarr type) and if the function may modify that array (directly or indirectly), then the possibly modified array must be returned as a result: an explicit non-nil array name assigned to a result specifies which result that is, and simplifies the analysis. If instead a function does not modify an input array, no result with the same name as the input needs to exist. Results of non-array types use nil as array (non-)name. If a function creates an array (directly or indirectly) and returns it, then nil is used for that result, i.e. the array has no name because it does not modify any input array (and thus there is no input name to match); it represents a newly created array.

Subtopics

Atj-function-type-fix
Fixing function for atj-function-type structures.
Atj-function-type-equiv
Basic equivalence relation for atj-function-type structures.
Make-atj-function-type
Basic constructor macro for atj-function-type structures.
Atj-function-type->outputs
Get the outputs field from a atj-function-type.
Atj-function-type->inputs
Get the inputs field from a atj-function-type.
Atj-function-type->arrays
Get the arrays field from a atj-function-type.
Change-atj-function-type
Modifying constructor for atj-function-type structures.
Atj-function-type-p
Recognizer for atj-function-type structures.