pub trait MachineAir<F: Field>:
BaseAir<F>
+ 'static
+ Send
+ Sync {
type Record: MachineRecord;
type Program: MachineProgram<F>;
// Required methods
fn name(&self) -> &'static str;
fn generate_trace_into(
&self,
input: &Self::Record,
output: &mut Self::Record,
buffer: &mut [MaybeUninit<F>],
);
fn included(&self, shard: &Self::Record) -> bool;
// Provided methods
fn num_rows(&self, _input: &Self::Record) -> Option<usize> { ... }
fn generate_trace(
&self,
input: &Self::Record,
output: &mut Self::Record,
) -> RowMajorMatrix<F> { ... }
fn generate_dependencies(
&self,
input: &Self::Record,
output: &mut Self::Record,
) { ... }
fn preprocessed_width(&self) -> usize { ... }
fn preprocessed_num_rows(&self, _program: &Self::Program) -> Option<usize> { ... }
fn preprocessed_num_rows_with_instrs_len(
&self,
_program: &Self::Program,
_instrs_len: usize,
) -> Option<usize> { ... }
fn generate_preprocessed_trace_into(
&self,
_: &Self::Program,
_: &mut [MaybeUninit<F>],
) { ... }
fn generate_preprocessed_trace(
&self,
program: &Self::Program,
) -> Option<RowMajorMatrix<F>> { ... }
}Expand description
An AIR that is part of a multi table AIR arithmetization.
Required Associated Types§
Sourcetype Record: MachineRecord
type Record: MachineRecord
The execution record containing events for producing the air trace.
Sourcetype Program: MachineProgram<F>
type Program: MachineProgram<F>
The program that defines the control flow of the machine.
Required Methods§
Sourcefn generate_trace_into(
&self,
input: &Self::Record,
output: &mut Self::Record,
buffer: &mut [MaybeUninit<F>],
)
fn generate_trace_into( &self, input: &Self::Record, output: &mut Self::Record, buffer: &mut [MaybeUninit<F>], )
Generate the trace into a slice of MaybeUninit<F>.
Provided Methods§
Sourcefn num_rows(&self, _input: &Self::Record) -> Option<usize>
fn num_rows(&self, _input: &Self::Record) -> Option<usize>
The number of rows in the trace, if the chip is included.
Warning:: if the chip is not included, num_rows is allowed to return anything.
Sourcefn generate_trace(
&self,
input: &Self::Record,
output: &mut Self::Record,
) -> RowMajorMatrix<F>
fn generate_trace( &self, input: &Self::Record, output: &mut Self::Record, ) -> RowMajorMatrix<F>
Generate the trace for a given execution record.
inputis the execution record containing the events to be written to the trace.outputis the execution record containing events that theMachineAircan add to the record such as byte lookup requests.
Sourcefn generate_dependencies(&self, input: &Self::Record, output: &mut Self::Record)
fn generate_dependencies(&self, input: &Self::Record, output: &mut Self::Record)
Generate the dependencies for a given execution record.
Sourcefn preprocessed_width(&self) -> usize
fn preprocessed_width(&self) -> usize
The width of the preprocessed trace.
Sourcefn preprocessed_num_rows(&self, _program: &Self::Program) -> Option<usize>
fn preprocessed_num_rows(&self, _program: &Self::Program) -> Option<usize>
The number of rows in the preprocessed trace
Sourcefn preprocessed_num_rows_with_instrs_len(
&self,
_program: &Self::Program,
_instrs_len: usize,
) -> Option<usize>
fn preprocessed_num_rows_with_instrs_len( &self, _program: &Self::Program, _instrs_len: usize, ) -> Option<usize>
The number of rows in the preprocessed trace using the program and the instr len.
Sourcefn generate_preprocessed_trace_into(
&self,
_: &Self::Program,
_: &mut [MaybeUninit<F>],
)
fn generate_preprocessed_trace_into( &self, _: &Self::Program, _: &mut [MaybeUninit<F>], )
Generate the preprocessed trace into a slice of MaybeUninit<F>.
Sourcefn generate_preprocessed_trace(
&self,
program: &Self::Program,
) -> Option<RowMajorMatrix<F>>
fn generate_preprocessed_trace( &self, program: &Self::Program, ) -> Option<RowMajorMatrix<F>>
Generate the preprocessed trace given a specific program.