Migrate aleo_program to program

This commit is contained in:
howardwu 2020-04-20 21:38:04 -07:00
parent a42d9eeb10
commit f1c318d8e0
16 changed files with 21 additions and 21 deletions

View File

@ -11,4 +11,4 @@ extern crate lazy_static;
pub mod ast;
pub mod aleo_program;
pub mod program;

View File

@ -47,11 +47,11 @@ impl<F: Field + PrimeField> ConstraintSynthesizer<F> for Benchmark<F> {
let syntax_tree = ast::File::from_pest(&mut file).expect("infallible");
// println!("{:#?}", syntax_tree);
let program = aleo_program::Program::<'_, F>::from(syntax_tree);
let program = program::Program::<'_, F>::from(syntax_tree);
println!(" compiled: {:#?}", program);
let program = program.name("simple".into());
aleo_program::ResolvedProgram::generate_constraints(cs, program);
program::ResolvedProgram::generate_constraints(cs, program);
Ok(())
}

View File

@ -4,8 +4,8 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::aleo_program::{BooleanExpression, BooleanSpreadOrExpression, Variable};
use crate::program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::program::{BooleanExpression, BooleanSpreadOrExpression, Variable};
use snarkos_models::curves::{Field, PrimeField};
use snarkos_models::gadgets::{

View File

@ -4,8 +4,8 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::aleo_program::{Expression, Function, Import, Program, Statement, Type};
use crate::program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::program::{Expression, Function, Import, Program, Statement, Type};
use crate::ast;
use from_pest::FromPest;

View File

@ -4,8 +4,8 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::aleo_program::{
use crate::program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::program::{
Expression, IntegerExpression, IntegerRangeOrExpression, StructMember, Variable,
};

View File

@ -4,8 +4,8 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::aleo_program::{FieldExpression, FieldSpreadOrExpression, Variable};
use crate::program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::program::{FieldExpression, FieldSpreadOrExpression, Variable};
use snarkos_models::curves::{Field, PrimeField};
use snarkos_models::gadgets::{r1cs::ConstraintSystem, utilities::boolean::Boolean};

View File

@ -4,8 +4,8 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::aleo_program::{Integer, IntegerExpression, IntegerSpreadOrExpression, Variable};
use crate::program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::program::{Integer, IntegerExpression, IntegerSpreadOrExpression, Variable};
use snarkos_models::curves::{Field, PrimeField};
use snarkos_models::gadgets::{

View File

@ -4,8 +4,8 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::constraints::ResolvedValue;
use crate::aleo_program::types::Variable;
use crate::program::constraints::ResolvedValue;
use crate::program::types::Variable;
use snarkos_models::curves::{Field, PrimeField};
use snarkos_models::gadgets::r1cs::ConstraintSystem;

View File

@ -4,7 +4,7 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::types::{Function, Struct, StructMember, Variable};
use crate::program::types::{Function, Struct, StructMember, Variable};
use snarkos_models::curves::{Field, PrimeField};
use snarkos_models::gadgets::{utilities::boolean::Boolean, utilities::uint32::UInt32};

View File

@ -4,8 +4,8 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::aleo_program::{
use crate::program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue};
use crate::program::{
Assignee, Expression, IntegerExpression, IntegerRangeOrExpression, Statement, Variable,
};

View File

@ -5,7 +5,7 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::Import;
use crate::program::Import;
use snarkos_models::curves::{Field, PrimeField};
use std::collections::HashMap;

View File

@ -4,7 +4,7 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::{
use crate::program::{
Assignee, BooleanExpression, BooleanSpreadOrExpression, Expression, FieldExpression,
FieldSpreadOrExpression, Function, FunctionName, Integer, IntegerExpression,
IntegerRangeOrExpression, IntegerSpreadOrExpression, Parameter, Statement, Struct, StructField,

View File

@ -4,7 +4,7 @@
//! @author Collin Chin <collin@aleo.org>
//! @date 2020
use crate::aleo_program::{types, Import, PathString};
use crate::program::{types, Import, PathString};
use crate::ast;
use snarkos_models::curves::{Field, PrimeField};