Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
MixedLookupTest Class Reference
Inheritance diagram for MixedLookupTest:
GenericLookupRelationTest< SettingsMixedLookup >

Static Public Member Functions

static void check_two_row_sum (const RelationParameters< FF > &params, FF t1_row1=FF(1), FF t2_row1=FF(2), FF t3_row1=FF(3), FF read_count=FF(1), FF custom_t_row0=FF(27), FF read_count_customized=FF(1))
 Build and evaluate a canonical two-row mixed trace.
 
- Static Public Member Functions inherited from GenericLookupRelationTest< SettingsMixedLookup >
static Accumulator eval_row (const AllEntities &row, const RelationParameters< FF > &params, FF scaling_factor=FF(1))
 Accumulate a single row into a fresh accumulator.
 
static Accumulator eval_trace (const std::vector< AllEntities > &rows, const RelationParameters< FF > &params, FF scaling_factor=FF(1))
 Accumulate multiple rows into one accumulator.
 

Additional Inherited Members

- Public Types inherited from GenericLookupRelationTest< SettingsMixedLookup >
using Relation = GenericLookupRelationImpl< SettingsMixedLookup, FF >
 
using AllEntities = typename Settings::AllEntities
 
using Accumulator = std::array< FF, NUM_SUBRELATIONS >
 
- Static Public Attributes inherited from GenericLookupRelationTest< SettingsMixedLookup >
static constexpr size_t NUM_SUBRELATIONS
 

Detailed Description

Definition at line 759 of file generic_lookup_relation.test.cpp.

Member Function Documentation

◆ check_two_row_sum()

static void MixedLookupTest::check_two_row_sum ( const RelationParameters< FF > &  params,
FF  t1_row1 = FF(1),
FF  t2_row1 = FF(2),
FF  t3_row1 = FF(3),
FF  read_count = FF(1),
FF  custom_t_row0 = FF(27),
FF  read_count_customized = FF(1) 
)
inlinestatic

Build and evaluate a canonical two-row mixed trace.

Row 0: basic lookup (in[3]=1) + customized table (in[6]=1). f1=1, f2=2, f3=3 -> lookup_term_basic_row0 = 1*beta^2 + 2*beta + 3 + gamma custom_f=2 -> lookup_term_custom_row0 = 8 (used only in the inverse product) Dummy basic table cols: 1,1,1 custom_t_row0 -> table_term_custom_row0 = custom_t_row0 (default 27) read_count_customized = count for the customized table on row 0

Row 1: customized lookup (in[4]=1) + basic table (in[5]=1). Dummy basic lookup cols: 4,5,6 custom_f=3 -> lookup_term_custom_row1 = 27 t1,t2,t3 -> table_term_basic_row1 = t1*beta^2 + t2*beta + t3 + gamma (parametrized) read_count = count for the basic table on row 1

acc[1] = 1/lookup_term_basic_row0 - read_count/table_term_basic_row1

  • 1/lookup_term_custom_row1 - read_count_customized/table_term_custom_row0

Default (valid) parameters: t1=1, t2=2, t3=3 (matching lookup_term_basic_row0), custom_t_row0=27 (= 3^3, matching lookup_term_custom_row1), both read_counts=1 -> acc[1]=0.

Definition at line 783 of file generic_lookup_relation.test.cpp.


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