Skip to main content

TraceGenerator

Trait TraceGenerator 

Source
pub trait TraceGenerator<F: Field, A: MachineAir<F>, B: Backend>:
    'static
    + Send
    + Sync {
    // Required methods
    fn machine(&self) -> &Machine<F, A>;
    fn allocator(&self) -> &B;
    fn generate_preprocessed_traces(
        &self,
        program: Arc<A::Program>,
        max_log_row_count: usize,
        setup_permits: ProverSemaphore,
    ) -> impl Future<Output = PreprocessedTraceData<F, B>> + Send;
    fn generate_main_traces(
        &self,
        record: A::Record,
        max_log_row_count: usize,
        prover_permits: ProverSemaphore,
    ) -> impl Future<Output = MainTraceData<F, A, B>> + Send;
    fn generate_traces(
        &self,
        program: Arc<A::Program>,
        record: A::Record,
        max_log_row_count: usize,
        prover_permits: ProverSemaphore,
    ) -> impl Future<Output = TraceData<F, A, B>> + Send;
}
Expand description

A trace generator for a given machine.

The trace generator is responsible for producing the preprocessed traces from a program and the traces from an execution record.

Required Methods§

Source

fn machine(&self) -> &Machine<F, A>

Get a handle for the machine.

Source

fn allocator(&self) -> &B

Get the allocator for the traces.

Source

fn generate_preprocessed_traces( &self, program: Arc<A::Program>, max_log_row_count: usize, setup_permits: ProverSemaphore, ) -> impl Future<Output = PreprocessedTraceData<F, B>> + Send

Generate the preprocessed traces for the given program.

Source

fn generate_main_traces( &self, record: A::Record, max_log_row_count: usize, prover_permits: ProverSemaphore, ) -> impl Future<Output = MainTraceData<F, A, B>> + Send

Generate the main traces for the given execution record.

Source

fn generate_traces( &self, program: Arc<A::Program>, record: A::Record, max_log_row_count: usize, prover_permits: ProverSemaphore, ) -> impl Future<Output = TraceData<F, A, B>> + Send

Generate all traces for the given program and execution record.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§