Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
instruction_block.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <random>
4#include <vector>
5
8
9namespace bb::avm2::fuzzer {
10
12 std::vector<FuzzInstruction> instructions;
13 uint32_t base_offset = 0;
14
16};
17
18inline std::ostream& operator<<(std::ostream& os, const InstructionBlock& instruction_block)
19{
20 os << "InstructionBlock {\n";
21 os << " instructions: [\n";
22 for (const auto& instr : instruction_block.instructions) {
23 os << " " << instr << ",\n";
24 }
25 os << " ],\n";
26 os << " base_offset: " << instruction_block.base_offset << ",\n";
27 os << "}";
28 return os;
29}
30
32
34
35} // namespace bb::avm2::fuzzer
std::ostream & operator<<(std::ostream &os, const InstructionBlock &instruction_block)
InstructionBlock generate_instruction_block(std::mt19937_64 &rng, const FuzzerContext &context)
void mutate_instruction_block(InstructionBlock &instruction_block, std::mt19937_64 &rng, const FuzzerContext &context)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
MSGPACK_FIELDS(instructions, base_offset)
std::vector< FuzzInstruction > instructions