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

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

#include <uint.fuzzer.hpp>

Classes

class  Reference
 
class  Uint
 

Public Member Functions

 ExecutionHandler (Reference &r, Uint &u)
 
 ExecutionHandler (Reference r, Uint u)
 
 ExecutionHandler (Uint u)
 
ExecutionHandler operator+ (const ExecutionHandler &other) const
 
ExecutionHandler operator- (const ExecutionHandler &other) const
 
ExecutionHandler operator* (const ExecutionHandler &other) const
 
ExecutionHandler operator/ (const ExecutionHandler &other) const
 
ExecutionHandler operator% (const ExecutionHandler &other) const
 
ExecutionHandler operator& (const ExecutionHandler &other) const
 
ExecutionHandler operator| (const ExecutionHandler &other) const
 
ExecutionHandler operator^ (const ExecutionHandler &other) const
 
ExecutionHandler get_bit (Builder *builder, const size_t bit) const
 
ExecutionHandler shl (const size_t bits) const
 
ExecutionHandler shr (const size_t bits) const
 
ExecutionHandler rol (const size_t bits) const
 
ExecutionHandler ror (const size_t bits) const
 
ExecutionHandler not_ (void) const
 
ExecutionHandler set (Builder *builder) const
 

Static Public Member Functions

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_ADD (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the addition operator instruction.
 
static size_t execute_SUBTRACT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the subtraction operator instruction.
 
static size_t execute_MULTIPLY (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the multiply instruction.
 
static size_t execute_DIVIDE (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the division operator instruction.
 
static size_t execute_MODULO (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the modulo operator instruction.
 
static size_t execute_AND (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the and operator instruction.
 
static size_t execute_OR (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the or operator instruction.
 
static size_t execute_XOR (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the xor operator instruction.
 
static size_t execute_GET_BIT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the GET_BIT instruction.
 
static size_t execute_SHL (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the left-shift operator instruction.
 
static size_t execute_SHR (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the right-shift operator instruction.
 
static size_t execute_ROL (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the left-rotate operator instruction.
 
static size_t execute_ROR (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the right-rotate operator instruction.
 
static size_t execute_NOT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the NOT 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

Reference ref
 
Uint uint
 

Detailed Description

template<typename Builder>
class UintFuzzBase< 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 UintFuzzBase< Builder >::ExecutionHandler::execute_ADD ( Builder builder,
std::vector< ExecutionHandler > &  stack,
Instruction instruction 
)
inlinestatic

Execute the addition operator instruction.

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

◆ execute_AND()

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

Execute the and operator 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 UintFuzzBase< 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_DIVIDE()

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

Execute the division operator instruction.

Parameters
builder
stack
instruction
Returns
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 UintFuzzBase< 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_MODULO()

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

Execute the modulo operator instruction.

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

◆ execute_MULTIPLY()

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

Execute the multiply instruction.

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

◆ execute_NOT()

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

Execute the NOT instruction.

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

◆ execute_OR()

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

Execute the or operator 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 UintFuzzBase< 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_ROL()

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

Execute the left-rotate operator instruction.

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

◆ execute_ROR()

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

Execute the right-rotate operator 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 UintFuzzBase< 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_SHL()

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

Execute the left-shift operator instruction.

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

◆ execute_SHR()

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

Execute the right-shift operator instruction.

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

◆ execute_SUBTRACT()

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

Execute the subtraction operator instruction.

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

◆ execute_XOR()

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

Execute the xor operator 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: