Interface IControlFlowRegion<TInstruction>
- Namespace
- Echo.ControlFlow.Regions
- Assembly
- Echo.ControlFlow.dll
Provides members for describing a region in a control flow graph.
public interface IControlFlowRegion<TInstruction> : ISubGraph where TInstruction : notnull
Type Parameters
TInstructionThe type of data that each node in the graph stores.
- Inherited Members
- Extension Methods
Properties
ParentGraph
Gets the parent graph this region is part of.
ControlFlowGraph<TInstruction>? ParentGraph { get; }
Property Value
- ControlFlowGraph<TInstruction>
ParentRegion
Gets the parent region that this region is part of.
IControlFlowRegion<TInstruction>? ParentRegion { get; }
Property Value
- IControlFlowRegion<TInstruction>
Remarks
When this property is set to null this region is the root.
Methods
GetEntryPoint()
Obtains the first node that is executed in the region (if available).
ControlFlowNode<TInstruction>? GetEntryPoint()
Returns
- ControlFlowNode<TInstruction>
The node, or
nullif no entrypoint was specified.
GetNodeByOffset(long)
Searches for a node in the control flow graph with the provided offset or identifier.
ControlFlowNode<TInstruction>? GetNodeByOffset(long offset)
Parameters
offsetlongThe offset of the node to find.
Returns
- ControlFlowNode<TInstruction>
The node, or
nullif no node was found with the provided offset.
GetNodes()
Gets a collection of all nodes in the control flow graph region. This includes all nodes in the nested regions.
IEnumerable<ControlFlowNode<TInstruction>> GetNodes()
Returns
- IEnumerable<ControlFlowNode<TInstruction>>
The nodes.
GetSubRegions()
Gets a collection of all nested regions defined in this region.
IEnumerable<ControlFlowRegion<TInstruction>> GetSubRegions()
Returns
- IEnumerable<ControlFlowRegion<TInstruction>>
The subregions.
GetSuccessors()
Gets the nodes that are immediate successors of any node in this region.
IEnumerable<ControlFlowNode<TInstruction>> GetSuccessors()
Returns
- IEnumerable<ControlFlowNode<TInstruction>>
The nodes.
RemoveNode(ControlFlowNode<TInstruction>)
Removes the node from the region.
bool RemoveNode(ControlFlowNode<TInstruction> node)
Parameters
nodeControlFlowNode<TInstruction>The node to remove.
Returns
- bool
trueif the node was found and removed,falseotherwise.