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

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

#include <bigfield.fuzzer.hpp>

Public Member Functions

 ExecutionHandler (fq a, bigfield_t b)
 
 ExecutionHandler (fq a, bigfield_t &b)
 
 ExecutionHandler (fq &a, bigfield_t &b)
 
ExecutionHandler operator+ (const ExecutionHandler &other)
 
ExecutionHandler operator- (const ExecutionHandler &other)
 
ExecutionHandler operator* (const ExecutionHandler &other)
 
ExecutionHandler sqr ()
 
ExecutionHandler operator/ (const ExecutionHandler &other)
 
ExecutionHandler madd (const ExecutionHandler &other1, const ExecutionHandler &other2)
 
ExecutionHandler sqr_add (const std::vector< ExecutionHandler > &to_add)
 
void assert_equal (ExecutionHandler &other)
 
void assert_not_equal (ExecutionHandler &other)
 
ExecutionHandler conditional_negate (Builder *builder, const bool predicate)
 
ExecutionHandler conditional_select (Builder *builder, ExecutionHandler &other, const bool predicate)
 
ExecutionHandler set (Builder *builder)
 

Static Public Member Functions

static ExecutionHandler mult_madd (const std::vector< ExecutionHandler > &input_left, const std::vector< ExecutionHandler > &input_right, const std::vector< ExecutionHandler > &to_add)
 
static ExecutionHandler msub_div (const std::vector< ExecutionHandler > &input_left, const std::vector< ExecutionHandler > &input_right, const ExecutionHandler &divisor, const std::vector< ExecutionHandler > &to_sub)
 
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_WITNESS (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the witness instruction (push witness safeuit to the stack)
 
static size_t execute_CONSTANT_WITNESS (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the constant_witness instruction (push a safeuint witness equal to the constant to the stack)
 
static size_t execute_MULTIPLY (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the multiply instruction.
 
static size_t execute_ADD (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the addition operator instruction.
 
static size_t execute_SQR (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the SQR instruction.
 
static size_t execute_ASSERT_EQUAL (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the ASSERT_EQUAL instruction.
 
static size_t execute_ASSERT_NOT_EQUAL (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the ASSERT_NOT_EQUAL instruction.
 
static size_t execute_SUBTRACT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the subtraction operator instruction.
 
static size_t execute_DIVIDE (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the division operator instruction.
 
static size_t execute_MADD (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the MADD instruction.
 
static size_t execute_MULT_MADD (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the MULT_MADD instruction.
 
static size_t execute_MSUB_DIV (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the MSUB_DIV instruction.
 
static size_t execute_SQR_ADD (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the SQR_ADD instruction.
 
static size_t execute_COND_NEGATE (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the COND_NEGATE instruction.
 
static size_t execute_COND_SELECT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the COND_SELECT 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

fq base
 
bigfield_t bigfield
 

Detailed Description

template<typename Builder>
class BigFieldBase< 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 BigFieldBase< 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_ASSERT_EQUAL()

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

Execute the ASSERT_EQUAL instruction.

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

◆ execute_ASSERT_NOT_EQUAL()

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

Execute the ASSERT_NOT_EQUAL instruction.

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

◆ execute_COND_NEGATE()

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

Execute the COND_NEGATE instruction.

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

◆ execute_COND_SELECT()

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

Execute the COND_SELECT 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 BigFieldBase< 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_CONSTANT_WITNESS()

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

Execute the constant_witness instruction (push a safeuint witness equal to the constant 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 BigFieldBase< 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_MADD()

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

Execute the MADD instruction.

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

◆ execute_MSUB_DIV()

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

Execute the MSUB_DIV instruction.

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

◆ execute_MULT_MADD()

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

Execute the MULT_MADD instruction.

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

◆ execute_MULTIPLY()

template<typename Builder >
static size_t BigFieldBase< 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_RANDOMSEED()

template<typename Builder >
static size_t BigFieldBase< 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 BigFieldBase< 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_SQR()

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

Execute the SQR instruction.

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

◆ execute_SQR_ADD()

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

Execute the SQR_ADD instruction.

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

◆ execute_SUBTRACT()

template<typename Builder >
static size_t BigFieldBase< 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_WITNESS()

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

Execute the witness instruction (push witness safeuit to the stack)

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: