Struct miden_processor::ExecutionTrace
source · pub struct ExecutionTrace { /* private fields */ }
Expand description
Execution trace which is generated when a program is executed on the VM.
The trace consists of the following components:
- Main traces of System, Decoder, Operand Stack, Range Checker, and Auxiliary Co-Processor components.
- Hints used during auxiliary trace segment construction.
- Metadata needed by the STARK prover.
Implementations§
source§impl ExecutionTrace
impl ExecutionTrace
sourcepub const NUM_RAND_ROWS: usize = 1usize
pub const NUM_RAND_ROWS: usize = 1usize
Number of rows at the end of an execution trace which are injected with random values.
sourcepub fn program_info(&self) -> &ProgramInfo
pub fn program_info(&self) -> &ProgramInfo
Returns the program info of this execution trace.
sourcepub fn program_hash(&self) -> &Digest
pub fn program_hash(&self) -> &Digest
Returns hash of the program execution of which resulted in this execution trace.
sourcepub fn stack_outputs(&self) -> &StackOutputs
pub fn stack_outputs(&self) -> &StackOutputs
Returns outputs of the program execution which resulted in this execution trace.
sourcepub fn init_stack_state(&self) -> StackTopState
pub fn init_stack_state(&self) -> StackTopState
Returns the initial state of the top 16 stack registers.
sourcepub fn last_stack_state(&self) -> StackTopState
pub fn last_stack_state(&self) -> StackTopState
Returns the final state of the top 16 stack registers.
sourcepub fn get_user_op_helpers_at(&self, clk: u32) -> [Felt; 6]
pub fn get_user_op_helpers_at(&self, clk: u32) -> [Felt; 6]
Returns helper registers state at the specified clk
of the VM
pub fn get_trace_len(&self) -> usize
pub fn print(&self)
Trait Implementations§
source§impl Trace for ExecutionTrace
impl Trace for ExecutionTrace
§type BaseField = BaseElement
type BaseField = BaseElement
Base field for this execution trace. Read more
source§fn layout(&self) -> &TraceLayout
fn layout(&self) -> &TraceLayout
Returns a description of how columns of this trace are arranged into trace segments.
source§fn main_segment(&self) -> &Matrix<Felt>
fn main_segment(&self) -> &Matrix<Felt>
Returns a reference to a Matrix describing the main segment of this trace.
source§fn build_aux_segment<E: FieldElement<BaseField = Felt>>(
&mut self,
aux_segments: &[Matrix<E>],
rand_elements: &[E]
) -> Option<Matrix<E>>
fn build_aux_segment<E: FieldElement<BaseField = Felt>>( &mut self, aux_segments: &[Matrix<E>], rand_elements: &[E] ) -> Option<Matrix<E>>
Builds and returns the next auxiliary trace segment. If there are no more segments to
build (i.e., the trace is complete), None is returned. Read more
source§fn read_main_frame(&self, row_idx: usize, frame: &mut EvaluationFrame<Felt>)
fn read_main_frame(&self, row_idx: usize, frame: &mut EvaluationFrame<Felt>)
Reads an evaluation frame from the main trace segment at the specified row.
source§fn main_trace_width(&self) -> usize
fn main_trace_width(&self) -> usize
Returns the number of columns in the main segment of this trace.
source§fn aux_trace_width(&self) -> usize
fn aux_trace_width(&self) -> usize
Returns the number of columns in all auxiliary trace segments.