Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
CycleGroupBase< Builder >::ExecutionHandler Class Reference

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

#include <cycle_group.fuzzer.hpp>

Public Member Functions

 ExecutionHandler ()=default
 
 ExecutionHandler (ScalarField s, GroupElement g, cycle_group_t w_g)
 
ExecutionHandler operator_add (Builder *builder, const ExecutionHandler &other)
 
ExecutionHandler operator_sub (Builder *builder, const ExecutionHandler &other)
 
ExecutionHandler mul (Builder *builder, const ScalarField &multiplier)
 
ExecutionHandler operator- ()
 
ExecutionHandler dbl ()
 
ExecutionHandler conditional_assign (Builder *builder, ExecutionHandler &other, const bool predicate)
 
void assert_equal (Builder *builder, ExecutionHandler &other)
 
ExecutionHandler set (Builder *builder)
 
ExecutionHandler set_inf (Builder *builder)
 

Static Public Member Functions

static ExecutionHandler batch_mul (Builder *builder, const std::vector< ExecutionHandler > &to_add, const std::vector< ScalarField > &to_mul)
 
static size_t execute_CONSTANT (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the constant instruction (push constant cycle group to the stack)
 
static size_t execute_WITNESS (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the witness instruction (push witness cycle group 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_DBL (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the DBL instruction.
 
static size_t execute_NEG (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the NEG instruction.
 
static size_t execute_ASSERT_EQUAL (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the ASSERT_EQUAL instruction.
 
static size_t execute_SET (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the SET instruction.
 
static size_t execute_SET_INF (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the SET_INF instruction.
 
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_COND_ASSIGN (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the COND_ASSIGN instruction.
 
static size_t execute_MULTIPLY (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the multiply instruction.
 
static size_t execute_BATCH_MUL (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the BATCH_MUL instruction.
 
static size_t execute_RANDOMSEED (Builder *builder, std::vector< ExecutionHandler > &stack, Instruction &instruction)
 Execute the RANDOMSEED instruction.
 

Public Attributes

ScalarField base_scalar
 
GroupElement base
 
cycle_group_t cycle_group
 

Private Member Functions

cycle_group_t cg () const
 

Static Private Member Functions

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

Detailed Description

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

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

Definition at line 786 of file cycle_group.fuzzer.hpp.

Constructor & Destructor Documentation

◆ ExecutionHandler() [1/2]

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

◆ ExecutionHandler() [2/2]

template<typename Builder >
CycleGroupBase< Builder >::ExecutionHandler::ExecutionHandler ( ScalarField  s,
GroupElement  g,
cycle_group_t  w_g 
)
inline

Definition at line 824 of file cycle_group.fuzzer.hpp.

Member Function Documentation

◆ assert_equal()

template<typename Builder >
void CycleGroupBase< Builder >::ExecutionHandler::assert_equal ( Builder builder,
ExecutionHandler other 
)
inline

Definition at line 1062 of file cycle_group.fuzzer.hpp.

◆ batch_mul()

template<typename Builder >
static ExecutionHandler CycleGroupBase< Builder >::ExecutionHandler::batch_mul ( Builder builder,
const std::vector< ExecutionHandler > &  to_add,
const std::vector< ScalarField > &  to_mul 
)
inlinestatic

Definition at line 1000 of file cycle_group.fuzzer.hpp.

◆ cg()

template<typename Builder >
cycle_group_t CycleGroupBase< Builder >::ExecutionHandler::cg ( ) const
inlineprivate

Definition at line 809 of file cycle_group.fuzzer.hpp.

◆ conditional_assign()

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

Definition at line 1053 of file cycle_group.fuzzer.hpp.

◆ construct_predicate()

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

Definition at line 788 of file cycle_group.fuzzer.hpp.

◆ dbl()

template<typename Builder >
ExecutionHandler CycleGroupBase< Builder >::ExecutionHandler::dbl ( )
inline

Definition at line 1048 of file cycle_group.fuzzer.hpp.

◆ execute_ADD()

template<typename Builder >
static size_t CycleGroupBase< 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 1383 of file cycle_group.fuzzer.hpp.

◆ execute_ASSERT_EQUAL()

template<typename Builder >
static size_t CycleGroupBase< 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 1286 of file cycle_group.fuzzer.hpp.

◆ execute_BATCH_MUL()

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

Execute the BATCH_MUL 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 1528 of file cycle_group.fuzzer.hpp.

◆ execute_COND_ASSIGN()

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

Execute the COND_ASSIGN 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 1453 of file cycle_group.fuzzer.hpp.

◆ execute_CONSTANT()

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

Execute the constant instruction (push constant cycle group 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 1146 of file cycle_group.fuzzer.hpp.

◆ execute_CONSTANT_WITNESS()

template<typename Builder >
static size_t CycleGroupBase< 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 1194 of file cycle_group.fuzzer.hpp.

◆ execute_DBL()

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

Execute the DBL 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 1218 of file cycle_group.fuzzer.hpp.

◆ execute_MULTIPLY()

template<typename Builder >
static size_t CycleGroupBase< 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 1493 of file cycle_group.fuzzer.hpp.

◆ execute_NEG()

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

Execute the NEG 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 1252 of file cycle_group.fuzzer.hpp.

◆ execute_RANDOMSEED()

template<typename Builder >
static size_t CycleGroupBase< 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 1581 of file cycle_group.fuzzer.hpp.

◆ execute_SET()

template<typename Builder >
static size_t CycleGroupBase< 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 1312 of file cycle_group.fuzzer.hpp.

◆ execute_SET_INF()

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

Execute the SET_INF 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 1349 of file cycle_group.fuzzer.hpp.

◆ execute_SUBTRACT()

template<typename Builder >
static size_t CycleGroupBase< 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 1418 of file cycle_group.fuzzer.hpp.

◆ execute_WITNESS()

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

Execute the witness instruction (push witness cycle group 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 1170 of file cycle_group.fuzzer.hpp.

◆ mul()

template<typename Builder >
ExecutionHandler CycleGroupBase< Builder >::ExecutionHandler::mul ( Builder builder,
const ScalarField multiplier 
)
inline

Definition at line 989 of file cycle_group.fuzzer.hpp.

◆ operator-()

template<typename Builder >
ExecutionHandler CycleGroupBase< Builder >::ExecutionHandler::operator- ( )
inline

Definition at line 1041 of file cycle_group.fuzzer.hpp.

◆ operator_add()

template<typename Builder >
ExecutionHandler CycleGroupBase< Builder >::ExecutionHandler::operator_add ( Builder builder,
const ExecutionHandler other 
)
inline

Definition at line 830 of file cycle_group.fuzzer.hpp.

◆ operator_sub()

template<typename Builder >
ExecutionHandler CycleGroupBase< Builder >::ExecutionHandler::operator_sub ( Builder builder,
const ExecutionHandler other 
)
inline

Definition at line 916 of file cycle_group.fuzzer.hpp.

◆ set()

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

Definition at line 1076 of file cycle_group.fuzzer.hpp.

◆ set_inf()

template<typename Builder >
ExecutionHandler CycleGroupBase< Builder >::ExecutionHandler::set_inf ( Builder builder)
inline

Definition at line 1123 of file cycle_group.fuzzer.hpp.

Member Data Documentation

◆ base

template<typename Builder >
GroupElement CycleGroupBase< Builder >::ExecutionHandler::base

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

◆ base_scalar

template<typename Builder >
ScalarField CycleGroupBase< Builder >::ExecutionHandler::base_scalar

Definition at line 819 of file cycle_group.fuzzer.hpp.

◆ cycle_group

template<typename Builder >
cycle_group_t CycleGroupBase< Builder >::ExecutionHandler::cycle_group

Definition at line 821 of file cycle_group.fuzzer.hpp.


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