Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
instr_fetching.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
4#include <string_view>
5
10
11namespace bb::avm2 {
12
13template <typename FF_> class instr_fetchingImpl {
14 public:
15 using FF = FF_;
16
17 static constexpr std::array<size_t, 17> SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 4, 3, 3, 3, 3,
18 4, 4, 4, 4, 4, 4, 4, 4 };
19
20 template <typename AllEntities> inline static bool skip(const AllEntities& in)
21 {
22 using C = ColumnAndShifts;
23
24 return (in.get(C::instr_fetching_sel)).is_zero();
25 }
26
27 template <typename ContainerOverSubrelations, typename AllEntities>
28 void static accumulate(ContainerOverSubrelations& evals,
29 const AllEntities& in,
30 [[maybe_unused]] const RelationParameters<FF>&,
31 [[maybe_unused]] const FF& scaling_factor);
32};
33
34template <typename FF> class instr_fetching : public Relation<instr_fetchingImpl<FF>> {
35 public:
36 static constexpr const std::string_view NAME = "instr_fetching";
37
38 static std::string get_subrelation_label(size_t index)
39 {
40 switch (index) {
41 case 4:
42 return "PC_OUT_OF_RANGE_TOGGLE";
43 case 6:
44 return "INSTR_OUT_OF_RANGE_TOGGLE";
45 case 7:
46 return "TAG_VALUE";
47 case 9:
48 return "INDIRECT_BYTES_DECOMPOSITION";
49 case 10:
50 return "OP1_BYTES_DECOMPOSITION";
51 case 11:
52 return "OP2_BYTES_DECOMPOSITION";
53 case 12:
54 return "OP3_BYTES_DECOMPOSITION";
55 case 13:
56 return "OP4_BYTES_DECOMPOSITION";
57 case 14:
58 return "OP5_BYTES_DECOMPOSITION";
59 case 15:
60 return "OP6_BYTES_DECOMPOSITION";
61 case 16:
62 return "OP7_BYTES_DECOMPOSITION";
63 }
64 return std::to_string(index);
65 }
66
67 // Subrelation indices constants, to be used in tests.
68 static constexpr size_t SR_PC_OUT_OF_RANGE_TOGGLE = 4;
69 static constexpr size_t SR_INSTR_OUT_OF_RANGE_TOGGLE = 6;
70 static constexpr size_t SR_TAG_VALUE = 7;
71 static constexpr size_t SR_INDIRECT_BYTES_DECOMPOSITION = 9;
72 static constexpr size_t SR_OP1_BYTES_DECOMPOSITION = 10;
73 static constexpr size_t SR_OP2_BYTES_DECOMPOSITION = 11;
74 static constexpr size_t SR_OP3_BYTES_DECOMPOSITION = 12;
75 static constexpr size_t SR_OP4_BYTES_DECOMPOSITION = 13;
76 static constexpr size_t SR_OP5_BYTES_DECOMPOSITION = 14;
77 static constexpr size_t SR_OP6_BYTES_DECOMPOSITION = 15;
78 static constexpr size_t SR_OP7_BYTES_DECOMPOSITION = 16;
79};
80
81} // namespace bb::avm2
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
static constexpr size_t SR_OP1_BYTES_DECOMPOSITION
static constexpr size_t SR_OP3_BYTES_DECOMPOSITION
static constexpr size_t SR_INDIRECT_BYTES_DECOMPOSITION
static constexpr const std::string_view NAME
static constexpr size_t SR_OP6_BYTES_DECOMPOSITION
static constexpr size_t SR_OP4_BYTES_DECOMPOSITION
static constexpr size_t SR_TAG_VALUE
static constexpr size_t SR_INSTR_OUT_OF_RANGE_TOGGLE
static std::string get_subrelation_label(size_t index)
static constexpr size_t SR_OP7_BYTES_DECOMPOSITION
static constexpr size_t SR_OP5_BYTES_DECOMPOSITION
static constexpr size_t SR_PC_OUT_OF_RANGE_TOGGLE
static constexpr size_t SR_OP2_BYTES_DECOMPOSITION
static constexpr std::array< size_t, 17 > SUBRELATION_PARTIAL_LENGTHS
static bool skip(const AllEntities &in)
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
ColumnAndShifts
Definition columns.hpp:35
AvmFlavorSettings::FF FF
Definition field.hpp:10
std::string to_string(bb::avm2::ValueTag tag)
Container for parameters used by the grand product (permutation, lookup) Honk relations.