Table of Contents

Class SymbolicValue<TInstruction>

Namespace
Echo.DataFlow.Emulation
Assembly
Echo.DataFlow.dll

Represents a symbolic value that resides in memory.

public sealed class SymbolicValue<TInstruction> : ISet<DataSource<TInstruction>>, ICollection<DataSource<TInstruction>>, IEnumerable<DataSource<TInstruction>>, IEnumerable where TInstruction : notnull

Type Parameters

TInstruction
Represents a symbolic value that resides in memory.
Inheritance
SymbolicValue<TInstruction>
Implements
ISet<DataSource<TInstruction>>
ICollection<DataSource<TInstruction>>
IEnumerable<DataSource<TInstruction>>
Inherited Members

Constructors

SymbolicValue()

Creates a new symbolic value with no data sources.

public SymbolicValue()

SymbolicValue(DataSource<TInstruction>)

Creates a new symbolic value with a single data source.

public SymbolicValue(DataSource<TInstruction> dataSource)

Parameters

dataSource DataSource<TInstruction>

The data source of the symbolic value.

SymbolicValue(SymbolicValue<TInstruction>, SymbolicValue<TInstruction>)

Merges two data dependencies into one symbolic value.

public SymbolicValue(SymbolicValue<TInstruction> left, SymbolicValue<TInstruction> right)

Parameters

left SymbolicValue<TInstruction>
right SymbolicValue<TInstruction>

SymbolicValue(IEnumerable<DataSource<TInstruction>>)

Creates a new symbolic value with the provided data sources.

public SymbolicValue(IEnumerable<DataSource<TInstruction>> dataSources)

Parameters

dataSources IEnumerable<DataSource<TInstruction>>

The data sources of the symbolic value.

Properties

Count

public int Count { get; }

Property Value

int

HasKnownDataSources

Gets a value indicating whether the data dependency has any known data sources.

public bool HasKnownDataSources { get; }

Property Value

bool

IsReadOnly

public bool IsReadOnly { get; }

Property Value

bool

Methods

Add(DataSource<TInstruction>)

public bool Add(DataSource<TInstruction> item)

Parameters

item DataSource<TInstruction>

Returns

bool

AsStackValue()

Interprets the symbolic value as a collection of stack data sources.

public IEnumerable<StackDataSource<TInstruction>> AsStackValue()

Returns

IEnumerable<StackDataSource<TInstruction>>

The stack data sources.

AsVariableValue()

Interprets the symbolic value as a collection of variable data sources.

public IEnumerable<VariableDataSource<TInstruction>> AsVariableValue()

Returns

IEnumerable<VariableDataSource<TInstruction>>

The variable data sources.

Clear()

public void Clear()

Contains(DataSource<TInstruction>)

public bool Contains(DataSource<TInstruction> item)

Parameters

item DataSource<TInstruction>

Returns

bool

CopyTo(DataSource<TInstruction>[], int)

public void CopyTo(DataSource<TInstruction>[] array, int arrayIndex)

Parameters

array DataSource<TInstruction>[]
arrayIndex int

CreateStackValue(DataFlowNode<TInstruction>)

Creates a new symbolic value referencing the first stack value produced by the provided node.

public static SymbolicValue<TInstruction> CreateStackValue(DataFlowNode<TInstruction> node)

Parameters

node DataFlowNode<TInstruction>

The node producing the value.

Returns

SymbolicValue<TInstruction>

The symbolic value.

CreateStackValue(DataFlowNode<TInstruction>, int)

Creates a new symbolic value referencing a stack value produced by the provided node.

public static SymbolicValue<TInstruction> CreateStackValue(DataFlowNode<TInstruction> node, int slotIndex)

Parameters

node DataFlowNode<TInstruction>

The node producing the value.

slotIndex int

The index of the stack value that was produced by the node.

Returns

SymbolicValue<TInstruction>

The symbolic value.

CreateVariableValue(DataFlowNode<TInstruction>, IVariable)

Creates a new symbolic value referencing a variable value assigned by the provided node.

public static SymbolicValue<TInstruction> CreateVariableValue(DataFlowNode<TInstruction> node, IVariable variable)

Parameters

node DataFlowNode<TInstruction>

The node assigning the value.

variable IVariable

The variable that was assigned a value.

Returns

SymbolicValue<TInstruction>

The symbolic value.

ExceptWith(IEnumerable<DataSource<TInstruction>>)

public void ExceptWith(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

GetEnumerator()

Returns an enumerator that iterates over all data sources the data dependency defines.

public SymbolicValue<TInstruction>.Enumerator GetEnumerator()

Returns

SymbolicValue<TInstruction>.Enumerator

The enumerator.

GetNodes()

Gets a collection of nodes that were referenced by all data sources in this data dependency.

public IEnumerable<DataFlowNode<TInstruction>> GetNodes()

Returns

IEnumerable<DataFlowNode<TInstruction>>

IntersectWith(IEnumerable<DataSource<TInstruction>>)

public void IntersectWith(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

IsProperSubsetOf(IEnumerable<DataSource<TInstruction>>)

public bool IsProperSubsetOf(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

Returns

bool

IsProperSupersetOf(IEnumerable<DataSource<TInstruction>>)

public bool IsProperSupersetOf(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

Returns

bool

IsSubsetOf(IEnumerable<DataSource<TInstruction>>)

public bool IsSubsetOf(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

Returns

bool

IsSupersetOf(IEnumerable<DataSource<TInstruction>>)

public bool IsSupersetOf(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

Returns

bool

Overlaps(IEnumerable<DataSource<TInstruction>>)

public bool Overlaps(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

Returns

bool

Remove(DataFlowNode<TInstruction>)

Removes all data sources that are related to the specified node.

public bool Remove(DataFlowNode<TInstruction> node)

Parameters

node DataFlowNode<TInstruction>

The node to remove all data sources from.

Returns

bool

true if any data source was removed, false otherwise.

Remove(DataSource<TInstruction>)

public bool Remove(DataSource<TInstruction> item)

Parameters

item DataSource<TInstruction>

Returns

bool

SetEquals(IEnumerable<DataSource<TInstruction>>)

public bool SetEquals(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

Returns

bool

SymmetricExceptWith(IEnumerable<DataSource<TInstruction>>)

public void SymmetricExceptWith(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>

ToString()

public override string ToString()

Returns

string

UnionWith(IEnumerable<DataSource<TInstruction>>)

public void UnionWith(IEnumerable<DataSource<TInstruction>> other)

Parameters

other IEnumerable<DataSource<TInstruction>>