Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::tracegen::RangeCheckTraceBuilder Class Referencefinal

#include <range_check_trace.hpp>

Public Member Functions

void process (const simulation::EventEmitterInterface< simulation::RangeCheckEvent >::Container &events, TraceContainer &trace)
 Processes range check events and populates the trace with decomposed value columns.
 

Static Public Attributes

static const InteractionDefinition interactions
 

Detailed Description

Definition at line 11 of file range_check_trace.hpp.

Member Function Documentation

◆ process()

void bb::avm2::tracegen::RangeCheckTraceBuilder::process ( const simulation::EventEmitterInterface< simulation::RangeCheckEvent >::Container &  events,
TraceContainer trace 
)

Processes range check events and populates the trace with decomposed value columns.

For each event, the value is decomposed into up to 8 sixteen-bit slices. The lower slices are placed in fixed registers (u16_r0..r6), while the most significant (potentially partial) slice goes into the dynamic register (u16_r7). A flag column (is_lte_u16..is_lte_u128) marks which bit-width bucket the value falls into, and lookup selectors are set for every fixed slice that is actually used. The dynamic slice is further constrained by recording its bit-width, the corresponding power of two, and the difference to the upper bound of that sub-range.

Parameters
eventsThe range check events emitted during witness generation.
traceThe trace container to populate.

Definition at line 26 of file range_check_trace.cpp.

Member Data Documentation

◆ interactions

const InteractionDefinition bb::avm2::tracegen::RangeCheckTraceBuilder::interactions
static
Initial value:
=
InteractionDefinition()
.add<lookup_range_check_dyn_rng_chk_pow_2_settings, InteractionType::LookupIntoIndexedByRow>()
.add<lookup_range_check_r1_is_u16_settings, InteractionType::LookupIntoIndexedByRow>()
.add<lookup_range_check_r3_is_u16_settings, InteractionType::LookupIntoIndexedByRow>()
.add<lookup_range_check_r5_is_u16_settings, InteractionType::LookupIntoIndexedByRow>()
.add<lookup_range_check_r7_is_u16_settings, InteractionType::LookupIntoIndexedByRow>()
lookup_settings< lookup_range_check_r4_is_u16_settings_ > lookup_range_check_r4_is_u16_settings
lookup_settings< lookup_range_check_dyn_diff_is_u16_settings_ > lookup_range_check_dyn_diff_is_u16_settings
lookup_settings< lookup_range_check_r2_is_u16_settings_ > lookup_range_check_r2_is_u16_settings
lookup_settings< lookup_range_check_r6_is_u16_settings_ > lookup_range_check_r6_is_u16_settings
lookup_settings< lookup_range_check_r0_is_u16_settings_ > lookup_range_check_r0_is_u16_settings

Definition at line 16 of file range_check_trace.hpp.


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