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
sourceimpl 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_hash(&self) -> Digest
pub fn program_hash(&self) -> Digest
Returns hash of the program execution of which resulted in this execution trace.
sourcepub fn program_outputs(&self) -> ProgramOutputs
pub fn program_outputs(&self) -> ProgramOutputs
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 print(&self)
Trait Implementations
sourceimpl Trace for ExecutionTrace
impl Trace for ExecutionTrace
sourcefn layout(&self) -> &TraceLayout
fn layout(&self) -> &TraceLayout
Returns a description of how columns of this trace are arranged into trace segments.
sourcefn main_segment(&self) -> &Matrix<Felt>
fn main_segment(&self) -> &Matrix<Felt>
Returns a reference to a Matrix describing the main segment of this trace.
sourcefn 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
sourcefn 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.
sourcefn main_trace_width(&self) -> usize
fn main_trace_width(&self) -> usize
Returns the number of columns in the main segment of this trace.
sourcefn aux_trace_width(&self) -> usize
fn aux_trace_width(&self) -> usize
Returns the number of columns in all auxiliary trace segments.
Auto Trait Implementations
impl RefUnwindSafe for ExecutionTrace
impl Send for ExecutionTrace
impl Sync for ExecutionTrace
impl Unpin for ExecutionTrace
impl UnwindSafe for ExecutionTrace
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more