Skip to content

Commit

Permalink
fix: fix mp mv constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
zmalatrax committed Nov 28, 2024
1 parent 66d6c08 commit a629ee9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/brainfuck_prover/src/components/memory/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ impl FrameworkEval for MemoryEval {
(next_mp.clone() - mp.clone()) * (next_clk - clk.clone() - BaseField::one().into()),
);

// If `mp` increases by 1, then `mv` must be 0
eval.add_constraint(
(next_mp.clone() - mp.clone() - BaseField::one().into()) * next_mv.clone(),
);
// If `mp` increases by 1, then `next_mv` must be 0
eval.add_constraint((next_mp.clone() - mp.clone()) * next_mv.clone());

// The next dummy is either 0 or 1
eval.add_constraint(next_d.clone() * (next_d - BaseField::one().into()));
Expand Down Expand Up @@ -165,7 +163,9 @@ mod tests {
let trace_vm = machine.trace();

// Construct the IsFirst preprocessed column
let preprocessed_trace = vec![gen_is_first(LOG_SIZE)];
let is_first_col = gen_is_first(LOG_SIZE);
let is_first_col2 = gen_is_first(LOG_SIZE);
let preprocessed_trace = vec![is_first_col, is_first_col2];

// Construct the main trace from the execution trace
let table = MemoryTable::from(trace_vm);
Expand Down

0 comments on commit a629ee9

Please sign in to comment.