Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ByteArrayFuzzBase< Builder >::ExecutionHandler Class Reference

This class implements the execution of safeuint with an oracle to detect discrepancies. More...

#include <byte_array.fuzzer.hpp>

Public Member Functions

std::optional< field_tto_field_t (std::optional< size_t > max_msb=std::nullopt) const
 
 ExecutionHandler ()=default
 
 ExecutionHandler (std::vector< uint8_t > &r, byte_array_t &s)
 
 ExecutionHandler (std::vector< uint8_t > r, byte_array_t s)
 
 ExecutionHandler (byte_array_t s)
 
ExecutionHandler reverse () const
 
ExecutionHandler slice (const size_t offset, const size_t length) const
 
ExecutionHandler operator+ (const ExecutionHandler &other)
 
ExecutionHandler set (Builder *builder)
 

Static Public Member Functions

static std::vector< uint8_t > get_value (const byte_array_t &byte_array)
 
static const std::vector< uint8_t > & bool_to_vector (const bool &b)
 
static size_t execute_CONSTANT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the constant instruction (push constant safeuint to the stack)
 
static size_t execute_REVERSE (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the REVERSE instruction.
 
static size_t execute_SLICE (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the slice instruction.
 
static size_t execute_ADD (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the ADD (append) instruction.
 
static size_t execute_SET (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the SET instruction.
 
static size_t execute_RANDOMSEED (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the RANDOMSEED instruction.
 

Public Attributes

std::vector< uint8_t > reference_value
 
byte_array_t byte_array { nullptr, std::vector<uint8_t>{} }
 

Detailed Description

template<typename Builder>
class ByteArrayFuzzBase< Builder >::ExecutionHandler

This class implements the execution of safeuint with an oracle to detect discrepancies.

Definition at line 345 of file byte_array.fuzzer.hpp.

Constructor & Destructor Documentation

◆ ExecutionHandler() [1/4]

template<typename Builder >
ByteArrayFuzzBase< Builder >::ExecutionHandler::ExecutionHandler ( )
default

◆ ExecutionHandler() [2/4]

template<typename Builder >
ByteArrayFuzzBase< Builder >::ExecutionHandler::ExecutionHandler ( std::vector< uint8_t > &  r,
byte_array_t s 
)
inline

Definition at line 394 of file byte_array.fuzzer.hpp.

◆ ExecutionHandler() [3/4]

template<typename Builder >
ByteArrayFuzzBase< Builder >::ExecutionHandler::ExecutionHandler ( std::vector< uint8_t >  r,
byte_array_t  s 
)
inline

Definition at line 398 of file byte_array.fuzzer.hpp.

◆ ExecutionHandler() [4/4]

template<typename Builder >
ByteArrayFuzzBase< Builder >::ExecutionHandler::ExecutionHandler ( byte_array_t  s)
inline

Definition at line 402 of file byte_array.fuzzer.hpp.

Member Function Documentation

◆ bool_to_vector()

template<typename Builder >
static const std::vector< uint8_t > & ByteArrayFuzzBase< Builder >::ExecutionHandler::bool_to_vector ( const bool &  b)
inlinestatic

Definition at line 363 of file byte_array.fuzzer.hpp.

◆ execute_ADD()

template<typename Builder >
static size_t ByteArrayFuzzBase< Builder >::ExecutionHandler::execute_ADD ( Builder builder,
std::vector< ExecutionHandler > &  stack,
Instruction instruction 
)
inlinestatic

Execute the ADD (append) instruction.

Parameters
builder
stack
instruction
Returns
if everything is ok, 1 if we should stop execution, since an expected error was encountered

Definition at line 686 of file byte_array.fuzzer.hpp.

◆ execute_CONSTANT()

template<typename Builder >
static size_t ByteArrayFuzzBase< Builder >::ExecutionHandler::execute_CONSTANT ( Builder builder,
std::vector< ExecutionHandler > &  stack,
Instruction instruction 
)
inlinestatic

Execute the constant instruction (push constant safeuint to the stack)

Parameters
builder
stack
instruction
Returns
0 if everything is ok, 1 if we should stop execution, since an expected error was encountered

Definition at line 573 of file byte_array.fuzzer.hpp.

◆ execute_RANDOMSEED()

template<typename Builder >
static size_t ByteArrayFuzzBase< Builder >::ExecutionHandler::execute_RANDOMSEED ( Builder builder,
std::vector< ExecutionHandler > &  stack,
Instruction instruction 
)
inlinestatic

Execute the RANDOMSEED instruction.

Parameters
builder
stack
instruction
Returns
if everything is ok, 1 if we should stop execution, since an expected error was encountered

Definition at line 760 of file byte_array.fuzzer.hpp.

◆ execute_REVERSE()

template<typename Builder >
static size_t ByteArrayFuzzBase< Builder >::ExecutionHandler::execute_REVERSE ( Builder builder,
std::vector< ExecutionHandler > &  stack,
Instruction instruction 
)
inlinestatic

Execute the REVERSE instruction.

Parameters
builder
stack
instruction
Returns
if everything is ok, 1 if we should stop execution, since an expected error was encountered

Definition at line 609 of file byte_array.fuzzer.hpp.

◆ execute_SET()

template<typename Builder >
static size_t ByteArrayFuzzBase< Builder >::ExecutionHandler::execute_SET ( Builder builder,
std::vector< ExecutionHandler > &  stack,
Instruction instruction 
)
inlinestatic

Execute the SET instruction.

Parameters
builder
stack
instruction
Returns
if everything is ok, 1 if we should stop execution, since an expected error was encountered

Definition at line 725 of file byte_array.fuzzer.hpp.

◆ execute_SLICE()

template<typename Builder >
static size_t ByteArrayFuzzBase< Builder >::ExecutionHandler::execute_SLICE ( Builder builder,
std::vector< ExecutionHandler > &  stack,
Instruction instruction 
)
inlinestatic

Execute the slice instruction.

Parameters
builder
stack
instruction
Returns
if everything is ok, 1 if we should stop execution, since an expected error was encountered size_t

Definition at line 643 of file byte_array.fuzzer.hpp.

◆ get_value()

template<typename Builder >
static std::vector< uint8_t > ByteArrayFuzzBase< Builder >::ExecutionHandler::get_value ( const byte_array_t byte_array)
inlinestatic

Definition at line 351 of file byte_array.fuzzer.hpp.

◆ operator+()

template<typename Builder >
ExecutionHandler ByteArrayFuzzBase< Builder >::ExecutionHandler::operator+ ( const ExecutionHandler other)
inline

Definition at line 445 of file byte_array.fuzzer.hpp.

◆ reverse()

template<typename Builder >
ExecutionHandler ByteArrayFuzzBase< Builder >::ExecutionHandler::reverse ( ) const
inline

Definition at line 407 of file byte_array.fuzzer.hpp.

◆ set()

template<typename Builder >
ExecutionHandler ByteArrayFuzzBase< Builder >::ExecutionHandler::set ( Builder builder)
inline

Definition at line 461 of file byte_array.fuzzer.hpp.

◆ slice()

template<typename Builder >
ExecutionHandler ByteArrayFuzzBase< Builder >::ExecutionHandler::slice ( const size_t  offset,
const size_t  length 
) const
inline

Definition at line 414 of file byte_array.fuzzer.hpp.

◆ to_field_t()

template<typename Builder >
std::optional< field_t > ByteArrayFuzzBase< Builder >::ExecutionHandler::to_field_t ( std::optional< size_t >  max_msb = std::nullopt) const
inline

Definition at line 369 of file byte_array.fuzzer.hpp.

Member Data Documentation

◆ byte_array

template<typename Builder >
byte_array_t ByteArrayFuzzBase< Builder >::ExecutionHandler::byte_array { nullptr, std::vector<uint8_t>{} }

Definition at line 349 of file byte_array.fuzzer.hpp.

◆ reference_value

template<typename Builder >
std::vector<uint8_t> ByteArrayFuzzBase< Builder >::ExecutionHandler::reference_value

Definition at line 347 of file byte_array.fuzzer.hpp.


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