pub struct ConstraintBuilderEnv<F: PrimeField, LT: LookupTableID> {
pub constraints: Vec<Expr<ConstantExpr<F, BerkeleyChallengeTerm>, Column>>,
pub lookup_reads: BTreeMap<LT, Vec<Vec<E<F>>>>,
pub lookup_writes: BTreeMap<LT, Vec<Vec<E<F>>>>,
pub assert_mapper: Box<dyn Fn(E<F>) -> E<F>>,
}
Fields§
§constraints: Vec<Expr<ConstantExpr<F, BerkeleyChallengeTerm>, Column>>
An indexed set of constraints.
lookup_reads: BTreeMap<LT, Vec<Vec<E<F>>>>
Aggregated lookups or “reads”.
lookup_writes: BTreeMap<LT, Vec<Vec<E<F>>>>
Aggregated “write” lookups, for runtime tables.
assert_mapper: Box<dyn Fn(E<F>) -> E<F>>
The function that maps the argument of assert_zero
.
Implementations§
source§impl<F: PrimeField, LT: LookupTableID> ConstraintBuilderEnv<F, LT>
impl<F: PrimeField, LT: LookupTableID> ConstraintBuilderEnv<F, LT>
source§impl<F: PrimeField, LT: LookupTableID> ConstraintBuilderEnv<F, LT>
impl<F: PrimeField, LT: LookupTableID> ConstraintBuilderEnv<F, LT>
sourcepub fn get_relation_constraints(&self) -> Vec<E<F>>
pub fn get_relation_constraints(&self) -> Vec<E<F>>
Get constraints related to the application logic itself.
sourcepub fn get_lookup_constraints(&self) -> Vec<E<F>>
pub fn get_lookup_constraints(&self) -> Vec<E<F>>
Get constraints related to the lookup argument.
sourcepub fn get_constraints(&self) -> Vec<E<F>>
pub fn get_constraints(&self) -> Vec<E<F>>
Get all relevant constraints generated by the constraint builder.
Trait Implementations§
source§impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> ColAccessCap<F, CIx> for ConstraintBuilderEnv<F, LT>
impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> ColAccessCap<F, CIx> for ConstraintBuilderEnv<F, LT>
type Variable = Operations<ExprInner<Operations<ConstantExprInner<F, BerkeleyChallengeTerm>>, Column>>
source§fn assert_zero(&mut self, cst: Self::Variable)
fn assert_zero(&mut self, cst: Self::Variable)
Asserts that the value is zero.
source§fn set_assert_mapper(
&mut self,
mapper: Box<dyn Fn(Self::Variable) -> Self::Variable>
)
fn set_assert_mapper( &mut self, mapper: Box<dyn Fn(Self::Variable) -> Self::Variable> )
Sets an assert predicate
f(X)
such that when assert_zero is
called on x, it will actually perform assert_zero(f(x))
.source§fn read_column(&self, position: CIx) -> Self::Variable
fn read_column(&self, position: CIx) -> Self::Variable
Reads value from a column position.
source§impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> HybridCopyCap<F, CIx> for ConstraintBuilderEnv<F, LT>
impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> HybridCopyCap<F, CIx> for ConstraintBuilderEnv<F, LT>
source§impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> HybridSerHelpers<F, CIx, LT> for ConstraintBuilderEnv<F, LT>
impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> HybridSerHelpers<F, CIx, LT> for ConstraintBuilderEnv<F, LT>
source§fn bitmask_be(
&mut self,
_x: &<Self as ColAccessCap<F, CIx>>::Variable,
_highest_bit: u32,
_lowest_bit: u32,
position: CIx
) -> <Self as ColAccessCap<F, CIx>>::Variable
fn bitmask_be( &mut self, _x: &<Self as ColAccessCap<F, CIx>>::Variable, _highest_bit: u32, _lowest_bit: u32, position: CIx ) -> <Self as ColAccessCap<F, CIx>>::Variable
Returns the bits between [highest_bit, lowest_bit] of the variable
x
,
and copy the result in the column position
.
The value x
is expected to be encoded in big-endiansource§impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> LookupCap<F, CIx, LT> for ConstraintBuilderEnv<F, LT>
impl<F: PrimeField, CIx: ColumnIndexer, LT: LookupTableID> LookupCap<F, CIx, LT> for ConstraintBuilderEnv<F, LT>
Auto Trait Implementations§
impl<F, LT> !RefUnwindSafe for ConstraintBuilderEnv<F, LT>
impl<F, LT> !Send for ConstraintBuilderEnv<F, LT>
impl<F, LT> !Sync for ConstraintBuilderEnv<F, LT>
impl<F, LT> Unpin for ConstraintBuilderEnv<F, LT>where F: Unpin,
impl<F, LT> !UnwindSafe for ConstraintBuilderEnv<F, LT>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more