• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Bitcoin
        • Ethereum
        • Yul
          • Transformations
            • Renaming-variables
            • Dead-code-eliminator
            • Renamings
            • Disambiguator
            • Unique-variables
            • Dead-code-eliminator-static-safety
            • No-function-definitions
              • Statements/blocks/cases/fundefs-nofunp
              • No-function-definitions-in-dynamic-semantics
              • Fundef-list-nofunp
              • Statements-to-fundefs-when-nofunp
            • Unique-functions
            • Renaming-functions
            • Dead-code-eliminator-no-loop-initializers
            • Dead-code-eliminator-no-function-definitions
            • No-loop-initializers
            • For-loop-init-rewriter
          • Language
          • Yul-json
        • 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
  • Transformations

No-function-definitions

The condition in which function definitions are elsewhere.

The FunctionHoister transformation, described in [Solidity: Internals: The Optimizer: Yul-Based Optimizer Module: Preprocessing: FunctionHoister], moves all the function definitions to the top-level block. The FunctionGrouper transformation, described in [Solidity: Internals: The Optimizer: Yul-Based Optimizer Module: Preprocessing: FunctionGrouper], further moves them to the end of the top-level block, putting the rest of the top-level block into a nested block at the beginning of the top-level block. An important property that these transformations establish is that, aside from the top-level block, there are no function definitions in statements and blocks.

Here we capture this property, which is used as precondition for certain transformations.

Subtopics

Statements/blocks/cases/fundefs-nofunp
Mutually recursive functions that check the absence of function definitions in statements, blocks, cases, and function definitions.
No-function-definitions-in-dynamic-semantics
The condition in which function definitions are elsewhere, applied to entities in the dynamic semantics.
Fundef-list-nofunp
Check that a list of function definitions has no nested function definitions.
Statements-to-fundefs-when-nofunp
Theorem that statements-to-fundefs is nil under statement-list-nofunp.