package octez-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/octez-libs.plompiler/Plompiler/Solver/index.html
Module Plompiler.SolverSource
This module defines a description format and interpretation of the programs needed to populate the PlonK witness for a Plompiler circuit given the initial inputs.
Index of a wire
Index of a row
Input/output tag for generic lookups.
Descriptors for core gates.
type arith_desc = {wires : row array;linear : Csir.Scalar.t array;qm : Csir.Scalar.t;qc : Csir.Scalar.t;qx5a : Csir.Scalar.t;qx2b : Csir.Scalar.t;to_solve : wire;
}type ed_desc = {a : Csir.Scalar.t;d : Csir.Scalar.t;x1 : int;y1 : int;x2 : int;y2 : int;x3 : int;y3 : int;
}type ed_cond_desc = {a : Csir.Scalar.t;d : Csir.Scalar.t;x1 : int;y1 : int;x2 : int;y2 : int;bit : int;x3 : int;y3 : int;
}type pos128full_desc = {x0 : int;y0 : int;x1 : int;y1 : int;x2 : int;y2 : int;k : Csir.Scalar.t array;matrix : Linear_algebra.Make_VectorSpace(Csir.Scalar).matrix;
}type pos128partial_desc = {a : int;b : int;c : int;a_5 : int;b_5 : int;c_5 : int;x0 : int;y0 : int;x1 : int;y1 : int;x2 : int;y2 : int;k_cols : Linear_algebra.Make_VectorSpace(Csir.Scalar).matrix array;matrix : Linear_algebra.Make_VectorSpace(Csir.Scalar).matrix;
}type anemoi_desc = {x0 : int;y0 : int;w : int;v : int;x1 : int;y1 : int;kx : Csir.Scalar.t;ky : Csir.Scalar.t;
}type anemoi_double_desc = {x0 : int;y0 : int;w0 : int;w1 : int;y1 : int;x2 : int;y2 : int;kx1 : Csir.Scalar.t;ky1 : Csir.Scalar.t;kx2 : Csir.Scalar.t;ky2 : Csir.Scalar.t;
}type anemoi_custom_desc = {x0 : int;y0 : int;x1 : int;y1 : int;x2 : int;y2 : int;kx1 : Csir.Scalar.t;ky1 : Csir.Scalar.t;kx2 : Csir.Scalar.t;ky2 : Csir.Scalar.t;
}type mod_arith_desc = {modulus : Z.t;base : Z.t;nb_limbs : int;moduli : Z.t list;qm_bound : Z.t * Z.t;ts_bounds : (Z.t * Z.t) list;inverse : bool;inp1 : int list;inp2 : int list;out : int list;qm : int;ts : int list;
}See lib_plompiler/gadget_mod_arith.ml for documentation on mod_arith
See lib_plompiler/gadget_mod_arith.ml for documentation on mod_arith
type solver_desc = | Arith of arith_desc| Pow5 of pow5_desc| IsZero of wires_desc| IsNotZero of wires_desc| Lookup of lookup_desc| Ecc_Ws of ws_desc| Ecc_Ed of ed_desc| Ecc_Cond_Ed of ed_cond_desc| Swap of swap_desc| Skip| BitsOfS of bits_desc| LimbsOfS of limbs_desc| Poseidon128Full of pos128full_desc| Poseidon128Partial of pos128partial_desc| AnemoiRound of anemoi_desc| AnemoiDoubleRound of anemoi_double_desc| AnemoiCustom of anemoi_custom_desc| Mod_Add of mod_arith_desc| Mod_Mul of mod_arith_desc| Mod_IsZero of mod_arith_is_zero_desc| Updater of Optimizer.trace_info
Solver description language. Each core gate has a descriptor holding the data needed to compute the part of the trace it determines.
Collection of solver descriptors for a circuit.
A solver is formed by solver descriptors together with meta-data about the size of the initial inputs and final size of the witness.
append_solver sd s sdds a solver descriptor sd to a solver s.
solve s inital computes the witness using solver s and the initial inputs.