o1vm/interpreters/mips/mod.rs
1//! This module implements a zero-knowledge virtual machine (zkVM) for the MIPS
2//! architecture.
3//! A zkVM is used by a prover to convince a verifier that the execution trace
4//! (also called the `witness`) of a program execution is correct. In the case
5//! of this zkVM, we will represent the execution trace by using a set of
6//! columns whose values will represent the evaluations of polynomials over a
7//! certain pre-defined domain. The correct execution will be proven using a
8//! polynomial commitment protocol. The polynomials are described in the
9//! structure [crate::interpreters::mips::column::ColumnAlias]. These
10//! polynomials will be committed and evaluated at certain points following the
11//! polynomial protocol,
12//! and it will form the proof of the correct execution that the prover will
13//! build and send to the verifier. The corresponding structure is
14//! Proof. The prover will start by computing the
15//! execution trace using the interpreter implemented in the module
16//! [crate::interpreters::mips::interpreter], and the evaluations will be kept
17//! in the structure ProofInputs.
18
19pub mod column;
20pub mod constraints;
21pub mod interpreter;
22pub mod registers;
23#[cfg(test)]
24pub mod tests;
25#[cfg(test)]
26pub mod tests_helpers;
27pub mod witness;
28
29pub use interpreter::{ITypeInstruction, Instruction, JTypeInstruction, RTypeInstruction};
30
31/// Maximum degree of the constraints.
32/// It does include the additional degree induced by the multiplication of the
33/// selectors.
34pub const MAXIMUM_DEGREE_CONSTRAINTS: u64 = 6;
35
36/// Total number of constraints for all instructions, including the constraints
37/// added for the selectors.
38pub const TOTAL_NUMBER_OF_CONSTRAINTS: usize = 466;