Table of Contents

Class ControlFlowEdge<TInstruction>

Namespace
Echo.ControlFlow
Assembly
Echo.ControlFlow.dll

Provides an implementation for a single edge in a control flow graph, including the source and target node, and the type of edge.

public class ControlFlowEdge<TInstruction> : IEdge where TInstruction : notnull

Type Parameters

TInstruction

The type of instructions that the connected nodes store.

Inheritance
ControlFlowEdge<TInstruction>
Implements
Inherited Members

Remarks

If an edge is in between two nodes, it means that control might be transferred from the one node to the other during the execution of the program that is encoded by the control flow graph.

Constructors

ControlFlowEdge(ControlFlowNode<TInstruction>, ControlFlowNode<TInstruction>)

Creates a new fallthrough edge between two nodes.

public ControlFlowEdge(ControlFlowNode<TInstruction> origin, ControlFlowNode<TInstruction> target)

Parameters

origin ControlFlowNode<TInstruction>

The node to start the edge at.

target ControlFlowNode<TInstruction>

The node to use as destination for the edge.

ControlFlowEdge(ControlFlowNode<TInstruction>, ControlFlowNode<TInstruction>, ControlFlowEdgeType)

Creates a new edge between two nodes.

public ControlFlowEdge(ControlFlowNode<TInstruction> origin, ControlFlowNode<TInstruction> target, ControlFlowEdgeType edgeType)

Parameters

origin ControlFlowNode<TInstruction>

The node to start the edge at.

target ControlFlowNode<TInstruction>

The node to use as destination for the edge.

edgeType ControlFlowEdgeType

The type of the edge to create.

Properties

Origin

Gets the node that this edge originates from.

public ControlFlowNode<TInstruction> Origin { get; }

Property Value

ControlFlowNode<TInstruction>

ParentGraph

Gets the graph that contains this edge.

public ControlFlowGraph<TInstruction>? ParentGraph { get; }

Property Value

ControlFlowGraph<TInstruction>

Target

Gets the node that this edge targets.

public ControlFlowNode<TInstruction> Target { get; }

Property Value

ControlFlowNode<TInstruction>

Type

Gets the type of the edge.

public ControlFlowEdgeType Type { get; }

Property Value

ControlFlowEdgeType

UserData

Gets or sets user data that is added to the edge.

public object? UserData { get; set; }

Property Value

object

Methods

ToString()

public override string ToString()

Returns

string