8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_BYTECODE_RETRIEVAL_RESULT";
22 static constexpr Column COUNTS = Column::lookup_execution_bytecode_retrieval_result_counts;
23 static constexpr Column INVERSES = Column::lookup_execution_bytecode_retrieval_result_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
25 ColumnAndShifts::execution_bytecode_id,
26 ColumnAndShifts::execution_contract_address,
27 ColumnAndShifts::execution_prev_nullifier_tree_root,
28 ColumnAndShifts::execution_prev_public_data_tree_root,
29 ColumnAndShifts::execution_prev_retrieved_bytecodes_tree_root,
30 ColumnAndShifts::execution_prev_retrieved_bytecodes_tree_size,
31 ColumnAndShifts::execution_retrieved_bytecodes_tree_root,
32 ColumnAndShifts::execution_retrieved_bytecodes_tree_size,
33 ColumnAndShifts::execution_sel_bytecode_retrieval_failure
35 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
36 ColumnAndShifts::bc_retrieval_bytecode_id,
37 ColumnAndShifts::bc_retrieval_address,
38 ColumnAndShifts::bc_retrieval_nullifier_tree_root,
39 ColumnAndShifts::bc_retrieval_public_data_tree_root,
40 ColumnAndShifts::bc_retrieval_prev_retrieved_bytecodes_tree_root,
41 ColumnAndShifts::bc_retrieval_prev_retrieved_bytecodes_tree_size,
42 ColumnAndShifts::bc_retrieval_next_retrieved_bytecodes_tree_root,
43 ColumnAndShifts::bc_retrieval_next_retrieved_bytecodes_tree_size,
44 ColumnAndShifts::bc_retrieval_error
50template <
typename FF_>
57 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_INSTRUCTION_FETCHING_RESULT";
62 static constexpr Column COUNTS = Column::lookup_execution_instruction_fetching_result_counts;
63 static constexpr Column INVERSES = Column::lookup_execution_instruction_fetching_result_inv;
64 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
65 ColumnAndShifts::execution_pc,
66 ColumnAndShifts::execution_bytecode_id,
67 ColumnAndShifts::execution_sel_instruction_fetching_failure
69 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
70 ColumnAndShifts::instr_fetching_pc,
71 ColumnAndShifts::instr_fetching_bytecode_id,
72 ColumnAndShifts::instr_fetching_sel_parsing_err
78template <
typename FF_>
85 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_INSTRUCTION_FETCHING_BODY";
90 static constexpr Column COUNTS = Column::lookup_execution_instruction_fetching_body_counts;
91 static constexpr Column INVERSES = Column::lookup_execution_instruction_fetching_body_inv;
92 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
93 ColumnAndShifts::execution_pc,
94 ColumnAndShifts::execution_bytecode_id,
95 ColumnAndShifts::execution_exec_opcode,
96 ColumnAndShifts::execution_instr_size,
97 ColumnAndShifts::execution_addressing_mode,
98 ColumnAndShifts::execution_op_0_,
99 ColumnAndShifts::execution_op_1_,
100 ColumnAndShifts::execution_op_2_,
101 ColumnAndShifts::execution_op_3_,
102 ColumnAndShifts::execution_op_4_
104 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
105 ColumnAndShifts::instr_fetching_pc,
106 ColumnAndShifts::instr_fetching_bytecode_id,
107 ColumnAndShifts::instr_fetching_exec_opcode,
108 ColumnAndShifts::instr_fetching_instr_size,
109 ColumnAndShifts::instr_fetching_addressing_mode,
110 ColumnAndShifts::instr_fetching_op1,
111 ColumnAndShifts::instr_fetching_op2,
112 ColumnAndShifts::instr_fetching_op3,
113 ColumnAndShifts::instr_fetching_op4,
114 ColumnAndShifts::instr_fetching_op5
120template <
typename FF_>
127 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_EXEC_SPEC_READ";
132 static constexpr Column COUNTS = Column::lookup_execution_exec_spec_read_counts;
134 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
135 ColumnAndShifts::execution_exec_opcode,
136 ColumnAndShifts::execution_opcode_gas,
137 ColumnAndShifts::execution_base_da_gas,
138 ColumnAndShifts::execution_dynamic_l2_gas,
139 ColumnAndShifts::execution_dynamic_da_gas,
140 ColumnAndShifts::execution_sel_op_is_address_0_,
141 ColumnAndShifts::execution_sel_op_is_address_1_,
142 ColumnAndShifts::execution_sel_op_is_address_2_,
143 ColumnAndShifts::execution_sel_op_is_address_3_,
144 ColumnAndShifts::execution_sel_op_is_address_4_,
145 ColumnAndShifts::execution_subtrace_id,
146 ColumnAndShifts::execution_subtrace_operation_id,
147 ColumnAndShifts::execution_dyn_gas_id,
148 ColumnAndShifts::execution_sel_mem_op_reg_0_,
149 ColumnAndShifts::execution_sel_mem_op_reg_1_,
150 ColumnAndShifts::execution_sel_mem_op_reg_2_,
151 ColumnAndShifts::execution_sel_mem_op_reg_3_,
152 ColumnAndShifts::execution_rw_reg_0_,
153 ColumnAndShifts::execution_rw_reg_1_,
154 ColumnAndShifts::execution_rw_reg_2_,
155 ColumnAndShifts::execution_rw_reg_3_,
156 ColumnAndShifts::execution_sel_tag_check_reg_0_,
157 ColumnAndShifts::execution_sel_tag_check_reg_1_,
158 ColumnAndShifts::execution_sel_tag_check_reg_2_,
159 ColumnAndShifts::execution_sel_tag_check_reg_3_,
160 ColumnAndShifts::execution_expected_tag_reg_0_,
161 ColumnAndShifts::execution_expected_tag_reg_1_,
162 ColumnAndShifts::execution_expected_tag_reg_2_,
163 ColumnAndShifts::execution_expected_tag_reg_3_
165 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
166 ColumnAndShifts::precomputed_idx,
167 ColumnAndShifts::precomputed_exec_opcode_opcode_gas,
168 ColumnAndShifts::precomputed_exec_opcode_base_da_gas,
169 ColumnAndShifts::precomputed_exec_opcode_dynamic_l2_gas,
170 ColumnAndShifts::precomputed_exec_opcode_dynamic_da_gas,
171 ColumnAndShifts::precomputed_sel_op_is_address_0_,
172 ColumnAndShifts::precomputed_sel_op_is_address_1_,
173 ColumnAndShifts::precomputed_sel_op_is_address_2_,
174 ColumnAndShifts::precomputed_sel_op_is_address_3_,
175 ColumnAndShifts::precomputed_sel_op_is_address_4_,
176 ColumnAndShifts::precomputed_subtrace_id,
177 ColumnAndShifts::precomputed_subtrace_operation_id,
178 ColumnAndShifts::precomputed_dyn_gas_id,
179 ColumnAndShifts::precomputed_sel_mem_op_reg_0_,
180 ColumnAndShifts::precomputed_sel_mem_op_reg_1_,
181 ColumnAndShifts::precomputed_sel_mem_op_reg_2_,
182 ColumnAndShifts::precomputed_sel_mem_op_reg_3_,
183 ColumnAndShifts::precomputed_rw_reg_0_,
184 ColumnAndShifts::precomputed_rw_reg_1_,
185 ColumnAndShifts::precomputed_rw_reg_2_,
186 ColumnAndShifts::precomputed_rw_reg_3_,
187 ColumnAndShifts::precomputed_sel_tag_check_reg_0_,
188 ColumnAndShifts::precomputed_sel_tag_check_reg_1_,
189 ColumnAndShifts::precomputed_sel_tag_check_reg_2_,
190 ColumnAndShifts::precomputed_sel_tag_check_reg_3_,
191 ColumnAndShifts::precomputed_expected_tag_reg_0_,
192 ColumnAndShifts::precomputed_expected_tag_reg_1_,
193 ColumnAndShifts::precomputed_expected_tag_reg_2_,
194 ColumnAndShifts::precomputed_expected_tag_reg_3_
199template <
typename FF_>
205 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_CHECK_RADIX_GT_256";
210 static constexpr Column COUNTS = Column::lookup_execution_check_radix_gt_256_counts;
211 static constexpr Column INVERSES = Column::lookup_execution_check_radix_gt_256_inv;
212 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
213 ColumnAndShifts::execution_register_1_,
214 ColumnAndShifts::execution_two_five_six,
215 ColumnAndShifts::execution_sel_radix_gt_256
217 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
218 ColumnAndShifts::gt_input_b,
219 ColumnAndShifts::gt_res };
223template <
typename FF_>
230 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_GET_P_LIMBS";
235 static constexpr Column COUNTS = Column::lookup_execution_get_p_limbs_counts;
237 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
238 ColumnAndShifts::execution_register_1_, ColumnAndShifts::execution_num_p_limbs
240 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
241 ColumnAndShifts::precomputed_idx, ColumnAndShifts::precomputed_to_radix_num_limbs_for_p
246template <
typename FF_>
252 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_GET_MAX_LIMBS";
257 static constexpr Column COUNTS = Column::lookup_execution_get_max_limbs_counts;
259 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
260 ColumnAndShifts::execution_register_2_,
261 ColumnAndShifts::execution_num_p_limbs,
262 ColumnAndShifts::execution_sel_use_num_limbs
264 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
265 ColumnAndShifts::gt_input_b,
266 ColumnAndShifts::gt_res };
270template <
typename FF_>
276 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_CHECK_WRITTEN_STORAGE_SLOT";
281 static constexpr Column COUNTS = Column::lookup_execution_check_written_storage_slot_counts;
282 static constexpr Column INVERSES = Column::lookup_execution_check_written_storage_slot_inv;
283 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
284 ColumnAndShifts::execution_dynamic_da_gas_factor,
285 ColumnAndShifts::execution_register_1_,
286 ColumnAndShifts::execution_prev_written_public_data_slots_tree_root,
287 ColumnAndShifts::execution_written_slots_tree_height,
288 ColumnAndShifts::execution_written_slots_merkle_separator,
289 ColumnAndShifts::execution_sel_gas_sstore,
290 ColumnAndShifts::execution_written_slots_tree_siloing_separator,
291 ColumnAndShifts::execution_contract_address
293 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
294 ColumnAndShifts::indexed_tree_check_not_exists,
295 ColumnAndShifts::indexed_tree_check_value,
296 ColumnAndShifts::indexed_tree_check_root,
297 ColumnAndShifts::indexed_tree_check_tree_height,
298 ColumnAndShifts::indexed_tree_check_merkle_hash_separator,
299 ColumnAndShifts::indexed_tree_check_sel_silo,
300 ColumnAndShifts::indexed_tree_check_siloing_separator,
301 ColumnAndShifts::indexed_tree_check_address
307template <
typename FF_>
314 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_DISPATCH_TO_ALU";
319 static constexpr Column COUNTS = Column::lookup_execution_dispatch_to_alu_counts;
321 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
322 ColumnAndShifts::execution_register_0_, ColumnAndShifts::execution_mem_tag_reg_0_,
323 ColumnAndShifts::execution_register_1_, ColumnAndShifts::execution_mem_tag_reg_1_,
324 ColumnAndShifts::execution_register_2_, ColumnAndShifts::execution_mem_tag_reg_2_,
325 ColumnAndShifts::execution_subtrace_operation_id, ColumnAndShifts::execution_sel_opcode_error
327 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
328 ColumnAndShifts::alu_ia, ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_ib, ColumnAndShifts::alu_ib_tag,
329 ColumnAndShifts::alu_ic, ColumnAndShifts::alu_ic_tag, ColumnAndShifts::alu_op_id, ColumnAndShifts::alu_sel_err
334template <
typename FF_>
340 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_DISPATCH_TO_BITWISE";
345 static constexpr Column COUNTS = Column::lookup_execution_dispatch_to_bitwise_counts;
346 static constexpr Column INVERSES = Column::lookup_execution_dispatch_to_bitwise_inv;
347 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
348 ColumnAndShifts::execution_subtrace_operation_id, ColumnAndShifts::execution_sel_opcode_error,
349 ColumnAndShifts::execution_register_0_, ColumnAndShifts::execution_mem_tag_reg_0_,
350 ColumnAndShifts::execution_register_1_, ColumnAndShifts::execution_mem_tag_reg_1_,
351 ColumnAndShifts::execution_register_2_, ColumnAndShifts::execution_mem_tag_reg_2_
353 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
354 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_err, ColumnAndShifts::bitwise_ia,
355 ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_ib, ColumnAndShifts::bitwise_tag_b,
356 ColumnAndShifts::bitwise_ic, ColumnAndShifts::bitwise_tag_c
361template <
typename FF_>
368 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_DISPATCH_TO_CAST";
373 static constexpr Column COUNTS = Column::lookup_execution_dispatch_to_cast_counts;
374 static constexpr Column INVERSES = Column::lookup_execution_dispatch_to_cast_inv;
375 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
376 ColumnAndShifts::execution_register_0_,
377 ColumnAndShifts::execution_rop_2_,
378 ColumnAndShifts::execution_register_1_,
379 ColumnAndShifts::execution_mem_tag_reg_1_,
380 ColumnAndShifts::execution_sel_exec_dispatch_cast,
381 ColumnAndShifts::execution_sel_opcode_error
383 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
384 ColumnAndShifts::alu_ia, ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_ic,
385 ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_sel, ColumnAndShifts::precomputed_zero
390template <
typename FF_>
397 static constexpr std::string_view
NAME =
"LOOKUP_EXECUTION_DISPATCH_TO_SET";
402 static constexpr Column COUNTS = Column::lookup_execution_dispatch_to_set_counts;
404 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
405 ColumnAndShifts::execution_rop_2_,
406 ColumnAndShifts::execution_rop_1_,
407 ColumnAndShifts::execution_register_0_,
408 ColumnAndShifts::execution_mem_tag_reg_0_,
409 ColumnAndShifts::execution_sel_exec_dispatch_set,
410 ColumnAndShifts::execution_sel_opcode_error
412 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
413 ColumnAndShifts::alu_ia, ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_ic,
414 ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_sel, ColumnAndShifts::precomputed_zero
419template <
typename FF_>
static constexpr Column INVERSES
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr Column SRC_SELECTOR
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view RELATION_NAME
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr Column SRC_SELECTOR
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
Settings to be passed ot GenericLookupRelationImpl.