Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
MemoryTests_< Flavor > Class Template Reference
Inheritance diagram for MemoryTests_< Flavor >:
bb::UltraHonkTests< Flavor >

Public Types

enum class  ROMFailureType { DoubleInit , SingleReadAtPair }
 
using NativeRomTable = std::vector< std::array< fr, 2 > >
 
using NativeRamTable = std::vector< fr >
 
- Public Types inherited from bb::UltraHonkTests< Flavor >
using ProverInstance = ProverInstance_< Flavor >
 
using VerificationKey = typename Flavor::VerificationKey
 
using Prover = UltraProver_< Flavor >
 
using Verifier = UltraVerifier_< Flavor >
 

Static Public Member Functions

static void build_random_ROM_table (auto &circuit_builder, size_t array_length, size_t num_pair_elts_in_ROM_table=0, const size_t read_operations=0, bool final_arithmetic_gate_and_read=true)
 build a random ROM table, together with some read ops and an arithmetic gate. includes several compatibility checks, both "native" and on the level of the circuit.
 
static void build_ROM_table_length_zero (auto &circuit_builder)
 
static void build_ROM_table_with_uninitialized_values (auto &circuit_builder, size_t array_length)
 
static void build_failing_ROM_table (auto &circuit_builder, size_t array_length, ROMFailureType rom_failure_type)
 
static void build_random_RAM_table (auto &circuit_builder, size_t array_length, const size_t read_write_operations=0, bool final_arithmetic_gate_and_read=true)
 
static void build_RAM_table_length_zero (auto &circuit_builder)
 

Additional Inherited Members

- Public Member Functions inherited from bb::UltraHonkTests< Flavor >
std::vector< uint32_t > add_variables (auto &circuit_builder, std::vector< bb::fr > variables)
 
void set_default_pairing_points_and_ipa_claim_and_proof (UltraCircuitBuilder &builder)
 
void prove_and_verify (typename Flavor::CircuitBuilder &circuit_builder, bool expected_result)
 
void prove_and_verify (const std::shared_ptr< ProverInstance > &prover_instance, bool expected_result)
 
- Static Protected Member Functions inherited from bb::UltraHonkTests< Flavor >
static void SetUpTestSuite ()
 

Detailed Description

template<typename Flavor>
class MemoryTests_< Flavor >

Definition at line 21 of file rom_ram.test.cpp.

Member Typedef Documentation

◆ NativeRamTable

template<typename Flavor >
using MemoryTests_< Flavor >::NativeRamTable = std::vector<fr>

Definition at line 26 of file rom_ram.test.cpp.

◆ NativeRomTable

template<typename Flavor >
using MemoryTests_< Flavor >::NativeRomTable = std::vector<std::array<fr, 2> >

Definition at line 25 of file rom_ram.test.cpp.

Member Enumeration Documentation

◆ ROMFailureType

template<typename Flavor >
enum class MemoryTests_::ROMFailureType
strong
Enumerator
DoubleInit 
SingleReadAtPair 

Definition at line 27 of file rom_ram.test.cpp.

Member Function Documentation

◆ build_failing_ROM_table()

template<typename Flavor >
static void MemoryTests_< Flavor >::build_failing_ROM_table ( auto &  circuit_builder,
size_t  array_length,
ROMFailureType  rom_failure_type 
)
inlinestatic

Definition at line 178 of file rom_ram.test.cpp.

◆ build_RAM_table_length_zero()

template<typename Flavor >
static void MemoryTests_< Flavor >::build_RAM_table_length_zero ( auto &  circuit_builder)
inlinestatic

Definition at line 295 of file rom_ram.test.cpp.

◆ build_random_RAM_table()

template<typename Flavor >
static void MemoryTests_< Flavor >::build_random_RAM_table ( auto &  circuit_builder,
size_t  array_length,
const size_t  read_write_operations = 0,
bool  final_arithmetic_gate_and_read = true 
)
inlinestatic

Definition at line 205 of file rom_ram.test.cpp.

◆ build_random_ROM_table()

template<typename Flavor >
static void MemoryTests_< Flavor >::build_random_ROM_table ( auto &  circuit_builder,
size_t  array_length,
size_t  num_pair_elts_in_ROM_table = 0,
const size_t  read_operations = 0,
bool  final_arithmetic_gate_and_read = true 
)
inlinestatic

build a random ROM table, together with some read ops and an arithmetic gate. includes several compatibility checks, both "native" and on the level of the circuit.

Parameters
circuit_builder
array_length
num_pair_elts_in_ROM_table// ROM tables allow for entering in single elements or pairs of elements; this is the number of pairs of elements in our table.
read_operations
final_arithmetic_gate_and_read// if true, then we add an arithmetic gate (using reads and our native memory table), then a final read operation.

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

◆ build_ROM_table_length_zero()

template<typename Flavor >
static void MemoryTests_< Flavor >::build_ROM_table_length_zero ( auto &  circuit_builder)
inlinestatic

Definition at line 173 of file rom_ram.test.cpp.

◆ build_ROM_table_with_uninitialized_values()

template<typename Flavor >
static void MemoryTests_< Flavor >::build_ROM_table_with_uninitialized_values ( auto &  circuit_builder,
size_t  array_length 
)
inlinestatic

Definition at line 174 of file rom_ram.test.cpp.


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