mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-28 12:45:26 +03:00
Migrate aleo_program to program
This commit is contained in:
parent
a42d9eeb10
commit
f1c318d8e0
@ -11,4 +11,4 @@ extern crate lazy_static;
|
||||
|
||||
pub mod ast;
|
||||
|
||||
pub mod aleo_program;
|
||||
pub mod program;
|
||||
|
@ -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(())
|
||||
}
|
||||
|
@ -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::{
|
@ -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;
|
@ -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,
|
||||
};
|
||||
|
@ -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};
|
@ -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::{
|
@ -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;
|
@ -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};
|
@ -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,
|
||||
};
|
||||
|
@ -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;
|
@ -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,
|
@ -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};
|
Loading…
Reference in New Issue
Block a user