From ff4fc0cc209f9baa45ea92e50b16596dfd09f16a Mon Sep 17 00:00:00 2001 From: collin Date: Mon, 20 Apr 2020 18:52:39 -0700 Subject: [PATCH] add file docs --- src/aleo_program/constraints/boolean.rs | 6 ++++++ src/aleo_program/constraints/constraints.rs | 6 ++++++ src/aleo_program/constraints/expression.rs | 6 ++++++ src/aleo_program/constraints/field_element.rs | 6 ++++++ src/aleo_program/constraints/integer.rs | 6 ++++++ src/aleo_program/constraints/resolved_program.rs | 6 ++++++ src/aleo_program/constraints/resolved_value.rs | 6 ++++++ src/aleo_program/constraints/statement.rs | 6 ++++++ 8 files changed, 48 insertions(+) diff --git a/src/aleo_program/constraints/boolean.rs b/src/aleo_program/constraints/boolean.rs index 83c623c04c..abd9cb80de 100644 --- a/src/aleo_program/constraints/boolean.rs +++ b/src/aleo_program/constraints/boolean.rs @@ -1,3 +1,9 @@ +//! Methods to enforce constraints on booleans in a resolved aleo program. +//! +//! @file boolean.rs +//! @author Collin Chin +//! @date 2020 + use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue}; use crate::aleo_program::{BooleanExpression, BooleanSpreadOrExpression, Variable}; diff --git a/src/aleo_program/constraints/constraints.rs b/src/aleo_program/constraints/constraints.rs index 1a3d74e0a4..7a7581958e 100644 --- a/src/aleo_program/constraints/constraints.rs +++ b/src/aleo_program/constraints/constraints.rs @@ -1,3 +1,9 @@ +//! Methods to enforce constraints a resolved aleo program. +//! +//! @file constraints.rs +//! @author Collin Chin +//! @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::ast; diff --git a/src/aleo_program/constraints/expression.rs b/src/aleo_program/constraints/expression.rs index ae1b5ba927..303273c7f0 100644 --- a/src/aleo_program/constraints/expression.rs +++ b/src/aleo_program/constraints/expression.rs @@ -1,3 +1,9 @@ +//! Methods to enforce constraints on expressions in a resolved aleo program. +//! +//! @file expression.rs +//! @author Collin Chin +//! @date 2020 + use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue}; use crate::aleo_program::{ Expression, IntegerExpression, IntegerRangeOrExpression, StructMember, Variable, diff --git a/src/aleo_program/constraints/field_element.rs b/src/aleo_program/constraints/field_element.rs index f59a494f2d..c393f80b00 100644 --- a/src/aleo_program/constraints/field_element.rs +++ b/src/aleo_program/constraints/field_element.rs @@ -1,3 +1,9 @@ +//! Methods to enforce constraints on field elements in a resolved aleo program. +//! +//! @file field_element.rs +//! @author Collin Chin +//! @date 2020 + use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue}; use crate::aleo_program::{FieldExpression, FieldSpreadOrExpression, Variable}; diff --git a/src/aleo_program/constraints/integer.rs b/src/aleo_program/constraints/integer.rs index b72a7dc9e4..f8c968281d 100644 --- a/src/aleo_program/constraints/integer.rs +++ b/src/aleo_program/constraints/integer.rs @@ -1,3 +1,9 @@ +//! Methods to enforce constraints on integers in a resolved aleo program. +//! +//! @file integer.rs +//! @author Collin Chin +//! @date 2020 + use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue}; use crate::aleo_program::{Integer, IntegerExpression, IntegerSpreadOrExpression, Variable}; diff --git a/src/aleo_program/constraints/resolved_program.rs b/src/aleo_program/constraints/resolved_program.rs index d4006899dd..71bae7a1ef 100644 --- a/src/aleo_program/constraints/resolved_program.rs +++ b/src/aleo_program/constraints/resolved_program.rs @@ -1,3 +1,9 @@ +//! An in memory store to keep track of defined names when constraining an aleo program. +//! +//! @file resolved_program.rs +//! @author Collin Chin +//! @date 2020 + use crate::aleo_program::constraints::ResolvedValue; use crate::aleo_program::types::Variable; diff --git a/src/aleo_program/constraints/resolved_value.rs b/src/aleo_program/constraints/resolved_value.rs index 83ac2a827d..cf9d469484 100644 --- a/src/aleo_program/constraints/resolved_value.rs +++ b/src/aleo_program/constraints/resolved_value.rs @@ -1,3 +1,9 @@ +//! The in memory stored value for a defined name in a resolved aleo program. +//! +//! @file resolved_value.rs +//! @author Collin Chin +//! @date 2020 + use crate::aleo_program::types::{Function, Struct, StructMember, Variable}; use snarkos_models::curves::{Field, PrimeField}; diff --git a/src/aleo_program/constraints/statement.rs b/src/aleo_program/constraints/statement.rs index 021e0c70e8..71cd754f5b 100644 --- a/src/aleo_program/constraints/statement.rs +++ b/src/aleo_program/constraints/statement.rs @@ -1,3 +1,9 @@ +//! Methods to enforce constraints on statements in a resolved aleo program. +//! +//! @file statement.rs +//! @author Collin Chin +//! @date 2020 + use crate::aleo_program::constraints::{new_scope_from_variable, ResolvedProgram, ResolvedValue}; use crate::aleo_program::{ Assignee, Expression, IntegerExpression, IntegerRangeOrExpression, Statement, Variable,