• 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
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • 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
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • 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.