Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear > Class Template Reference

Classes

class  InvalidWitness
 

Public Types

using Builder = Builder_
 
using AcirConstraint = AcirConstraint_
 

Public Member Functions

void generate_constraints (AcirConstraint &arithmetic_constraint, WitnessVector &witness_values)
 
void invalidate_witness (AcirConstraint &constraint, WitnessVector &witness_values, const typename InvalidWitness::Target &invalid_witness_target)
 

Static Public Member Functions

static constexpr size_t num_overlap_mul_and_linear ()
 Compute the number of elements to overlap between multiplication and linear terms.
 
static size_t expected_num_gates ()
 
static bb::fr evaluate_expression_result (const std::vector< std::tuple< bb::fr, std::pair< uint32_t, bb::fr >, std::pair< uint32_t, bb::fr > > > &mul_terms, const std::vector< std::pair< bb::fr, std::pair< uint32_t, bb::fr > > > &linear_terms, const std::vector< bb::fr > &witness_values)
 

Static Public Attributes

static constexpr bool IS_BIG_QUAD = std::is_same_v<AcirConstraint, std::vector<mul_quad_<typename Builder::FF>>>
 
static constexpr size_t NUM_OVERLAP_MUL_AND_LINEAR = num_overlap_mul_and_linear()
 
static constexpr size_t NUM_OVERLAP_LINEAR = 1
 
static constexpr size_t LINEAR_OFFSET = overlap_mul_and_linear ? NUM_OVERLAP_MUL_AND_LINEAR : 0U
 

Detailed Description

template<typename Builder_, typename AcirConstraint_, size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
class ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >

Definition at line 37 of file arithmetic_constraints.test.cpp.

Member Typedef Documentation

◆ AcirConstraint

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
using ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::AcirConstraint = AcirConstraint_

Definition at line 40 of file arithmetic_constraints.test.cpp.

◆ Builder

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
using ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::Builder = Builder_

Definition at line 39 of file arithmetic_constraints.test.cpp.

Member Function Documentation

◆ evaluate_expression_result()

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
static bb::fr ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::evaluate_expression_result ( const std::vector< std::tuple< bb::fr, std::pair< uint32_t, bb::fr >, std::pair< uint32_t, bb::fr > > > &  mul_terms,
const std::vector< std::pair< bb::fr, std::pair< uint32_t, bb::fr > > > &  linear_terms,
const std::vector< bb::fr > &  witness_values 
)
inlinestatic

Definition at line 116 of file arithmetic_constraints.test.cpp.

◆ expected_num_gates()

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
static size_t ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::expected_num_gates ( )
inlinestatic

Definition at line 70 of file arithmetic_constraints.test.cpp.

◆ generate_constraints()

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
void ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::generate_constraints ( AcirConstraint arithmetic_constraint,
WitnessVector witness_values 
)
inline

Definition at line 139 of file arithmetic_constraints.test.cpp.

◆ invalidate_witness()

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
void ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::invalidate_witness ( AcirConstraint constraint,
WitnessVector witness_values,
const typename InvalidWitness::Target invalid_witness_target 
)
inline

Definition at line 241 of file arithmetic_constraints.test.cpp.

◆ num_overlap_mul_and_linear()

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
static constexpr size_t ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::num_overlap_mul_and_linear ( )
inlinestaticconstexpr

Compute the number of elements to overlap between multiplication and linear terms.

Definition at line 47 of file arithmetic_constraints.test.cpp.

Member Data Documentation

◆ IS_BIG_QUAD

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
constexpr bool ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::IS_BIG_QUAD = std::is_same_v<AcirConstraint, std::vector<mul_quad_<typename Builder::FF>>>
staticconstexpr

Definition at line 42 of file arithmetic_constraints.test.cpp.

◆ LINEAR_OFFSET

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
constexpr size_t ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::LINEAR_OFFSET = overlap_mul_and_linear ? NUM_OVERLAP_MUL_AND_LINEAR : 0U
staticconstexpr

Definition at line 68 of file arithmetic_constraints.test.cpp.

◆ NUM_OVERLAP_LINEAR

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
constexpr size_t ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::NUM_OVERLAP_LINEAR = 1
staticconstexpr

Definition at line 67 of file arithmetic_constraints.test.cpp.

◆ NUM_OVERLAP_MUL_AND_LINEAR

template<typename Builder_ , typename AcirConstraint_ , size_t num_multiplication_terms, size_t num_linear_terms, bool overlap_mul_and_linear, bool overlap_linear>
constexpr size_t ArithmeticConstraintsTestingFunctions< Builder_, AcirConstraint_, num_multiplication_terms, num_linear_terms, overlap_mul_and_linear, overlap_linear >::NUM_OVERLAP_MUL_AND_LINEAR = num_overlap_mul_and_linear()
staticconstexpr

Definition at line 66 of file arithmetic_constraints.test.cpp.


The documentation for this class was generated from the following file: