Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
updated cse to use SBPIRMachine instead of Legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
rutefig committed Aug 8, 2024
1 parent 518f621 commit 6b5e4aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/compiler/cse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::{
cse::{create_common_ses_signal, replace_expr},
Expr, HashResult, VarAssignments,
},
sbpir::{query::Queriable, ForwardSignal, InternalSignal, SBPIRLegacy, StepType},
sbpir::{query::Queriable, sbpir_machine::SBPIRMachine, ForwardSignal, InternalSignal, StepType},
wit_gen::NullTraceGenerator,
};

Expand Down Expand Up @@ -55,9 +55,9 @@ pub fn config(min_degree: usize, min_occurrences: usize, max_iterations: Option<
/// with high probability.
#[allow(dead_code)]
pub(super) fn cse<F: Field + Hash>(
mut circuit: SBPIRLegacy<F, NullTraceGenerator>,
mut circuit: SBPIRMachine<F, NullTraceGenerator>,
config: CseConfig,
) -> SBPIRLegacy<F, NullTraceGenerator> {
) -> SBPIRMachine<F, NullTraceGenerator> {
for (_, step_type) in circuit.step_types.iter_mut() {
cse_for_step(step_type, &circuit.forward_signals, &config)
}
Expand Down Expand Up @@ -264,7 +264,7 @@ mod test {
compiler::cse::{cse, CseConfig},
field::Field,
poly::{Expr, VarAssignments},
sbpir::{query::Queriable, InternalSignal, SBPIRLegacy, StepType},
sbpir::{query::Queriable, sbpir_machine::SBPIRMachine, InternalSignal, StepType},
util::uuid,
wit_gen::NullTraceGenerator,
};
Expand Down Expand Up @@ -343,7 +343,7 @@ mod test {
step.add_constr("expr4".into(), expr4.clone());
step.add_constr("expr5".into(), expr5);

let mut circuit: SBPIRLegacy<Fr, NullTraceGenerator> = SBPIRLegacy::default();
let mut circuit: SBPIRMachine<Fr, NullTraceGenerator> = SBPIRMachine::default();
let step_uuid = circuit.add_step_type_def(step);

let circuit = cse(circuit, CseConfig::default());
Expand Down

0 comments on commit 6b5e4aa

Please sign in to comment.