Table of Contents

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

TInstruction

The 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 null if 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

offset long

The offset of the node to find.

Returns

ControlFlowNode<TInstruction>

The node, or null if 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

node ControlFlowNode<TInstruction>

The node to remove.

Returns

bool

true if the node was found and removed, false otherwise.