Creates an instance of CFG.
The name of the function or method this CFG represents.
AST ID.
Indicates whether this CFG represents a standalone function or a method or a receive method belonging to a contract.
Indicates whether the function was defined in users code or in standard library.
Map of block indices to basic blocks in the CFG that come in the reverse order.
Map of edge indices to edges in the CFG that come in the reverse order.
AST reference that corresponds to the function definition.
An optional unique index. If not set, a new one will be chosen automatically.
Map of edge indices to edges in the CFG that come in the reverse order.
AST ID.
The unique identifier of this CFG among the compilation unit it belongs to.
Indicates whether this CFG represents a standalone function or a method or a receive method belonging to a contract.
The name of the function or method this CFG represents.
Map of block indices to basic blocks in the CFG that come in the reverse order.
Indicates whether the function was defined in users code or in standard library.
AST reference that corresponds to the function definition.
Iterates over all basic blocks in a CFG, applying a callback to each node. The callback can perform any operation, such as analyzing or transforming the basic block.
The store containing the AST nodes.
The function to apply to each block.
Retrieves a basic block from the CFG based on its unique index.
The index of the basic block to retrieve.
The basic block if found, otherwise undefined.
Returns a list of all exit nodes in the CFG.
An array of BasicBlock
that are exit nodes.
Returns predecessors for the given block.
A list of predecessor blocks or undefined
if any of the indices cannot be found in this CFG.
Returns successors for the given block.
A list of predecessor blocks or undefined
if any of the indices cannot be found in this CFG.
Describes the intraprocedural control flow graph (CFG) that corresponds to a function or method within the project.