Class StaticToSymbolicAdapter<TInstruction>
- Namespace
- Echo.DataFlow.Construction
- Assembly
- Echo.DataFlow.dll
Provides an implementation of an adapter that maps a IStaticInstructionProvider<TInstruction> to a ISymbolicInstructionProvider<TInstruction>, by using the program counter stored in the program state as an offset to look up the current instruction.
public class StaticToSymbolicAdapter<TInstruction> : ISymbolicInstructionProvider<TInstruction> where TInstruction : notnull
Type Parameters
TInstructionThe type of instructions that this collection provides.
- Inheritance
-
StaticToSymbolicAdapter<TInstruction>
- Implements
-
ISymbolicInstructionProvider<TInstruction>
- Inherited Members
Constructors
StaticToSymbolicAdapter(IArchitecture<TInstruction>, IEnumerable<TInstruction>)
Creates a new instance of the StaticToSymbolicAdapter<TInstruction> adapter.
public StaticToSymbolicAdapter(IArchitecture<TInstruction> architecture, IEnumerable<TInstruction> instructions)
Parameters
architectureIArchitecture<TInstruction>The architecture of the instructions.
instructionsIEnumerable<TInstruction>The instructions.
StaticToSymbolicAdapter(IStaticInstructionProvider<TInstruction>)
Creates a new instance of the StaticToSymbolicAdapter<TInstruction> adapter.
public StaticToSymbolicAdapter(IStaticInstructionProvider<TInstruction> instructions)
Parameters
instructionsIStaticInstructionProvider<TInstruction>The instructions.
Properties
Architecture
Gets the architecture describing the instructions exposed by this instruction provider.
public IArchitecture<TInstruction> Architecture { get; }
Property Value
- IArchitecture<TInstruction>
Instructions
Gets the underlying static instructions provider.
public IStaticInstructionProvider<TInstruction> Instructions { get; }
Property Value
- IStaticInstructionProvider<TInstruction>
Methods
GetCurrentInstruction(in SymbolicProgramState<TInstruction>)
Gets the current instruction to be evaluated; that is, the instruction at the current value of the program counter stored in the provided program state.
public TInstruction GetCurrentInstruction(in SymbolicProgramState<TInstruction> currentState)
Parameters
currentStateSymbolicProgramState<TInstruction>The current state of the program.
Returns
- TInstruction
The instruction.