barretenberg
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
BitArrayFuzzBase< Builder >::ExecutionHandler Class Reference

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

#include <bit_array.fuzzer.hpp>

Public Member Functions

 ExecutionHandler (std::vector< uint8_t > &r, bit_array_t &s)
 
 ExecutionHandler (std::vector< uint8_t > r, bit_array_t s)
 
 ExecutionHandler (bit_array_t s)
 
ExecutionHandler get_bit (Builder *builder, const size_t bit) const
 
void set_bit (const size_t bit, const bool value)
 
ExecutionHandler slice (Builder *builder, const size_t offset)
 
ExecutionHandler set (Builder *builder)
 

Static Public Member Functions

static bool get_bit (const std::vector< uint8_t > &v, size_t bit, const bool rev=true)
 
static void set_bit (std::vector< uint8_t > &v, size_t bit, const bool value, const bool rev=true)
 
static std::vector< uint8_t > get_value (bit_array_t &bit_array)
 
static std::vector< uint8_t > v32_to_v8 (const std::vector< uint32_t > &v)
 
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_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_SLICE (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the SLICE 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
 
bit_array_t bit_array { nullptr, std::vector<uint8_t>{} }
 

Detailed Description

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

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

Member Function Documentation

◆ execute_CONSTANT()

template<typename Builder >
static size_t BitArrayFuzzBase< 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 BitArrayFuzzBase< 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 BitArrayFuzzBase< 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_SET()

template<typename Builder >
static size_t BitArrayFuzzBase< 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 BitArrayFuzzBase< 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 BitArrayFuzzBase< 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

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