PreflightExecutor

Trait PreflightExecutor 

Source
pub trait PreflightExecutor<F, RA = MatrixRecordArena<F>> {
    // Required methods
    fn execute(
        &self,
        state: VmStateMut<'_, F, TracingMemory, RA>,
        instruction: &Instruction<F>,
    ) -> Result<(), ExecutionError>;
    fn get_opcode_name(&self, opcode: usize) -> String;
}
Expand description

Trait for preflight execution via a host interpreter. The trait methods allow execution of instructions via enum dispatch within an interpreter. This execution is specialized to record “records” of execution which will be ingested later for trace matrix generation. The records are stored in a record arena, which is provided in the VmStateMut argument.

Required Methods§

Source

fn execute( &self, state: VmStateMut<'_, F, TracingMemory, RA>, instruction: &Instruction<F>, ) -> Result<(), ExecutionError>

Runtime execution of the instruction, if the instruction is owned by the current instance. May internally store records of this call for later trace generation.

Source

fn get_opcode_name(&self, opcode: usize) -> String

For display purposes. From absolute opcode as usize, return the string name of the opcode if it is a supported opcode by the present executor.

Implementors§

Source§

impl<F, A, RA> PreflightExecutor<F, RA> for PublicValuesExecutor<F, A>
where F: PrimeField32, A: 'static + Clone + AdapterTraceExecutor<F, ReadData = [[F; 1]; 2], WriteData = [[F; 1]; 0]>, for<'buf> RA: RecordArena<'buf, EmptyAdapterCoreLayout<F, A>, (A::RecordMut<'buf>, &'buf mut PublicValuesRecord<F>)>,

Source§

impl<F, RA> PreflightExecutor<F, RA> for PhantomExecutor<F>
where F: PrimeField32, for<'buf> RA: RecordArena<'buf, EmptyMultiRowLayout, &'buf mut PhantomRecord>,

Source§

impl<F: Field, RA> PreflightExecutor<F, RA> for SystemExecutor<F>