Class SymbolicValue<TInstruction>
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
dataSourceDataSource<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
leftSymbolicValue<TInstruction>rightSymbolicValue<TInstruction>
SymbolicValue(IEnumerable<DataSource<TInstruction>>)
Creates a new symbolic value with the provided data sources.
public SymbolicValue(IEnumerable<DataSource<TInstruction>> dataSources)
Parameters
dataSourcesIEnumerable<DataSource<TInstruction>>The data sources of the symbolic value.
Properties
Count
public int Count { get; }
Property Value
HasKnownDataSources
Gets a value indicating whether the data dependency has any known data sources.
public bool HasKnownDataSources { get; }
Property Value
IsReadOnly
public bool IsReadOnly { get; }
Property Value
Methods
Add(DataSource<TInstruction>)
public bool Add(DataSource<TInstruction> item)
Parameters
itemDataSource<TInstruction>
Returns
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
itemDataSource<TInstruction>
Returns
CopyTo(DataSource<TInstruction>[], int)
public void CopyTo(DataSource<TInstruction>[] array, int arrayIndex)
Parameters
arrayDataSource<TInstruction>[]arrayIndexint
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
nodeDataFlowNode<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
nodeDataFlowNode<TInstruction>The node producing the value.
slotIndexintThe 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
nodeDataFlowNode<TInstruction>The node assigning the value.
variableIVariableThe variable that was assigned a value.
Returns
- SymbolicValue<TInstruction>
The symbolic value.
ExceptWith(IEnumerable<DataSource<TInstruction>>)
public void ExceptWith(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<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
otherIEnumerable<DataSource<TInstruction>>
IsProperSubsetOf(IEnumerable<DataSource<TInstruction>>)
public bool IsProperSubsetOf(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>
Returns
IsProperSupersetOf(IEnumerable<DataSource<TInstruction>>)
public bool IsProperSupersetOf(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>
Returns
IsSubsetOf(IEnumerable<DataSource<TInstruction>>)
public bool IsSubsetOf(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>
Returns
IsSupersetOf(IEnumerable<DataSource<TInstruction>>)
public bool IsSupersetOf(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>
Returns
Overlaps(IEnumerable<DataSource<TInstruction>>)
public bool Overlaps(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>
Returns
Remove(DataFlowNode<TInstruction>)
Removes all data sources that are related to the specified node.
public bool Remove(DataFlowNode<TInstruction> node)
Parameters
nodeDataFlowNode<TInstruction>The node to remove all data sources from.
Returns
- bool
trueif any data source was removed,falseotherwise.
Remove(DataSource<TInstruction>)
public bool Remove(DataSource<TInstruction> item)
Parameters
itemDataSource<TInstruction>
Returns
SetEquals(IEnumerable<DataSource<TInstruction>>)
public bool SetEquals(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>
Returns
SymmetricExceptWith(IEnumerable<DataSource<TInstruction>>)
public void SymmetricExceptWith(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>
ToString()
public override string ToString()
Returns
UnionWith(IEnumerable<DataSource<TInstruction>>)
public void UnionWith(IEnumerable<DataSource<TInstruction>> other)
Parameters
otherIEnumerable<DataSource<TInstruction>>