Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
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 ()=default
 
 ExecutionHandler (bb::fq a, bigfield_t b)
 
 ExecutionHandler (bb::fq a, bigfield_t &b)
 
 ExecutionHandler (bb::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 add_two (const ExecutionHandler &other1, const ExecutionHandler &other2)
 
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_ADD_TWO (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the ADD_TWO 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

bb::fq base
 
bigfield_t bigfield
 

Private Member Functions

bigfield_t bf () const
 
uint256_t bf_u256 (void) const
 

Static Private Member Functions

static bool_t construct_predicate (Builder *builder, const bool predicate)
 

Detailed Description

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

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

Definition at line 794 of file bigfield.fuzzer.hpp.

Constructor & Destructor Documentation

◆ ExecutionHandler() [1/4]

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

◆ ExecutionHandler() [2/4]

template<typename Builder >
BigFieldBase< Builder >::ExecutionHandler::ExecutionHandler ( bb::fq  a,
bigfield_t  b 
)
inline

Definition at line 829 of file bigfield.fuzzer.hpp.

◆ ExecutionHandler() [3/4]

template<typename Builder >
BigFieldBase< Builder >::ExecutionHandler::ExecutionHandler ( bb::fq  a,
bigfield_t b 
)
inline

Definition at line 848 of file bigfield.fuzzer.hpp.

◆ ExecutionHandler() [4/4]

template<typename Builder >
BigFieldBase< Builder >::ExecutionHandler::ExecutionHandler ( bb::fq a,
bigfield_t b 
)
inline

Definition at line 864 of file bigfield.fuzzer.hpp.

Member Function Documentation

◆ add_two()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::add_two ( const ExecutionHandler other1,
const ExecutionHandler other2 
)
inline

Definition at line 934 of file bigfield.fuzzer.hpp.

◆ assert_equal()

template<typename Builder >
void BigFieldBase< Builder >::ExecutionHandler::assert_equal ( ExecutionHandler other)
inline

Definition at line 1006 of file bigfield.fuzzer.hpp.

◆ assert_not_equal()

template<typename Builder >
void BigFieldBase< Builder >::ExecutionHandler::assert_not_equal ( ExecutionHandler other)
inline

Definition at line 1070 of file bigfield.fuzzer.hpp.

◆ bf()

template<typename Builder >
bigfield_t BigFieldBase< Builder >::ExecutionHandler::bf ( ) const
inlineprivate

Definition at line 806 of file bigfield.fuzzer.hpp.

◆ bf_u256()

template<typename Builder >
uint256_t BigFieldBase< Builder >::ExecutionHandler::bf_u256 ( void  ) const
inlineprivate

Definition at line 820 of file bigfield.fuzzer.hpp.

◆ conditional_negate()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::conditional_negate ( Builder builder,
const bool  predicate 
)
inline

Definition at line 1079 of file bigfield.fuzzer.hpp.

◆ conditional_select()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::conditional_select ( Builder builder,
ExecutionHandler other,
const bool  predicate 
)
inline

Definition at line 1085 of file bigfield.fuzzer.hpp.

◆ construct_predicate()

template<typename Builder >
static bool_t BigFieldBase< Builder >::ExecutionHandler::construct_predicate ( Builder builder,
const bool  predicate 
)
inlinestaticprivate

Definition at line 796 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1263 of file bigfield.fuzzer.hpp.

◆ execute_ADD_TWO()

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

Execute the ADD_TWO 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 1472 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1334 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1362 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1760 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1796 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1155 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1206 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1429 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1508 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1617 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1544 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1227 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1867 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1834 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1299 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1700 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1394 of file bigfield.fuzzer.hpp.

◆ 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

Definition at line 1177 of file bigfield.fuzzer.hpp.

◆ madd()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::madd ( const ExecutionHandler other1,
const ExecutionHandler other2 
)
inline

Definition at line 939 of file bigfield.fuzzer.hpp.

◆ msub_div()

template<typename Builder >
static ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::msub_div ( const std::vector< ExecutionHandler > &  input_left,
const std::vector< ExecutionHandler > &  input_right,
const ExecutionHandler divisor,
const std::vector< ExecutionHandler > &  to_sub 
)
inlinestatic

Definition at line 975 of file bigfield.fuzzer.hpp.

◆ mult_madd()

template<typename Builder >
static ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::mult_madd ( const std::vector< ExecutionHandler > &  input_left,
const std::vector< ExecutionHandler > &  input_right,
const std::vector< ExecutionHandler > &  to_add 
)
inlinestatic

Definition at line 956 of file bigfield.fuzzer.hpp.

◆ operator*()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::operator* ( const ExecutionHandler other)
inline

Definition at line 888 of file bigfield.fuzzer.hpp.

◆ operator+()

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

Definition at line 880 of file bigfield.fuzzer.hpp.

◆ operator-()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::operator- ( const ExecutionHandler other)
inline

Definition at line 884 of file bigfield.fuzzer.hpp.

◆ operator/()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::operator/ ( const ExecutionHandler other)
inline

Definition at line 893 of file bigfield.fuzzer.hpp.

◆ set()

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

Definition at line 1091 of file bigfield.fuzzer.hpp.

◆ sqr()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::sqr ( )
inline

Definition at line 892 of file bigfield.fuzzer.hpp.

◆ sqr_add()

template<typename Builder >
ExecutionHandler BigFieldBase< Builder >::ExecutionHandler::sqr_add ( const std::vector< ExecutionHandler > &  to_add)
inline

Definition at line 945 of file bigfield.fuzzer.hpp.

Member Data Documentation

◆ base

template<typename Builder >
bb::fq BigFieldBase< Builder >::ExecutionHandler::base

Definition at line 826 of file bigfield.fuzzer.hpp.

◆ bigfield

template<typename Builder >
bigfield_t BigFieldBase< Builder >::ExecutionHandler::bigfield

Definition at line 827 of file bigfield.fuzzer.hpp.


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