• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
              • Compilation
              • Static-semantics
                • Type-checking
                • Static-environments
                • Curve-parameterization
                • Function-recursion
                • Struct-recursion
                • Input-checking
                • Program-checking
                  • Api
                    • Api-fix
                    • Make-api
                    • Api-equiv
                    • Change-api
                    • Api->inputs
                    • Api->output
                    • Apip
                  • Lookup-main-function
                  • Api+senv
                  • Check-program
                  • Api+senv-result
                  • Api-result
                • Type-maps-for-struct-components
                • Program-and-input-checking
                • Output-checking
              • Concrete-syntax
      • 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
  • Program-checking

Api

Fixtype of program APIs

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

Fields
inputs — funparam-list
output — type

The API of a Leo program is its main function. Since there is just one main function with a known name (i.e. main), the relevant information about it, which may vary across programs, consists of:

  • The list of parameters of the main function. Each consists of a name, type, and sort.
  • The output type of the main function.

We capture this information into a data structure of this fixtype. Note that this data structure is a ``subset'' of fundecl, in the sense that it includes two of its components.

This will be extended to consist of multiple externally callable functions.

Subtopics

Api-fix
Fixing function for api structures.
Make-api
Basic constructor macro for api structures.
Api-equiv
Basic equivalence relation for api structures.
Change-api
Modifying constructor for api structures.
Api->inputs
Get the inputs field from a api.
Api->output
Get the output field from a api.
Apip
Recognizer for api structures.