Table of Contents

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

TInstruction

The type of instructions that this collection provides.

Inheritance
StaticToSymbolicAdapter<TInstruction>
Implements
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

architecture IArchitecture<TInstruction>

The architecture of the instructions.

instructions IEnumerable<TInstruction>

The instructions.

StaticToSymbolicAdapter(IStaticInstructionProvider<TInstruction>)

Creates a new instance of the StaticToSymbolicAdapter<TInstruction> adapter.

public StaticToSymbolicAdapter(IStaticInstructionProvider<TInstruction> instructions)

Parameters

instructions IStaticInstructionProvider<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

currentState SymbolicProgramState<TInstruction>

The current state of the program.

Returns

TInstruction

The instruction.