1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
21using tracegen::ExecutionTraceBuilder;
22using tracegen::TestTraceContainer;
30TEST(AddressingConstrainingTest, EmptyRow)
39TEST(AddressingConstrainingTest, BaseAddressGating)
42 TestTraceContainer
trace({ {
45 { C::execution_sel_bytecode_retrieval_success, 1 },
46 { C::execution_sel_instruction_fetching_success, 1 },
53 { C::execution_sel_op_is_address_0_, 1 },
54 { C::execution_sel_op_is_address_1_, 1 },
55 { C::execution_sel_op_is_address_2_, 1 },
56 { C::execution_sel_op_is_address_3_, 1 },
57 { C::execution_sel_op_is_address_4_, 0 },
59 { C::execution_sel_op_is_relative_wire_0_, 1 },
60 { C::execution_sel_op_is_relative_wire_1_, 0 },
61 { C::execution_sel_op_is_relative_wire_2_, 1 },
62 { C::execution_sel_op_is_relative_wire_3_, 0 },
63 { C::execution_sel_op_is_relative_wire_4_, 1 },
64 { C::execution_sel_op_is_relative_wire_5_, 0 },
65 { C::execution_sel_op_is_relative_wire_6_, 0 },
67 { C::execution_sel_do_base_check, 0 },
73 trace.
set(C::execution_num_relative_operands_inv, 0,
FF(2).invert());
78 trace.
set(C::execution_sel_do_base_check, 0, 1);
82TEST(AddressingConstrainingTest, BaseAddressTagIsU32)
85 FF base_address_tag_diff_inv = 0;
87 TestTraceContainer
trace({
89 { C::execution_base_address_tag, base_address_tag },
90 { C::execution_base_address_tag_diff_inv, base_address_tag_diff_inv },
91 { C::execution_sel_base_address_failure, 0 },
94 { C::execution_sel_bytecode_retrieval_success, 1 },
95 { C::execution_sel_instruction_fetching_success, 1 },
96 { C::execution_sel_do_base_check, 1 },
103 trace.
set(C::execution_sel_base_address_failure, 0, 1);
110 { C::execution_base_address_tag_diff_inv, 44 },
111 { C::execution_sel_base_address_failure, 0 },
116TEST(AddressingConstrainingTest, BaseAddressTagIsNotU32)
118 FF base_address_tag = 1234567;
120 FF base_address_tag_diff_inv =
FF(base_address_tag - u32_tag).
invert();
122 TestTraceContainer
trace({
124 { C::execution_base_address_tag, base_address_tag },
125 { C::execution_base_address_tag_diff_inv, base_address_tag_diff_inv },
126 { C::execution_sel_base_address_failure, 1 },
129 { C::execution_sel_bytecode_retrieval_success, 1 },
130 { C::execution_sel_instruction_fetching_success, 1 },
131 { C::execution_sel_do_base_check, 1 },
138 trace.
set(C::execution_sel_base_address_failure, 0, 0);
145 { C::execution_base_address_tag_diff_inv, 0 },
146 { C::execution_sel_base_address_failure, 0 },
152TEST(AddressingConstrainingTest, BaseAddressTagNoCheckImpliesNoError)
154 FF base_address_tag = 1234567;
156 FF base_address_tag_diff_inv =
FF(base_address_tag - u32_tag).
invert();
158 TestTraceContainer
trace({
160 { C::execution_base_address_tag, base_address_tag },
161 { C::execution_base_address_tag_diff_inv, base_address_tag_diff_inv },
162 { C::execution_sel_base_address_failure, 0 },
165 { C::execution_sel_bytecode_retrieval_success, 1 },
166 { C::execution_sel_instruction_fetching_success, 1 },
167 { C::execution_sel_do_base_check, 0 },
174 trace.
set(C::execution_sel_base_address_failure, 0, 1);
183 { C::execution_sel_bytecode_retrieval_success, 0 },
184 { C::execution_sel_instruction_fetching_success, 0 },
186 { C::execution_sel_do_base_check, 1 },
195TEST(AddressingConstrainingTest, RelativeAddressPropagation)
197 FF base_address_val = 100;
199 TestTraceContainer
trace({
201 { C::execution_base_address_val, base_address_val },
202 { C::execution_sel_base_address_failure, 0 },
204 { C::execution_op_0_, 123 },
205 { C::execution_op_1_, 456 },
206 { C::execution_op_2_, 0xFFFFFFFF },
207 { C::execution_op_3_, 101112 },
208 { C::execution_op_4_, 131415 },
210 { C::execution_op_after_relative_0_,
FF(123) + base_address_val },
211 { C::execution_op_after_relative_1_, 456 },
212 { C::execution_op_after_relative_2_,
FF(0xFFFFFFFF) + base_address_val },
213 { C::execution_op_after_relative_3_, 101112 },
214 { C::execution_op_after_relative_4_,
FF(131415) + base_address_val },
216 { C::execution_sel_op_is_address_0_, 1 },
217 { C::execution_sel_op_is_address_1_, 1 },
218 { C::execution_sel_op_is_address_2_, 1 },
219 { C::execution_sel_op_is_address_3_, 1 },
220 { C::execution_sel_op_is_address_4_, 1 },
222 { C::execution_sel_op_is_relative_wire_0_, 1 },
223 { C::execution_sel_op_is_relative_wire_1_, 0 },
224 { C::execution_sel_op_is_relative_wire_2_, 1 },
225 { C::execution_sel_op_is_relative_wire_3_, 0 },
226 { C::execution_sel_op_is_relative_wire_4_, 1 },
227 { C::execution_sel_op_is_relative_wire_5_, 0 },
228 { C::execution_sel_op_is_relative_wire_6_, 1 },
232 check_relation<addressing>(trace,
242 { C::execution_op_after_relative_0_, 7 },
243 { C::execution_op_after_relative_1_,
FF(456) + base_address_val },
244 { C::execution_op_after_relative_2_, 0xFFFFFFFF },
245 { C::execution_op_after_relative_3_, 7 },
246 { C::execution_op_after_relative_4_, 7 },
260TEST(AddressingConstrainingTest, RelativeAddressPropagationWhenBaseAddressIsInvalid)
262 FF base_address_val = 0x123456789012345ULL;
264 TestTraceContainer
trace({
266 { C::execution_base_address_val, base_address_val },
267 { C::execution_sel_base_address_failure, 1 },
269 { C::execution_op_0_, 123 },
270 { C::execution_op_1_, 456 },
271 { C::execution_op_2_, 0xFFFFFFFF },
272 { C::execution_op_3_, 101112 },
273 { C::execution_op_4_, 131415 },
275 { C::execution_op_after_relative_0_, 123 },
276 { C::execution_op_after_relative_1_, 456 },
277 { C::execution_op_after_relative_2_, 0xFFFFFFFF },
278 { C::execution_op_after_relative_3_, 101112 },
279 { C::execution_op_after_relative_4_, 131415 },
281 { C::execution_sel_op_is_address_0_, 1 },
282 { C::execution_sel_op_is_address_1_, 1 },
283 { C::execution_sel_op_is_address_2_, 1 },
284 { C::execution_sel_op_is_address_3_, 1 },
285 { C::execution_sel_op_is_address_4_, 1 },
287 { C::execution_sel_op_is_relative_wire_0_, 1 },
288 { C::execution_sel_op_is_relative_wire_1_, 0 },
289 { C::execution_sel_op_is_relative_wire_2_, 1 },
290 { C::execution_sel_op_is_relative_wire_3_, 0 },
291 { C::execution_sel_op_is_relative_wire_4_, 1 },
292 { C::execution_sel_op_is_relative_wire_5_, 0 },
293 { C::execution_sel_op_is_relative_wire_6_, 1 },
295 { C::execution_sel_bytecode_retrieval_success, 1 },
296 { C::execution_sel_instruction_fetching_success, 1 },
300 check_relation<addressing>(trace,
308 trace.
set(C::execution_op_after_relative_0_, 0,
FF(123) + base_address_val);
313TEST(AddressingConstrainingTest, RelativeOverflowCheck)
315 FF base_address_val = 100;
318 FF(123) + base_address_val,
FF(456),
FF(0xFFFFFFFF) + base_address_val,
FF(101112),
319 FF(131415) + base_address_val,
322 TestTraceContainer
trace({
325 { C::execution_sel_op_is_relative_wire_0_, 1 },
326 { C::execution_sel_op_is_relative_wire_2_, 1 },
327 { C::execution_sel_op_is_relative_wire_4_, 1 },
328 { C::execution_sel_op_is_address_0_, 1 },
329 { C::execution_sel_op_is_address_2_, 1 },
330 { C::execution_sel_op_is_address_4_, 1 },
331 { C::execution_sel_op_do_overflow_check_0_, 1 },
332 { C::execution_sel_op_do_overflow_check_2_, 1 },
333 { C::execution_sel_op_do_overflow_check_4_, 1 },
335 { C::execution_op_after_relative_0_, resolved_addrs[0] },
336 { C::execution_op_after_relative_1_, resolved_addrs[1] },
337 { C::execution_op_after_relative_2_, resolved_addrs[2] },
338 { C::execution_op_after_relative_3_, resolved_addrs[3] },
339 { C::execution_op_after_relative_4_, resolved_addrs[4] },
341 { C::execution_sel_relative_overflow_0_, 0 },
342 { C::execution_sel_relative_overflow_1_, 0 },
343 { C::execution_sel_relative_overflow_2_, 1 },
344 { C::execution_sel_relative_overflow_3_, 0 },
345 { C::execution_sel_relative_overflow_4_, 0 },
347 { C::execution_highest_address, AVM_HIGHEST_MEM_ADDRESS },
352 for (uint32_t i = 0; i < AVM_MAX_OPERANDS; i++) {
354 trace.
set(C::gt_input_a, i, resolved_addrs[i]);
355 trace.
set(C::gt_input_b, i, AVM_HIGHEST_MEM_ADDRESS);
356 trace.
set(C::gt_res, i,
static_cast<uint128_t>(resolved_addrs[i]) > AVM_HIGHEST_MEM_ADDRESS ? 1 : 0);
359 check_relation<addressing>(trace,
377 { C::execution_sel_relative_overflow_0_, 1 },
378 { C::execution_sel_relative_overflow_1_, 1 },
379 { C::execution_sel_relative_overflow_2_, 0 },
380 { C::execution_sel_relative_overflow_3_, 1 },
381 { C::execution_sel_relative_overflow_4_, 1 },
385 (check_interaction<ExecutionTraceBuilder, lookup_addressing_relative_overflow_result_0_settings>(trace)),
386 "Failed.*LOOKUP_ADDRESSING_RELATIVE_OVERFLOW_RESULT_0.*Could not find tuple in destination.");
391 (check_interaction<ExecutionTraceBuilder, lookup_addressing_relative_overflow_result_2_settings>(trace)),
392 "Failed.*LOOKUP_ADDRESSING_RELATIVE_OVERFLOW_RESULT_2.*Could not find tuple in destination.");
397 (check_interaction<ExecutionTraceBuilder, lookup_addressing_relative_overflow_result_4_settings>(trace)),
398 "Failed.*LOOKUP_ADDRESSING_RELATIVE_OVERFLOW_RESULT_4.*Could not find tuple in destination.");
405TEST(AddressingConstrainingTest, IndirectReconstruction)
407 TestTraceContainer
trace({
409 { C::execution_addressing_mode, 0b11'00'01'00'01'11'01'01 },
410 { C::execution_sel_op_is_indirect_wire_0_, 1 },
411 { C::execution_sel_op_is_relative_wire_0_, 0 },
412 { C::execution_sel_op_is_indirect_wire_1_, 1 },
413 { C::execution_sel_op_is_relative_wire_1_, 0 },
414 { C::execution_sel_op_is_indirect_wire_2_, 1 },
415 { C::execution_sel_op_is_relative_wire_2_, 1 },
416 { C::execution_sel_op_is_indirect_wire_3_, 1 },
417 { C::execution_sel_op_is_relative_wire_3_, 0 },
418 { C::execution_sel_op_is_indirect_wire_4_, 0 },
419 { C::execution_sel_op_is_relative_wire_4_, 0 },
420 { C::execution_sel_op_is_indirect_wire_5_, 1 },
421 { C::execution_sel_op_is_relative_wire_5_, 0 },
422 { C::execution_sel_op_is_indirect_wire_6_, 0 },
423 { C::execution_sel_op_is_relative_wire_6_, 0 },
424 { C::execution_sel_op_is_relative_wire_7_, 1 },
425 { C::execution_sel_op_is_indirect_wire_7_, 1 },
427 { C::execution_sel_bytecode_retrieval_success, 1 },
428 { C::execution_sel_instruction_fetching_success, 1 },
435TEST(AddressingConstrainingTest, IndirectReconstructionZeroWhenAddressingDisabled)
437 TestTraceContainer
trace({
439 { C::execution_addressing_mode, 123456 },
443 { C::execution_sel_bytecode_retrieval_success, 0 },
444 { C::execution_sel_instruction_fetching_success, 0 },
452 C::execution_sel_op_is_indirect_wire_0_, C::execution_sel_op_is_relative_wire_0_,
453 C::execution_sel_op_is_indirect_wire_1_, C::execution_sel_op_is_relative_wire_1_,
454 C::execution_sel_op_is_indirect_wire_2_, C::execution_sel_op_is_relative_wire_2_,
455 C::execution_sel_op_is_indirect_wire_3_, C::execution_sel_op_is_relative_wire_3_,
456 C::execution_sel_op_is_indirect_wire_4_, C::execution_sel_op_is_relative_wire_4_,
457 C::execution_sel_op_is_indirect_wire_5_, C::execution_sel_op_is_relative_wire_5_,
458 C::execution_sel_op_is_indirect_wire_6_, C::execution_sel_op_is_relative_wire_6_,
459 C::execution_sel_op_is_relative_wire_7_, C::execution_sel_op_is_indirect_wire_7_
461 for (
Column sel_on : decomposition_columns) {
463 for (
Column c : decomposition_columns) {
473TEST(AddressingConstrainingTest, IndirectGating)
475 TestTraceContainer
trace({
479 { C::execution_sel_bytecode_retrieval_success, 1 },
480 { C::execution_sel_instruction_fetching_success, 1 },
482 { C::execution_sel_op_is_indirect_wire_0_, 0 },
483 { C::execution_sel_op_is_indirect_wire_1_, 1 },
484 { C::execution_sel_op_is_indirect_wire_2_, 0 },
485 { C::execution_sel_op_is_indirect_wire_3_, 1 },
486 { C::execution_sel_op_is_indirect_wire_4_, 0 },
487 { C::execution_sel_op_is_indirect_wire_5_, 1 },
488 { C::execution_sel_op_is_indirect_wire_6_, 1 },
490 { C::execution_sel_op_is_address_0_, 1 },
491 { C::execution_sel_op_is_address_1_, 1 },
492 { C::execution_sel_op_is_address_2_, 1 },
493 { C::execution_sel_op_is_address_3_, 1 },
494 { C::execution_sel_op_is_address_4_, 1 },
496 { C::execution_sel_relative_overflow_0_, 0 },
497 { C::execution_sel_relative_overflow_1_, 0 },
498 { C::execution_sel_relative_overflow_2_, 1 },
499 { C::execution_sel_relative_overflow_3_, 1 },
500 { C::execution_sel_relative_overflow_4_, 0 },
502 { C::execution_sel_apply_indirection_0_, 0 },
503 { C::execution_sel_apply_indirection_1_, 1 },
504 { C::execution_sel_apply_indirection_2_, 0 },
505 { C::execution_sel_apply_indirection_3_, 0 },
506 { C::execution_sel_apply_indirection_4_, 0 },
510 check_relation<addressing>(trace,
521 { C::execution_sel_apply_indirection_0_, 1 },
522 { C::execution_sel_apply_indirection_1_, 0 },
523 { C::execution_sel_apply_indirection_2_, 1 },
524 { C::execution_sel_apply_indirection_3_, 1 },
525 { C::execution_sel_apply_indirection_4_, 1 },
540 trace.
set(C::execution_sel_bytecode_retrieval_success, 0, 0);
541 trace.
set(C::execution_sel_instruction_fetching_success, 0, 0);
554TEST(AddressingConstrainingTest, IndirectGatingIfBaseAddressIsInvalid)
556 TestTraceContainer
trace({
560 { C::execution_sel_bytecode_retrieval_success, 1 },
561 { C::execution_sel_instruction_fetching_success, 1 },
563 { C::execution_sel_base_address_failure, 1 },
565 { C::execution_sel_op_is_indirect_wire_0_, 0 },
566 { C::execution_sel_op_is_indirect_wire_1_, 1 },
567 { C::execution_sel_op_is_indirect_wire_2_, 0 },
568 { C::execution_sel_op_is_indirect_wire_3_, 1 },
569 { C::execution_sel_op_is_indirect_wire_4_, 0 },
570 { C::execution_sel_op_is_indirect_wire_5_, 1 },
571 { C::execution_sel_op_is_indirect_wire_6_, 1 },
573 { C::execution_sel_op_is_address_0_, 1 },
574 { C::execution_sel_op_is_address_1_, 1 },
575 { C::execution_sel_op_is_address_2_, 1 },
576 { C::execution_sel_op_is_address_3_, 0 },
577 { C::execution_sel_op_is_address_4_, 1 },
582 { C::execution_sel_relative_overflow_0_, 0 },
583 { C::execution_sel_relative_overflow_1_, 0 },
584 { C::execution_sel_relative_overflow_2_, 1 },
585 { C::execution_sel_relative_overflow_3_, 1 },
586 { C::execution_sel_relative_overflow_4_, 0 },
588 { C::execution_sel_apply_indirection_0_, 0 },
589 { C::execution_sel_apply_indirection_1_, 0 },
590 { C::execution_sel_apply_indirection_2_, 0 },
591 { C::execution_sel_apply_indirection_3_, 0 },
592 { C::execution_sel_apply_indirection_4_, 0 },
596 check_relation<addressing>(trace,
607 { C::execution_sel_apply_indirection_0_, 1 },
608 { C::execution_sel_apply_indirection_1_, 1 },
609 { C::execution_sel_apply_indirection_2_, 1 },
610 { C::execution_sel_apply_indirection_3_, 1 },
611 { C::execution_sel_apply_indirection_4_, 1 },
625TEST(AddressingConstrainingTest, IndirectPropagationWhenNoIndirection)
629 TestTraceContainer
trace({
631 { C::execution_sel_apply_indirection_0_, 0 },
632 { C::execution_sel_apply_indirection_1_, 1 },
633 { C::execution_sel_apply_indirection_2_, 0 },
634 { C::execution_sel_apply_indirection_3_, 1 },
635 { C::execution_sel_apply_indirection_4_, 0 },
637 { C::execution_op_after_relative_0_, 123 },
638 { C::execution_op_after_relative_1_, 456 },
639 { C::execution_op_after_relative_2_, 789 },
640 { C::execution_op_after_relative_3_, 101112 },
641 { C::execution_op_after_relative_4_, 131415 },
643 { C::execution_rop_0_, 123 },
644 { C::execution_rop_1_, 99001 },
645 { C::execution_rop_2_, 789 },
646 { C::execution_rop_3_, 99002 },
647 { C::execution_rop_4_, 131415 },
650 { C::execution_sel_bytecode_retrieval_success, 1 },
651 { C::execution_sel_instruction_fetching_success, 1 },
655 check_relation<addressing>(trace,
663 trace.
set(C::execution_sel_bytecode_retrieval_success, 0, 0);
664 trace.
set(C::execution_sel_instruction_fetching_success, 0, 0);
665 check_relation<addressing>(trace,
675 { C::execution_rop_0_, 7 },
676 { C::execution_rop_2_, 7 },
677 { C::execution_rop_4_, 7 },
687TEST(AddressingConstrainingTest, IndirectPropagationWhenIndirection)
696TEST(AddressingConstrainingTest, FinalCheckNoFailure)
698 FF should_apply_indirection[AVM_MAX_OPERANDS] = { 0, 0, 0, 0, 1 };
703 auto get_tag_diff_inv = [&]() {
704 FF batched_tags_diff = 0;
706 for (
size_t i = 0; i < AVM_MAX_OPERANDS; ++i) {
708 should_apply_indirection[i] * power_of_2 * (
FF(
static_cast<uint8_t
>(rop_tag[i])) -
FF(MEM_TAG_U32));
711 return batched_tags_diff != 0 ? batched_tags_diff.
invert() : 0;
714 TestTraceContainer
trace({
717 { C::execution_sel_apply_indirection_0_, should_apply_indirection[0] },
718 { C::execution_sel_apply_indirection_1_, should_apply_indirection[1] },
719 { C::execution_sel_apply_indirection_2_, should_apply_indirection[2] },
720 { C::execution_sel_apply_indirection_3_, should_apply_indirection[3] },
721 { C::execution_sel_apply_indirection_4_, should_apply_indirection[4] },
723 { C::execution_rop_tag_0_,
static_cast<uint8_t
>(rop_tag[0]) },
724 { C::execution_rop_tag_1_,
static_cast<uint8_t
>(rop_tag[1]) },
725 { C::execution_rop_tag_2_,
static_cast<uint8_t
>(rop_tag[2]) },
726 { C::execution_rop_tag_3_,
static_cast<uint8_t
>(rop_tag[3]) },
727 { C::execution_rop_tag_4_,
static_cast<uint8_t
>(rop_tag[4]) },
730 { C::execution_batched_tags_diff_inv, get_tag_diff_inv() },
731 { C::execution_sel_some_final_check_failed, 0 },
738 trace.
set(C::execution_sel_some_final_check_failed, 0, 1);
743TEST(AddressingConstrainingTest, FinalCheckSingleFailure)
745 FF should_apply_indirection[AVM_MAX_OPERANDS] = { 0, 0, 1, 0, 1 };
750 auto get_tag_diff_inv = [&]() {
751 FF batched_tags_diff = 0;
753 for (
size_t i = 0; i < AVM_MAX_OPERANDS; ++i) {
755 should_apply_indirection[i] * power_of_2 * (
FF(
static_cast<uint8_t
>(rop_tag[i])) -
FF(MEM_TAG_U32));
758 return batched_tags_diff != 0 ? batched_tags_diff.
invert() : 0;
761 TestTraceContainer
trace({
764 { C::execution_sel_apply_indirection_0_, should_apply_indirection[0] },
765 { C::execution_sel_apply_indirection_1_, should_apply_indirection[1] },
766 { C::execution_sel_apply_indirection_2_, should_apply_indirection[2] },
767 { C::execution_sel_apply_indirection_3_, should_apply_indirection[3] },
768 { C::execution_sel_apply_indirection_4_, should_apply_indirection[4] },
770 { C::execution_rop_tag_0_,
static_cast<uint8_t
>(rop_tag[0]) },
771 { C::execution_rop_tag_1_,
static_cast<uint8_t
>(rop_tag[1]) },
772 { C::execution_rop_tag_2_,
static_cast<uint8_t
>(rop_tag[2]) },
773 { C::execution_rop_tag_3_,
static_cast<uint8_t
>(rop_tag[3]) },
774 { C::execution_rop_tag_4_,
static_cast<uint8_t
>(rop_tag[4]) },
777 { C::execution_batched_tags_diff_inv, get_tag_diff_inv() },
778 { C::execution_sel_some_final_check_failed, 1 },
785 trace.
set(C::execution_sel_some_final_check_failed, 0, 0);
788 trace.
set(C::execution_batched_tags_diff_inv, 0, 0);
793TEST(AddressingConstrainingTest, FinalCheckMultipleFailures)
795 FF should_apply_indirection[AVM_MAX_OPERANDS] = { 0, 0, 1, 1, 1 };
800 auto get_tag_diff_inv = [&]() {
801 FF batched_tags_diff = 0;
803 for (
size_t i = 0; i < AVM_MAX_OPERANDS; ++i) {
805 should_apply_indirection[i] * power_of_2 * (
FF(
static_cast<uint8_t
>(rop_tag[i])) -
FF(MEM_TAG_U32));
808 return batched_tags_diff != 0 ? batched_tags_diff.
invert() : 0;
811 TestTraceContainer
trace({
814 { C::execution_sel_apply_indirection_0_, should_apply_indirection[0] },
815 { C::execution_sel_apply_indirection_1_, should_apply_indirection[1] },
816 { C::execution_sel_apply_indirection_2_, should_apply_indirection[2] },
817 { C::execution_sel_apply_indirection_3_, should_apply_indirection[3] },
818 { C::execution_sel_apply_indirection_4_, should_apply_indirection[4] },
820 { C::execution_rop_tag_0_,
static_cast<uint8_t
>(rop_tag[0]) },
821 { C::execution_rop_tag_1_,
static_cast<uint8_t
>(rop_tag[1]) },
822 { C::execution_rop_tag_2_,
static_cast<uint8_t
>(rop_tag[2]) },
823 { C::execution_rop_tag_3_,
static_cast<uint8_t
>(rop_tag[3]) },
824 { C::execution_rop_tag_4_,
static_cast<uint8_t
>(rop_tag[4]) },
827 { C::execution_batched_tags_diff_inv, get_tag_diff_inv() },
828 { C::execution_sel_some_final_check_failed, 1 },
835 trace.
set(C::execution_sel_some_final_check_failed, 0, 0);
838 trace.
set(C::execution_batched_tags_diff_inv, 0, 0);
#define EXPECT_THROW_WITH_MESSAGE(code, expectedMessageRegex)
static constexpr size_t SR_RELATIVE_RESOLUTION_4
static constexpr size_t SR_INDIRECT_PROPAGATION_4
static constexpr size_t SR_BATCHED_TAGS_DIFF_CHECK
static constexpr size_t SR_INDIRECT_PROPAGATION_0
static constexpr size_t SR_INDIRECT_PROPAGATION_2
static constexpr size_t SR_NOT_RELATIVE_OR_BASE_FAILURE_NO_OVERFLOW_2
static constexpr size_t SR_RELATIVE_RESOLUTION_3
static constexpr size_t SR_BASE_ADDRESS_CHECK
static constexpr size_t SR_RELATIVE_RESOLUTION_2
static constexpr size_t SR_INDIRECT_GATING_0
static constexpr size_t SR_INDIRECT_GATING_3
static constexpr size_t SR_NOT_RELATIVE_OR_BASE_FAILURE_NO_OVERFLOW_3
static constexpr size_t SR_ADDRESSING_MODE_RECONSTRUCTION
static constexpr size_t SR_NOT_RELATIVE_OR_BASE_FAILURE_NO_OVERFLOW_1
static std::string get_subrelation_label(size_t index)
static constexpr size_t SR_RELATIVE_RESOLUTION_0
static constexpr size_t SR_INDIRECT_GATING_2
static constexpr size_t SR_INDIRECT_PROPAGATION_1
static constexpr size_t SR_INDIRECT_PROPAGATION_3
static constexpr size_t SR_INDIRECT_GATING_4
static constexpr size_t SR_NOT_RELATIVE_OR_BASE_FAILURE_NO_OVERFLOW_4
static constexpr size_t SR_INDIRECT_GATING_1
static constexpr size_t SR_NOT_RELATIVE_OR_BASE_FAILURE_NO_OVERFLOW_0
static constexpr size_t SR_RELATIVE_RESOLUTION_1
static constexpr size_t SR_NUM_RELATIVE_INV_CHECK
void set(Column col, uint32_t row, const FF &value, bool use_atomic_limbs=false)
void check_interaction(tracegen::TestTraceContainer &trace)
TEST(AvmFixedVKTests, FixedVKCommitments)
Test that the fixed VK commitments agree with the ones computed from precomputed columns.
TestTraceContainer empty_trace()
lookup_settings< lookup_addressing_relative_overflow_result_1_settings_ > lookup_addressing_relative_overflow_result_1_settings
lookup_settings< lookup_addressing_relative_overflow_result_2_settings_ > lookup_addressing_relative_overflow_result_2_settings
lookup_settings< lookup_addressing_relative_overflow_result_4_settings_ > lookup_addressing_relative_overflow_result_4_settings
lookup_settings< lookup_addressing_relative_overflow_result_0_settings_ > lookup_addressing_relative_overflow_result_0_settings
lookup_settings< lookup_addressing_relative_overflow_result_3_settings_ > lookup_addressing_relative_overflow_result_3_settings
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
unsigned __int128 uint128_t
constexpr field invert() const noexcept