mod constraint_system_ref;
mod namespace;
#[macro_use]
mod constraint_system;
mod assignment;
pub(crate) mod field_interner;
mod lc_map;
pub mod instance_outliner;
pub mod predicate;
#[cfg(feature = "std")]
pub mod trace;
#[cfg(test)]
mod tests;
#[cfg(feature = "std")]
pub use crate::gr1cs::trace::{ConstraintLayer, ConstraintTrace, TraceStep, TracingMode};
use ark_std::vec::Vec;
pub use tracing::info_span;
pub use ark_ff::{Field, ToConstraintField};
pub use crate::{
gr1cs::{
assignment::Assignments, constraint_system::ConstraintSystem,
constraint_system_ref::ConstraintSystemRef,
predicate::polynomial_constraint::R1CS_PREDICATE_LABEL,
},
lc,
utils::{
error::SynthesisError,
linear_combination::LinearCombination,
matrix::{mat_vec_mul, transpose, Matrix},
variable::Variable,
Result,
},
};
pub use namespace::Namespace;
pub trait ConstraintSynthesizer<F: Field> {
fn generate_constraints(self, cs: ConstraintSystemRef<F>) -> crate::gr1cs::Result<()>;
}
pub type Constraint = Vec<Variable>;
pub type Label = ark_std::string::String;
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
pub enum SynthesisMode {
Setup,
Prove {
construct_matrices: bool,
generate_lc_assignments: bool,
},
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
pub enum OptimizationGoal {
None,
Constraints,
#[deprecated]
Weight,
}