• 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
        • Syntax-for-tools
        • Atc
        • Language
        • Representation
        • Transformation-tools
          • Simpadd0
          • Deftrans
          • Splitgso
          • Constant-propagation
          • Split-fn
            • Abstract-fn
            • Split-fn-block-item-list
            • Decl-to-ident-paramdeclon-map
            • Split-fn-fundef
            • Split-fn-extdecl
            • Split-fn-filepath-transunit-map
            • Split-fn-extdecl-list
            • Param-declon-to-ident-paramdeclon-map
            • Split-fn-transunit-ensemble
            • Split-fn-transunit
            • Param-declon-list-to-ident-paramdeclon-map
            • Ident-paramdeclon-map-filter
            • Decl-to-ident-paramdeclon-map0
            • Decl-list-to-ident-paramdeclon-map
            • Expr-ident-list
            • Ident-paramdeclon-map
          • Copy-fn
          • Specialize
          • Split-all-gso
          • Rename
          • Utilities
        • Insertion-sort
        • Pack
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • 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
      • 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
  • Transformation-tools

Split-fn

A C-to-C transformation to split a function in two.

This transformation takes the identifier of the function it is to split, the name of the new function to be generated, and the location of the split, represented as a natural number corresponding to the number of block items in the function body before the split.

This transformation is a work in progress, and may fail in certain cases. For instance, it may fail given variables which have been declared but not yet initialized at the split point, or variables which are passed by reference after the split point.

Subtopics

Abstract-fn
Create a new function from the block items following the split-fn split point.
Split-fn-block-item-list
Transform a list of block items.
Decl-to-ident-paramdeclon-map
Convert a regular declaration into an omap of identifiers to parameter declarations.
Split-fn-fundef
Transform a function definition, splitting it if matches the target identifier, or else leaving it untouched.
Split-fn-extdecl
Transform an external declaration.
Split-fn-filepath-transunit-map
Transform a filepath.
Split-fn-extdecl-list
Transform a list of external declarations.
Param-declon-to-ident-paramdeclon-map
Convert a parameter declaration into a singleton omap associating the declared identifier to the declaration.
Split-fn-transunit-ensemble
Transform a translation unit ensemble.
Split-fn-transunit
Transform a translation unit.
Param-declon-list-to-ident-paramdeclon-map
Fold param-declon-to-ident-paramdeclon-map over a list.
Ident-paramdeclon-map-filter
Decl-to-ident-paramdeclon-map0
Decl-list-to-ident-paramdeclon-map
Fold decl-to-ident-paramdeclon-map over a list.
Expr-ident-list
Map c$::expr-list over a list.
Ident-paramdeclon-map
An omap mapping identp to param-declonp.