Skip to content

Commit

Permalink
[#1793] Add minimal FFAInterpreterEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
volhovm committed Mar 5, 2024
1 parent 8a26ef7 commit fec07b2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions msm/src/ffa/interpreter.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use ark_ff::PrimeField;

pub trait FFAInterpreterEnv<Fp: PrimeField> {
type Position;

type Variable: Clone
+ std::ops::Add<Self::Variable, Output = Self::Variable>
+ std::ops::Sub<Self::Variable, Output = Self::Variable>
+ std::ops::Mul<Self::Variable, Output = Self::Variable>
+ std::fmt::Debug;

fn add_constraint(&mut self, cst: Self::Variable);

fn copy(&mut self, x: &Self::Variable, position: Self::Position) -> Self::Variable;

fn constant(value: Fp) -> Self::Variable;
}
2 changes: 1 addition & 1 deletion msm/src/ffa/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod columns;
pub mod constraint;
//pub mod interpreter;
pub mod interpreter;
pub mod witness;

0 comments on commit fec07b2

Please sign in to comment.