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

A class representing a single fuzzing instruction. More...

#include <safe_uint.fuzzer.hpp>

Classes

union  ArgumentContents
 
struct  Element
 
struct  FiveArgs
 
struct  FourArgs
 
struct  SliceArgs
 
struct  ThreeArgs
 

Public Types

enum  OPCODE {
  CONSTANT , WITNESS , CONSTANT_WITNESS , ADD ,
  SUBTRACT , MULTIPLY , DIVIDE , ADD_TWO ,
  MADD , SUBTRACT_WITH_CONSTRAINT , DIVIDE_WITH_CONSTRAINTS , SLICE ,
  RANDOMSEED , _LAST
}
 

Static Public Member Functions

template<typename T >
requires SimpleRng<T>
static Instruction generateRandom (T &rng)
 Generate a random instruction.
 
template<typename T >
requires SimpleRng<T>
static fr mutateFieldElement (fr e, T &rng, HavocSettings &havoc_config)
 Mutate the value of a field element.
 
template<typename T >
requires SimpleRng<T>
static Instruction mutateInstruction (Instruction instruction, T &rng, HavocSettings &havoc_config)
 Mutate a single instruction.
 

Public Attributes

OPCODE id
 
ArgumentContents arguments
 

Detailed Description

template<typename Builder>
class SafeUintFuzzBase< Builder >::Instruction

A class representing a single fuzzing instruction.

Definition at line 130 of file safe_uint.fuzzer.hpp.

Member Enumeration Documentation

◆ OPCODE

Enumerator
CONSTANT 
WITNESS 
CONSTANT_WITNESS 
ADD 
SUBTRACT 
MULTIPLY 
DIVIDE 
ADD_TWO 
MADD 
SUBTRACT_WITH_CONSTRAINT 
DIVIDE_WITH_CONSTRAINTS 
SLICE 
RANDOMSEED 
_LAST 

Definition at line 132 of file safe_uint.fuzzer.hpp.

Member Function Documentation

◆ generateRandom()

template<typename Builder >
template<typename T >
requires SimpleRng<T>
static Instruction SafeUintFuzzBase< Builder >::Instruction::generateRandom ( T &  rng)
inlinestatic

Generate a random instruction.

Template Parameters
TPRNG class type
Parameters
rngPRNG used
Returns
A random instruction

Definition at line 199 of file safe_uint.fuzzer.hpp.

◆ mutateFieldElement()

template<typename Builder >
template<typename T >
requires SimpleRng<T>
static fr SafeUintFuzzBase< Builder >::Instruction::mutateFieldElement ( fr  e,
T &  rng,
HavocSettings havoc_config 
)
inlinestatic

Mutate the value of a field element.

Template Parameters
TPRNG class
Parameters
eInitial element value
rngPRNG
havoc_configMutation configuration
Returns
Mutated element

Definition at line 295 of file safe_uint.fuzzer.hpp.

◆ mutateInstruction()

template<typename Builder >
template<typename T >
requires SimpleRng<T>
static Instruction SafeUintFuzzBase< Builder >::Instruction::mutateInstruction ( Instruction  instruction,
T &  rng,
HavocSettings havoc_config 
)
inlinestatic

Mutate a single instruction.

Template Parameters
TPRNG class
Parameters
instructionThe instruction
rngPRNG
havoc_configMutation configuration
Returns
Mutated instruction

Definition at line 390 of file safe_uint.fuzzer.hpp.

Member Data Documentation

◆ arguments

template<typename Builder >
ArgumentContents SafeUintFuzzBase< Builder >::Instruction::arguments

Definition at line 190 of file safe_uint.fuzzer.hpp.

◆ id

template<typename Builder >
OPCODE SafeUintFuzzBase< Builder >::Instruction::id

Definition at line 188 of file safe_uint.fuzzer.hpp.


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