barretenberg
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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 (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 get_bit (Builder *builder, const size_t bit) const
 
void set_bit (const size_t bit, const bool value)
 
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_GET_BIT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the GET_BIT instruction.
 
static size_t execute_SET_BIT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the SET_BIT 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.

Member Function Documentation

◆ 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

◆ 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

◆ execute_GET_BIT()

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

Execute the GET_BIT instruction.

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

◆ 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

◆ 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

◆ 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

◆ execute_SET_BIT()

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

Execute the SET_BIT instruction.

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

◆ 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

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