Skip to content

Commit a8a20c6

Browse files
committed
fix unconstrained from_timestamp
1 parent 93e3135 commit a8a20c6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

autoprecompiles/src/lib.rs

+16
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,22 @@ pub fn optimize_exec_bus<T: FieldElement>(mut machine: SymbolicMachine<T>) -> Sy
870870
// Re-add the last send
871871
machine.bus_interactions.push(latest_send.unwrap());
872872

873+
for c in &mut machine.constraints {
874+
powdr::substitute_algebraic_algebraic(&mut c.expr, &subs_pc);
875+
powdr::substitute_algebraic_algebraic(&mut c.expr, &subs_ts);
876+
c.expr = simplify_expression(c.expr.clone());
877+
}
878+
for b in &mut machine.bus_interactions {
879+
powdr::substitute_algebraic_algebraic(&mut b.mult, &subs_pc);
880+
powdr::substitute_algebraic_algebraic(&mut b.mult, &subs_ts);
881+
b.mult = simplify_expression(b.mult.clone());
882+
for a in &mut b.args {
883+
powdr::substitute_algebraic_algebraic(a, &subs_pc);
884+
powdr::substitute_algebraic_algebraic(a, &subs_ts);
885+
*a = simplify_expression(a.clone());
886+
}
887+
}
888+
873889
println!(
874890
"After autoprecompile exec optimizations, columns: {}, constraints: {}, bus_interactions: {}",
875891
machine.columns().len(),

0 commit comments

Comments
 (0)