Skip to content

Commit

Permalink
Merge pull request #68 from iden3/determinizing-code-generation
Browse files Browse the repository at this point in the history
determinizing code generation
  • Loading branch information
clararod9 authored Jun 13, 2022
2 parents c30a3bc + 8d4e489 commit bd1a102
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions constraint_generation/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use super::{
UsefulConstants,
};
use circom_algebra::num_bigint::BigInt;
use std::collections::HashMap;
use std::collections::BTreeMap;
type AExpr = ArithmeticExpressionGen<String>;

#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
Expand Down Expand Up @@ -986,7 +986,7 @@ fn execute_template_call(
let is_parallel = program_archive.get_template_data(id).is_parallel();
let args_names = program_archive.get_template_data(id).get_name_of_params();
let template_body = program_archive.get_template_data(id).get_body_as_vec();
let mut args_to_values = HashMap::new();
let mut args_to_values = BTreeMap::new();
debug_assert_eq!(args_names.len(), parameter_values.len());
let mut instantiation_name = format!("{}(", id);
for (name, value) in args_names.iter().zip(parameter_values) {
Expand Down
4 changes: 2 additions & 2 deletions constraint_generation/src/execution_data/type_definitions.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use super::AExpressionSlice;
use super::Constraint as ConstraintGen;
use std::collections::HashMap;
use std::collections::BTreeMap;

pub type NodePointer = usize;
pub type Constraint = ConstraintGen<String>;
pub type ParameterContext = HashMap<String, AExpressionSlice>;
pub type ParameterContext = BTreeMap<String, AExpressionSlice>;
pub type SignalCollector = Vec<(String, Vec<usize>)>;
pub type ComponentCollector = Vec<(String, Vec<usize>)>;
pub struct SubComponentData {
Expand Down

0 comments on commit bd1a102

Please sign in to comment.