o1vm/
lib.rs

1/// Modules mimicking the defined structures used by Cannon CLI.
2pub mod cannon;
3
4pub mod cli;
5
6/// A module to load ELF files.
7pub mod elf_loader;
8
9pub mod interpreters;
10
11/// Pickles flavor of the o1vm.
12pub mod pickles;
13
14/// Instantiation of the lookups for the VM project.
15pub mod lookups;
16
17/// Preimage oracle interface used by the zkVM.
18pub mod preimage_oracle;
19
20/// The RAM lookup argument.
21pub mod ramlookup;
22
23pub mod utils;
24
25pub mod test_preimage_read;
26
27use crate::pickles::column_env::RelationColumnType;
28use kimchi::circuits::{
29    berkeley_columns::BerkeleyChallengeTerm,
30    expr::{ConstantExpr, Expr},
31};
32use kimchi_msm::columns::Column;
33pub use ramlookup::{LookupMode as RAMLookupMode, RAMLookup};
34
35/// Type to represent a constraint on the individual columns of the execution
36/// trace.
37/// As a reminder, a constraint can be formally defined as a multi-variate
38/// polynomial over a finite field. The variables of the polynomial are defined
39/// as `kimchi_msm::columns::Column`.
40/// The `expression` framework defined in `kimchi::circuits::expr` is used to
41/// describe the multi-variate polynomials.
42/// For instance, a vanilla 3-wires PlonK constraint can be defined using the
43/// multi-variate polynomial of degree 2
44/// `P(X, Y, Z) = q_x X + q_y Y + q_m X Y + q_o Z + q_c`
45/// To represent this multi-variate polynomial using the expression framework,
46/// we would use 3 different columns.
47pub type E<F> = Expr<ConstantExpr<F, BerkeleyChallengeTerm>, Column<RelationColumnType>>;