From 890203909d0f58d48126b3743c4533d28324a4d0 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 22 Feb 2024 11:30:51 +0000 Subject: [PATCH] Remove some leftover files related to Avm-mini (replaced by Avm) --- .../flavor/generated/AvmMini_flavor.hpp | 944 ------------------ .../generated/AvmMini_circuit_builder.hpp | 288 ------ .../relations/generated/AvmMini/alu_chip.hpp | 336 ------- .../relations/generated/AvmMini/avm_mini.hpp | 413 -------- .../generated/AvmMini/declare_views.hpp | 89 -- 5 files changed, 2070 deletions(-) delete mode 100644 barretenberg/cpp/src/barretenberg/flavor/generated/AvmMini_flavor.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/generated/AvmMini_circuit_builder.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/alu_chip.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/avm_mini.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/declare_views.hpp diff --git a/barretenberg/cpp/src/barretenberg/flavor/generated/AvmMini_flavor.hpp b/barretenberg/cpp/src/barretenberg/flavor/generated/AvmMini_flavor.hpp deleted file mode 100644 index 98f15e34c45b..000000000000 --- a/barretenberg/cpp/src/barretenberg/flavor/generated/AvmMini_flavor.hpp +++ /dev/null @@ -1,944 +0,0 @@ - - -#pragma once -#include "../relation_definitions.hpp" -#include "barretenberg/commitment_schemes/kzg/kzg.hpp" -#include "barretenberg/ecc/curves/bn254/g1.hpp" -#include "barretenberg/polynomials/barycentric.hpp" -#include "barretenberg/polynomials/univariate.hpp" - -#include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" - -#include "barretenberg/flavor/flavor.hpp" -#include "barretenberg/flavor/flavor_macros.hpp" -#include "barretenberg/polynomials/evaluation_domain.hpp" -#include "barretenberg/polynomials/polynomial.hpp" -#include "barretenberg/relations/generated/AvmMini/alu_chip.hpp" -#include "barretenberg/relations/generated/AvmMini/avm_mini.hpp" -#include "barretenberg/relations/generated/AvmMini/mem_trace.hpp" -#include "barretenberg/transcript/transcript.hpp" - -namespace bb { - -class AvmMiniFlavor { - public: - using Curve = curve::BN254; - using G1 = Curve::Group; - using PCS = KZG; - - using FF = G1::subgroup_field; - using Polynomial = bb::Polynomial; - using GroupElement = G1::element; - using Commitment = G1::affine_element; - using CommitmentKey = bb::CommitmentKey; - using VerifierCommitmentKey = bb::VerifierCommitmentKey; - using RelationSeparator = FF; - - static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 2; - static constexpr size_t NUM_WITNESS_ENTITIES = 69; - static constexpr size_t NUM_WIRES = NUM_WITNESS_ENTITIES + NUM_PRECOMPUTED_ENTITIES; - // We have two copies of the witness entities, so we subtract the number of fixed ones (they have no shift), one for - // the unshifted and one for the shifted - static constexpr size_t NUM_ALL_ENTITIES = 85; - - using Relations = std::tuple, AvmMini_vm::avm_mini, AvmMini_vm::mem_trace>; - - static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); - - // BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` - // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation - // length = 3 - static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t NUM_RELATIONS = std::tuple_size::value; - - template - using ProtogalaxyTupleOfTuplesOfUnivariates = - decltype(create_protogalaxy_tuple_of_tuples_of_univariates()); - using SumcheckTupleOfTuplesOfUnivariates = decltype(create_sumcheck_tuple_of_tuples_of_univariates()); - using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values()); - - static constexpr bool has_zero_row = true; - - private: - template class PrecomputedEntities : public PrecomputedEntitiesBase { - public: - using DataType = DataType_; - - DEFINE_FLAVOR_MEMBERS(DataType, avmMini_clk, avmMini_first) - - auto get_selectors() { return RefArray{ avmMini_clk, avmMini_first }; }; - auto get_sigma_polynomials() { return RefArray{}; }; - auto get_id_polynomials() { return RefArray{}; }; - auto get_table_polynomials() { return RefArray{}; }; - }; - - template class WitnessEntities { - public: - DEFINE_FLAVOR_MEMBERS(DataType, - memTrace_m_clk, - memTrace_m_sub_clk, - memTrace_m_addr, - memTrace_m_tag, - memTrace_m_val, - memTrace_m_lastAccess, - memTrace_m_last, - memTrace_m_rw, - memTrace_m_in_tag, - memTrace_m_tag_err, - memTrace_m_one_min_inv, - aluChip_alu_clk, - aluChip_alu_ia, - aluChip_alu_ib, - aluChip_alu_ic, - aluChip_alu_op_add, - aluChip_alu_op_sub, - aluChip_alu_op_mul, - aluChip_alu_op_div, - aluChip_alu_op_not, - aluChip_alu_op_eq, - aluChip_alu_ff_tag, - aluChip_alu_u8_tag, - aluChip_alu_u16_tag, - aluChip_alu_u32_tag, - aluChip_alu_u64_tag, - aluChip_alu_u128_tag, - aluChip_alu_u8_r0, - aluChip_alu_u8_r1, - aluChip_alu_u16_r0, - aluChip_alu_u16_r1, - aluChip_alu_u16_r2, - aluChip_alu_u16_r3, - aluChip_alu_u16_r4, - aluChip_alu_u16_r5, - aluChip_alu_u16_r6, - aluChip_alu_u16_r7, - aluChip_alu_u64_r0, - aluChip_alu_cf, - aluChip_alu_inv_diff, - avmMini_pc, - avmMini_internal_return_ptr, - avmMini_sel_internal_call, - avmMini_sel_internal_return, - avmMini_sel_jump, - avmMini_sel_halt, - avmMini_sel_op_add, - avmMini_sel_op_sub, - avmMini_sel_op_mul, - avmMini_sel_op_div, - avmMini_sel_op_not, - avmMini_sel_op_eq, - avmMini_in_tag, - avmMini_op_err, - avmMini_tag_err, - avmMini_inv, - avmMini_ia, - avmMini_ib, - avmMini_ic, - avmMini_mem_op_a, - avmMini_mem_op_b, - avmMini_mem_op_c, - avmMini_rwa, - avmMini_rwb, - avmMini_rwc, - avmMini_mem_idx_a, - avmMini_mem_idx_b, - avmMini_mem_idx_c, - avmMini_last) - - auto get_wires() - { - return RefArray{ memTrace_m_clk, - memTrace_m_sub_clk, - memTrace_m_addr, - memTrace_m_tag, - memTrace_m_val, - memTrace_m_lastAccess, - memTrace_m_last, - memTrace_m_rw, - memTrace_m_in_tag, - memTrace_m_tag_err, - memTrace_m_one_min_inv, - aluChip_alu_clk, - aluChip_alu_ia, - aluChip_alu_ib, - aluChip_alu_ic, - aluChip_alu_op_add, - aluChip_alu_op_sub, - aluChip_alu_op_mul, - aluChip_alu_op_div, - aluChip_alu_op_not, - aluChip_alu_op_eq, - aluChip_alu_ff_tag, - aluChip_alu_u8_tag, - aluChip_alu_u16_tag, - aluChip_alu_u32_tag, - aluChip_alu_u64_tag, - aluChip_alu_u128_tag, - aluChip_alu_u8_r0, - aluChip_alu_u8_r1, - aluChip_alu_u16_r0, - aluChip_alu_u16_r1, - aluChip_alu_u16_r2, - aluChip_alu_u16_r3, - aluChip_alu_u16_r4, - aluChip_alu_u16_r5, - aluChip_alu_u16_r6, - aluChip_alu_u16_r7, - aluChip_alu_u64_r0, - aluChip_alu_cf, - aluChip_alu_inv_diff, - avmMini_pc, - avmMini_internal_return_ptr, - avmMini_sel_internal_call, - avmMini_sel_internal_return, - avmMini_sel_jump, - avmMini_sel_halt, - avmMini_sel_op_add, - avmMini_sel_op_sub, - avmMini_sel_op_mul, - avmMini_sel_op_div, - avmMini_sel_op_not, - avmMini_sel_op_eq, - avmMini_in_tag, - avmMini_op_err, - avmMini_tag_err, - avmMini_inv, - avmMini_ia, - avmMini_ib, - avmMini_ic, - avmMini_mem_op_a, - avmMini_mem_op_b, - avmMini_mem_op_c, - avmMini_rwa, - avmMini_rwb, - avmMini_rwc, - avmMini_mem_idx_a, - avmMini_mem_idx_b, - avmMini_mem_idx_c, - avmMini_last }; - }; - auto get_sorted_polynomials() { return RefArray{}; }; - }; - - template class AllEntities { - public: - DEFINE_FLAVOR_MEMBERS(DataType, - avmMini_clk, - avmMini_first, - memTrace_m_clk, - memTrace_m_sub_clk, - memTrace_m_addr, - memTrace_m_tag, - memTrace_m_val, - memTrace_m_lastAccess, - memTrace_m_last, - memTrace_m_rw, - memTrace_m_in_tag, - memTrace_m_tag_err, - memTrace_m_one_min_inv, - aluChip_alu_clk, - aluChip_alu_ia, - aluChip_alu_ib, - aluChip_alu_ic, - aluChip_alu_op_add, - aluChip_alu_op_sub, - aluChip_alu_op_mul, - aluChip_alu_op_div, - aluChip_alu_op_not, - aluChip_alu_op_eq, - aluChip_alu_ff_tag, - aluChip_alu_u8_tag, - aluChip_alu_u16_tag, - aluChip_alu_u32_tag, - aluChip_alu_u64_tag, - aluChip_alu_u128_tag, - aluChip_alu_u8_r0, - aluChip_alu_u8_r1, - aluChip_alu_u16_r0, - aluChip_alu_u16_r1, - aluChip_alu_u16_r2, - aluChip_alu_u16_r3, - aluChip_alu_u16_r4, - aluChip_alu_u16_r5, - aluChip_alu_u16_r6, - aluChip_alu_u16_r7, - aluChip_alu_u64_r0, - aluChip_alu_cf, - aluChip_alu_inv_diff, - avmMini_pc, - avmMini_internal_return_ptr, - avmMini_sel_internal_call, - avmMini_sel_internal_return, - avmMini_sel_jump, - avmMini_sel_halt, - avmMini_sel_op_add, - avmMini_sel_op_sub, - avmMini_sel_op_mul, - avmMini_sel_op_div, - avmMini_sel_op_not, - avmMini_sel_op_eq, - avmMini_in_tag, - avmMini_op_err, - avmMini_tag_err, - avmMini_inv, - avmMini_ia, - avmMini_ib, - avmMini_ic, - avmMini_mem_op_a, - avmMini_mem_op_b, - avmMini_mem_op_c, - avmMini_rwa, - avmMini_rwb, - avmMini_rwc, - avmMini_mem_idx_a, - avmMini_mem_idx_b, - avmMini_mem_idx_c, - avmMini_last, - aluChip_alu_u16_r2_shift, - aluChip_alu_u16_r0_shift, - aluChip_alu_u16_r5_shift, - aluChip_alu_u16_r6_shift, - aluChip_alu_u16_r1_shift, - aluChip_alu_u16_r7_shift, - aluChip_alu_u16_r3_shift, - aluChip_alu_u16_r4_shift, - avmMini_pc_shift, - avmMini_internal_return_ptr_shift, - memTrace_m_tag_shift, - memTrace_m_rw_shift, - memTrace_m_addr_shift, - memTrace_m_val_shift) - - auto get_wires() - { - return RefArray{ avmMini_clk, - avmMini_first, - memTrace_m_clk, - memTrace_m_sub_clk, - memTrace_m_addr, - memTrace_m_tag, - memTrace_m_val, - memTrace_m_lastAccess, - memTrace_m_last, - memTrace_m_rw, - memTrace_m_in_tag, - memTrace_m_tag_err, - memTrace_m_one_min_inv, - aluChip_alu_clk, - aluChip_alu_ia, - aluChip_alu_ib, - aluChip_alu_ic, - aluChip_alu_op_add, - aluChip_alu_op_sub, - aluChip_alu_op_mul, - aluChip_alu_op_div, - aluChip_alu_op_not, - aluChip_alu_op_eq, - aluChip_alu_ff_tag, - aluChip_alu_u8_tag, - aluChip_alu_u16_tag, - aluChip_alu_u32_tag, - aluChip_alu_u64_tag, - aluChip_alu_u128_tag, - aluChip_alu_u8_r0, - aluChip_alu_u8_r1, - aluChip_alu_u16_r0, - aluChip_alu_u16_r1, - aluChip_alu_u16_r2, - aluChip_alu_u16_r3, - aluChip_alu_u16_r4, - aluChip_alu_u16_r5, - aluChip_alu_u16_r6, - aluChip_alu_u16_r7, - aluChip_alu_u64_r0, - aluChip_alu_cf, - aluChip_alu_inv_diff, - avmMini_pc, - avmMini_internal_return_ptr, - avmMini_sel_internal_call, - avmMini_sel_internal_return, - avmMini_sel_jump, - avmMini_sel_halt, - avmMini_sel_op_add, - avmMini_sel_op_sub, - avmMini_sel_op_mul, - avmMini_sel_op_div, - avmMini_sel_op_not, - avmMini_sel_op_eq, - avmMini_in_tag, - avmMini_op_err, - avmMini_tag_err, - avmMini_inv, - avmMini_ia, - avmMini_ib, - avmMini_ic, - avmMini_mem_op_a, - avmMini_mem_op_b, - avmMini_mem_op_c, - avmMini_rwa, - avmMini_rwb, - avmMini_rwc, - avmMini_mem_idx_a, - avmMini_mem_idx_b, - avmMini_mem_idx_c, - avmMini_last, - aluChip_alu_u16_r2_shift, - aluChip_alu_u16_r0_shift, - aluChip_alu_u16_r5_shift, - aluChip_alu_u16_r6_shift, - aluChip_alu_u16_r1_shift, - aluChip_alu_u16_r7_shift, - aluChip_alu_u16_r3_shift, - aluChip_alu_u16_r4_shift, - avmMini_pc_shift, - avmMini_internal_return_ptr_shift, - memTrace_m_tag_shift, - memTrace_m_rw_shift, - memTrace_m_addr_shift, - memTrace_m_val_shift }; - }; - auto get_unshifted() - { - return RefArray{ avmMini_clk, - avmMini_first, - memTrace_m_clk, - memTrace_m_sub_clk, - memTrace_m_addr, - memTrace_m_tag, - memTrace_m_val, - memTrace_m_lastAccess, - memTrace_m_last, - memTrace_m_rw, - memTrace_m_in_tag, - memTrace_m_tag_err, - memTrace_m_one_min_inv, - aluChip_alu_clk, - aluChip_alu_ia, - aluChip_alu_ib, - aluChip_alu_ic, - aluChip_alu_op_add, - aluChip_alu_op_sub, - aluChip_alu_op_mul, - aluChip_alu_op_div, - aluChip_alu_op_not, - aluChip_alu_op_eq, - aluChip_alu_ff_tag, - aluChip_alu_u8_tag, - aluChip_alu_u16_tag, - aluChip_alu_u32_tag, - aluChip_alu_u64_tag, - aluChip_alu_u128_tag, - aluChip_alu_u8_r0, - aluChip_alu_u8_r1, - aluChip_alu_u16_r0, - aluChip_alu_u16_r1, - aluChip_alu_u16_r2, - aluChip_alu_u16_r3, - aluChip_alu_u16_r4, - aluChip_alu_u16_r5, - aluChip_alu_u16_r6, - aluChip_alu_u16_r7, - aluChip_alu_u64_r0, - aluChip_alu_cf, - aluChip_alu_inv_diff, - avmMini_pc, - avmMini_internal_return_ptr, - avmMini_sel_internal_call, - avmMini_sel_internal_return, - avmMini_sel_jump, - avmMini_sel_halt, - avmMini_sel_op_add, - avmMini_sel_op_sub, - avmMini_sel_op_mul, - avmMini_sel_op_div, - avmMini_sel_op_not, - avmMini_sel_op_eq, - avmMini_in_tag, - avmMini_op_err, - avmMini_tag_err, - avmMini_inv, - avmMini_ia, - avmMini_ib, - avmMini_ic, - avmMini_mem_op_a, - avmMini_mem_op_b, - avmMini_mem_op_c, - avmMini_rwa, - avmMini_rwb, - avmMini_rwc, - avmMini_mem_idx_a, - avmMini_mem_idx_b, - avmMini_mem_idx_c, - avmMini_last }; - }; - auto get_to_be_shifted() - { - return RefArray{ aluChip_alu_u16_r2, aluChip_alu_u16_r0, - aluChip_alu_u16_r5, aluChip_alu_u16_r6, - aluChip_alu_u16_r1, aluChip_alu_u16_r7, - aluChip_alu_u16_r3, aluChip_alu_u16_r4, - avmMini_pc, avmMini_internal_return_ptr, - memTrace_m_tag, memTrace_m_rw, - memTrace_m_addr, memTrace_m_val }; - }; - auto get_shifted() - { - return RefArray{ aluChip_alu_u16_r2_shift, aluChip_alu_u16_r0_shift, - aluChip_alu_u16_r5_shift, aluChip_alu_u16_r6_shift, - aluChip_alu_u16_r1_shift, aluChip_alu_u16_r7_shift, - aluChip_alu_u16_r3_shift, aluChip_alu_u16_r4_shift, - avmMini_pc_shift, avmMini_internal_return_ptr_shift, - memTrace_m_tag_shift, memTrace_m_rw_shift, - memTrace_m_addr_shift, memTrace_m_val_shift }; - }; - }; - - public: - class ProvingKey : public ProvingKey_, WitnessEntities> { - public: - // Expose constructors on the base class - using Base = ProvingKey_, WitnessEntities>; - using Base::Base; - - auto get_to_be_shifted() - { - return RefArray{ aluChip_alu_u16_r2, aluChip_alu_u16_r0, - aluChip_alu_u16_r5, aluChip_alu_u16_r6, - aluChip_alu_u16_r1, aluChip_alu_u16_r7, - aluChip_alu_u16_r3, aluChip_alu_u16_r4, - avmMini_pc, avmMini_internal_return_ptr, - memTrace_m_tag, memTrace_m_rw, - memTrace_m_addr, memTrace_m_val }; - }; - - // The plookup wires that store plookup read data. - RefArray get_table_column_wires() { return {}; }; - }; - - using VerificationKey = VerificationKey_>; - - using FoldedPolynomials = AllEntities>; - - class AllValues : public AllEntities { - public: - using Base = AllEntities; - using Base::Base; - }; - - /** - * @brief A container for the prover polynomials handles. - */ - class ProverPolynomials : public AllEntities { - public: - // Define all operations as default, except move construction/assignment - ProverPolynomials() = default; - ProverPolynomials& operator=(const ProverPolynomials&) = delete; - ProverPolynomials(const ProverPolynomials& o) = delete; - ProverPolynomials(ProverPolynomials&& o) noexcept = default; - ProverPolynomials& operator=(ProverPolynomials&& o) noexcept = default; - ~ProverPolynomials() = default; - [[nodiscard]] size_t get_polynomial_size() const { return memTrace_m_clk.size(); } - /** - * @brief Returns the evaluations of all prover polynomials at one point on the boolean hypercube, which - * represents one row in the execution trace. - */ - [[nodiscard]] AllValues get_row(size_t row_idx) const - { - AllValues result; - for (auto [result_field, polynomial] : zip_view(result.get_all(), this->get_all())) { - result_field = polynomial[row_idx]; - } - return result; - } - }; - - using RowPolynomials = AllEntities; - - class PartiallyEvaluatedMultivariates : public AllEntities { - public: - PartiallyEvaluatedMultivariates() = default; - PartiallyEvaluatedMultivariates(const size_t circuit_size) - { - // Storage is only needed after the first partial evaluation, hence polynomials of size (n / 2) - for (auto& poly : get_all()) { - poly = Polynomial(circuit_size / 2); - } - } - }; - - /** - * @brief A container for univariates used during Protogalaxy folding and sumcheck. - * @details During folding and sumcheck, the prover evaluates the relations on these univariates. - */ - template using ProverUnivariates = AllEntities>; - - /** - * @brief A container for univariates produced during the hot loop in sumcheck. - */ - using ExtendedEdges = ProverUnivariates; - - class CommitmentLabels : public AllEntities { - private: - using Base = AllEntities; - - public: - CommitmentLabels() - : AllEntities() - { - Base::avmMini_clk = "AVMMINI_CLK"; - Base::avmMini_first = "AVMMINI_FIRST"; - Base::memTrace_m_clk = "MEMTRACE_M_CLK"; - Base::memTrace_m_sub_clk = "MEMTRACE_M_SUB_CLK"; - Base::memTrace_m_addr = "MEMTRACE_M_ADDR"; - Base::memTrace_m_tag = "MEMTRACE_M_TAG"; - Base::memTrace_m_val = "MEMTRACE_M_VAL"; - Base::memTrace_m_lastAccess = "MEMTRACE_M_LASTACCESS"; - Base::memTrace_m_last = "MEMTRACE_M_LAST"; - Base::memTrace_m_rw = "MEMTRACE_M_RW"; - Base::memTrace_m_in_tag = "MEMTRACE_M_IN_TAG"; - Base::memTrace_m_tag_err = "MEMTRACE_M_TAG_ERR"; - Base::memTrace_m_one_min_inv = "MEMTRACE_M_ONE_MIN_INV"; - Base::aluChip_alu_clk = "ALUCHIP_ALU_CLK"; - Base::aluChip_alu_ia = "ALUCHIP_ALU_IA"; - Base::aluChip_alu_ib = "ALUCHIP_ALU_IB"; - Base::aluChip_alu_ic = "ALUCHIP_ALU_IC"; - Base::aluChip_alu_op_add = "ALUCHIP_ALU_OP_ADD"; - Base::aluChip_alu_op_sub = "ALUCHIP_ALU_OP_SUB"; - Base::aluChip_alu_op_mul = "ALUCHIP_ALU_OP_MUL"; - Base::aluChip_alu_op_div = "ALUCHIP_ALU_OP_DIV"; - Base::aluChip_alu_op_not = "ALUCHIP_ALU_OP_NOT"; - Base::aluChip_alu_op_eq = "ALUCHIP_ALU_OP_EQ"; - Base::aluChip_alu_ff_tag = "ALUCHIP_ALU_FF_TAG"; - Base::aluChip_alu_u8_tag = "ALUCHIP_ALU_U8_TAG"; - Base::aluChip_alu_u16_tag = "ALUCHIP_ALU_U16_TAG"; - Base::aluChip_alu_u32_tag = "ALUCHIP_ALU_U32_TAG"; - Base::aluChip_alu_u64_tag = "ALUCHIP_ALU_U64_TAG"; - Base::aluChip_alu_u128_tag = "ALUCHIP_ALU_U128_TAG"; - Base::aluChip_alu_u8_r0 = "ALUCHIP_ALU_U8_R0"; - Base::aluChip_alu_u8_r1 = "ALUCHIP_ALU_U8_R1"; - Base::aluChip_alu_u16_r0 = "ALUCHIP_ALU_U16_R0"; - Base::aluChip_alu_u16_r1 = "ALUCHIP_ALU_U16_R1"; - Base::aluChip_alu_u16_r2 = "ALUCHIP_ALU_U16_R2"; - Base::aluChip_alu_u16_r3 = "ALUCHIP_ALU_U16_R3"; - Base::aluChip_alu_u16_r4 = "ALUCHIP_ALU_U16_R4"; - Base::aluChip_alu_u16_r5 = "ALUCHIP_ALU_U16_R5"; - Base::aluChip_alu_u16_r6 = "ALUCHIP_ALU_U16_R6"; - Base::aluChip_alu_u16_r7 = "ALUCHIP_ALU_U16_R7"; - Base::aluChip_alu_u64_r0 = "ALUCHIP_ALU_U64_R0"; - Base::aluChip_alu_cf = "ALUCHIP_ALU_CF"; - Base::aluChip_alu_inv_diff = "ALUCHIP_ALU_INV_DIFF"; - Base::avmMini_pc = "AVMMINI_PC"; - Base::avmMini_internal_return_ptr = "AVMMINI_INTERNAL_RETURN_PTR"; - Base::avmMini_sel_internal_call = "AVMMINI_SEL_INTERNAL_CALL"; - Base::avmMini_sel_internal_return = "AVMMINI_SEL_INTERNAL_RETURN"; - Base::avmMini_sel_jump = "AVMMINI_SEL_JUMP"; - Base::avmMini_sel_halt = "AVMMINI_SEL_HALT"; - Base::avmMini_sel_op_add = "AVMMINI_SEL_OP_ADD"; - Base::avmMini_sel_op_sub = "AVMMINI_SEL_OP_SUB"; - Base::avmMini_sel_op_mul = "AVMMINI_SEL_OP_MUL"; - Base::avmMini_sel_op_div = "AVMMINI_SEL_OP_DIV"; - Base::avmMini_sel_op_not = "AVMMINI_SEL_OP_NOT"; - Base::avmMini_sel_op_eq = "AVMMINI_SEL_OP_EQ"; - Base::avmMini_in_tag = "AVMMINI_IN_TAG"; - Base::avmMini_op_err = "AVMMINI_OP_ERR"; - Base::avmMini_tag_err = "AVMMINI_TAG_ERR"; - Base::avmMini_inv = "AVMMINI_INV"; - Base::avmMini_ia = "AVMMINI_IA"; - Base::avmMini_ib = "AVMMINI_IB"; - Base::avmMini_ic = "AVMMINI_IC"; - Base::avmMini_mem_op_a = "AVMMINI_MEM_OP_A"; - Base::avmMini_mem_op_b = "AVMMINI_MEM_OP_B"; - Base::avmMini_mem_op_c = "AVMMINI_MEM_OP_C"; - Base::avmMini_rwa = "AVMMINI_RWA"; - Base::avmMini_rwb = "AVMMINI_RWB"; - Base::avmMini_rwc = "AVMMINI_RWC"; - Base::avmMini_mem_idx_a = "AVMMINI_MEM_IDX_A"; - Base::avmMini_mem_idx_b = "AVMMINI_MEM_IDX_B"; - Base::avmMini_mem_idx_c = "AVMMINI_MEM_IDX_C"; - Base::avmMini_last = "AVMMINI_LAST"; - }; - }; - - class VerifierCommitments : public AllEntities { - private: - using Base = AllEntities; - - public: - VerifierCommitments(const std::shared_ptr& verification_key) - { - avmMini_clk = verification_key->avmMini_clk; - avmMini_first = verification_key->avmMini_first; - } - }; - - class Transcript : public NativeTranscript { - public: - uint32_t circuit_size; - - Commitment memTrace_m_clk; - Commitment memTrace_m_sub_clk; - Commitment memTrace_m_addr; - Commitment memTrace_m_tag; - Commitment memTrace_m_val; - Commitment memTrace_m_lastAccess; - Commitment memTrace_m_last; - Commitment memTrace_m_rw; - Commitment memTrace_m_in_tag; - Commitment memTrace_m_tag_err; - Commitment memTrace_m_one_min_inv; - Commitment aluChip_alu_clk; - Commitment aluChip_alu_ia; - Commitment aluChip_alu_ib; - Commitment aluChip_alu_ic; - Commitment aluChip_alu_op_add; - Commitment aluChip_alu_op_sub; - Commitment aluChip_alu_op_mul; - Commitment aluChip_alu_op_div; - Commitment aluChip_alu_op_not; - Commitment aluChip_alu_op_eq; - Commitment aluChip_alu_ff_tag; - Commitment aluChip_alu_u8_tag; - Commitment aluChip_alu_u16_tag; - Commitment aluChip_alu_u32_tag; - Commitment aluChip_alu_u64_tag; - Commitment aluChip_alu_u128_tag; - Commitment aluChip_alu_u8_r0; - Commitment aluChip_alu_u8_r1; - Commitment aluChip_alu_u16_r0; - Commitment aluChip_alu_u16_r1; - Commitment aluChip_alu_u16_r2; - Commitment aluChip_alu_u16_r3; - Commitment aluChip_alu_u16_r4; - Commitment aluChip_alu_u16_r5; - Commitment aluChip_alu_u16_r6; - Commitment aluChip_alu_u16_r7; - Commitment aluChip_alu_u64_r0; - Commitment aluChip_alu_cf; - Commitment aluChip_alu_inv_diff; - Commitment avmMini_pc; - Commitment avmMini_internal_return_ptr; - Commitment avmMini_sel_internal_call; - Commitment avmMini_sel_internal_return; - Commitment avmMini_sel_jump; - Commitment avmMini_sel_halt; - Commitment avmMini_sel_op_add; - Commitment avmMini_sel_op_sub; - Commitment avmMini_sel_op_mul; - Commitment avmMini_sel_op_div; - Commitment avmMini_sel_op_not; - Commitment avmMini_sel_op_eq; - Commitment avmMini_in_tag; - Commitment avmMini_op_err; - Commitment avmMini_tag_err; - Commitment avmMini_inv; - Commitment avmMini_ia; - Commitment avmMini_ib; - Commitment avmMini_ic; - Commitment avmMini_mem_op_a; - Commitment avmMini_mem_op_b; - Commitment avmMini_mem_op_c; - Commitment avmMini_rwa; - Commitment avmMini_rwb; - Commitment avmMini_rwc; - Commitment avmMini_mem_idx_a; - Commitment avmMini_mem_idx_b; - Commitment avmMini_mem_idx_c; - Commitment avmMini_last; - - std::vector> sumcheck_univariates; - std::array sumcheck_evaluations; - std::vector zm_cq_comms; - Commitment zm_cq_comm; - Commitment zm_pi_comm; - - Transcript() = default; - - Transcript(const std::vector& proof) - : NativeTranscript(proof) - {} - - void deserialize_full_transcript() - { - size_t num_frs_read = 0; - circuit_size = deserialize_from_buffer(proof_data, num_frs_read); - size_t log_n = numeric::get_msb(circuit_size); - - memTrace_m_clk = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_sub_clk = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_addr = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_val = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_lastAccess = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_last = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_rw = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_in_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_tag_err = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - memTrace_m_one_min_inv = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_clk = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_ia = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_ib = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_ic = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_op_add = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_op_sub = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_op_mul = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_op_div = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_op_not = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_op_eq = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_ff_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u8_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u32_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u64_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u128_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u8_r0 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u8_r1 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r0 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r1 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r2 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r3 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r4 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r5 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r6 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u16_r7 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_u64_r0 = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_cf = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - aluChip_alu_inv_diff = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_pc = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_internal_return_ptr = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_internal_call = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_internal_return = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_jump = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_halt = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_op_add = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_op_sub = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_op_mul = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_op_div = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_op_not = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_sel_op_eq = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_in_tag = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_op_err = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_tag_err = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_inv = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_ia = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_ib = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_ic = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_mem_op_a = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_mem_op_b = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_mem_op_c = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_rwa = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_rwb = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_rwc = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_mem_idx_a = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_mem_idx_b = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_mem_idx_c = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - avmMini_last = deserialize_from_buffer(Transcript::proof_data, num_frs_read); - - for (size_t i = 0; i < log_n; ++i) { - sumcheck_univariates.emplace_back( - deserialize_from_buffer>(Transcript::proof_data, - num_frs_read)); - } - sumcheck_evaluations = - deserialize_from_buffer>(Transcript::proof_data, num_frs_read); - for (size_t i = 0; i < log_n; ++i) { - zm_cq_comms.push_back(deserialize_from_buffer(proof_data, num_frs_read)); - } - zm_cq_comm = deserialize_from_buffer(proof_data, num_frs_read); - zm_pi_comm = deserialize_from_buffer(proof_data, num_frs_read); - } - - void serialize_full_transcript() - { - size_t old_proof_length = proof_data.size(); - Transcript::proof_data.clear(); - size_t log_n = numeric::get_msb(circuit_size); - - serialize_to_buffer(circuit_size, Transcript::proof_data); - - serialize_to_buffer(memTrace_m_clk, Transcript::proof_data); - serialize_to_buffer(memTrace_m_sub_clk, Transcript::proof_data); - serialize_to_buffer(memTrace_m_addr, Transcript::proof_data); - serialize_to_buffer(memTrace_m_tag, Transcript::proof_data); - serialize_to_buffer(memTrace_m_val, Transcript::proof_data); - serialize_to_buffer(memTrace_m_lastAccess, Transcript::proof_data); - serialize_to_buffer(memTrace_m_last, Transcript::proof_data); - serialize_to_buffer(memTrace_m_rw, Transcript::proof_data); - serialize_to_buffer(memTrace_m_in_tag, Transcript::proof_data); - serialize_to_buffer(memTrace_m_tag_err, Transcript::proof_data); - serialize_to_buffer(memTrace_m_one_min_inv, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_clk, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_ia, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_ib, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_ic, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_op_add, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_op_sub, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_op_mul, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_op_div, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_op_not, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_op_eq, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_ff_tag, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u8_tag, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_tag, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u32_tag, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u64_tag, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u128_tag, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u8_r0, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u8_r1, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r0, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r1, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r2, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r3, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r4, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r5, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r6, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u16_r7, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_u64_r0, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_cf, Transcript::proof_data); - serialize_to_buffer(aluChip_alu_inv_diff, Transcript::proof_data); - serialize_to_buffer(avmMini_pc, Transcript::proof_data); - serialize_to_buffer(avmMini_internal_return_ptr, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_internal_call, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_internal_return, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_jump, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_halt, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_op_add, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_op_sub, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_op_mul, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_op_div, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_op_not, Transcript::proof_data); - serialize_to_buffer(avmMini_sel_op_eq, Transcript::proof_data); - serialize_to_buffer(avmMini_in_tag, Transcript::proof_data); - serialize_to_buffer(avmMini_op_err, Transcript::proof_data); - serialize_to_buffer(avmMini_tag_err, Transcript::proof_data); - serialize_to_buffer(avmMini_inv, Transcript::proof_data); - serialize_to_buffer(avmMini_ia, Transcript::proof_data); - serialize_to_buffer(avmMini_ib, Transcript::proof_data); - serialize_to_buffer(avmMini_ic, Transcript::proof_data); - serialize_to_buffer(avmMini_mem_op_a, Transcript::proof_data); - serialize_to_buffer(avmMini_mem_op_b, Transcript::proof_data); - serialize_to_buffer(avmMini_mem_op_c, Transcript::proof_data); - serialize_to_buffer(avmMini_rwa, Transcript::proof_data); - serialize_to_buffer(avmMini_rwb, Transcript::proof_data); - serialize_to_buffer(avmMini_rwc, Transcript::proof_data); - serialize_to_buffer(avmMini_mem_idx_a, Transcript::proof_data); - serialize_to_buffer(avmMini_mem_idx_b, Transcript::proof_data); - serialize_to_buffer(avmMini_mem_idx_c, Transcript::proof_data); - serialize_to_buffer(avmMini_last, Transcript::proof_data); - - for (size_t i = 0; i < log_n; ++i) { - serialize_to_buffer(sumcheck_univariates[i], Transcript::proof_data); - } - serialize_to_buffer(sumcheck_evaluations, Transcript::proof_data); - for (size_t i = 0; i < log_n; ++i) { - serialize_to_buffer(zm_cq_comms[i], proof_data); - } - serialize_to_buffer(zm_cq_comm, proof_data); - serialize_to_buffer(zm_pi_comm, proof_data); - - // sanity check to make sure we generate the same length of proof as before. - ASSERT(proof_data.size() == old_proof_length); - } - }; -}; - -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/generated/AvmMini_circuit_builder.hpp b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/generated/AvmMini_circuit_builder.hpp deleted file mode 100644 index 42416b1254be..000000000000 --- a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/generated/AvmMini_circuit_builder.hpp +++ /dev/null @@ -1,288 +0,0 @@ - - -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/common/constexpr_utils.hpp" -#include "barretenberg/common/throw_or_abort.hpp" -#include "barretenberg/ecc/curves/bn254/fr.hpp" -#include "barretenberg/honk/proof_system/logderivative_library.hpp" -#include "barretenberg/proof_system/circuit_builder/circuit_builder_base.hpp" -#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" -#include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" - -#include "barretenberg/flavor/generated/AvmMini_flavor.hpp" -#include "barretenberg/relations/generated/AvmMini/alu_chip.hpp" -#include "barretenberg/relations/generated/AvmMini/avm_mini.hpp" -#include "barretenberg/relations/generated/AvmMini/mem_trace.hpp" - -using namespace bb; - -namespace bb { - -template struct AvmMiniFullRow { - FF avmMini_clk{}; - FF avmMini_first{}; - FF memTrace_m_clk{}; - FF memTrace_m_sub_clk{}; - FF memTrace_m_addr{}; - FF memTrace_m_tag{}; - FF memTrace_m_val{}; - FF memTrace_m_lastAccess{}; - FF memTrace_m_last{}; - FF memTrace_m_rw{}; - FF memTrace_m_in_tag{}; - FF memTrace_m_tag_err{}; - FF memTrace_m_one_min_inv{}; - FF aluChip_alu_clk{}; - FF aluChip_alu_ia{}; - FF aluChip_alu_ib{}; - FF aluChip_alu_ic{}; - FF aluChip_alu_op_add{}; - FF aluChip_alu_op_sub{}; - FF aluChip_alu_op_mul{}; - FF aluChip_alu_op_div{}; - FF aluChip_alu_op_not{}; - FF aluChip_alu_op_eq{}; - FF aluChip_alu_ff_tag{}; - FF aluChip_alu_u8_tag{}; - FF aluChip_alu_u16_tag{}; - FF aluChip_alu_u32_tag{}; - FF aluChip_alu_u64_tag{}; - FF aluChip_alu_u128_tag{}; - FF aluChip_alu_u8_r0{}; - FF aluChip_alu_u8_r1{}; - FF aluChip_alu_u16_r0{}; - FF aluChip_alu_u16_r1{}; - FF aluChip_alu_u16_r2{}; - FF aluChip_alu_u16_r3{}; - FF aluChip_alu_u16_r4{}; - FF aluChip_alu_u16_r5{}; - FF aluChip_alu_u16_r6{}; - FF aluChip_alu_u16_r7{}; - FF aluChip_alu_u64_r0{}; - FF aluChip_alu_cf{}; - FF aluChip_alu_inv_diff{}; - FF avmMini_pc{}; - FF avmMini_internal_return_ptr{}; - FF avmMini_sel_internal_call{}; - FF avmMini_sel_internal_return{}; - FF avmMini_sel_jump{}; - FF avmMini_sel_halt{}; - FF avmMini_sel_op_add{}; - FF avmMini_sel_op_sub{}; - FF avmMini_sel_op_mul{}; - FF avmMini_sel_op_div{}; - FF avmMini_sel_op_not{}; - FF avmMini_sel_op_eq{}; - FF avmMini_in_tag{}; - FF avmMini_op_err{}; - FF avmMini_tag_err{}; - FF avmMini_inv{}; - FF avmMini_ia{}; - FF avmMini_ib{}; - FF avmMini_ic{}; - FF avmMini_mem_op_a{}; - FF avmMini_mem_op_b{}; - FF avmMini_mem_op_c{}; - FF avmMini_rwa{}; - FF avmMini_rwb{}; - FF avmMini_rwc{}; - FF avmMini_mem_idx_a{}; - FF avmMini_mem_idx_b{}; - FF avmMini_mem_idx_c{}; - FF avmMini_last{}; - FF aluChip_alu_u16_r2_shift{}; - FF aluChip_alu_u16_r0_shift{}; - FF aluChip_alu_u16_r5_shift{}; - FF aluChip_alu_u16_r6_shift{}; - FF aluChip_alu_u16_r1_shift{}; - FF aluChip_alu_u16_r7_shift{}; - FF aluChip_alu_u16_r3_shift{}; - FF aluChip_alu_u16_r4_shift{}; - FF avmMini_pc_shift{}; - FF avmMini_internal_return_ptr_shift{}; - FF memTrace_m_tag_shift{}; - FF memTrace_m_rw_shift{}; - FF memTrace_m_addr_shift{}; - FF memTrace_m_val_shift{}; -}; - -class AvmMiniCircuitBuilder { - public: - using Flavor = bb::AvmMiniFlavor; - using FF = Flavor::FF; - using Row = AvmMiniFullRow; - - // TODO: template - using Polynomial = Flavor::Polynomial; - using ProverPolynomials = Flavor::ProverPolynomials; - - static constexpr size_t num_fixed_columns = 85; - static constexpr size_t num_polys = 71; - std::vector rows; - - void set_trace(std::vector&& trace) { rows = std::move(trace); } - - ProverPolynomials compute_polynomials() - { - const auto num_rows = get_circuit_subgroup_size(); - ProverPolynomials polys; - - // Allocate mem for each column - for (auto& poly : polys.get_all()) { - poly = Polynomial(num_rows); - } - - for (size_t i = 0; i < rows.size(); i++) { - polys.avmMini_clk[i] = rows[i].avmMini_clk; - polys.avmMini_first[i] = rows[i].avmMini_first; - polys.memTrace_m_clk[i] = rows[i].memTrace_m_clk; - polys.memTrace_m_sub_clk[i] = rows[i].memTrace_m_sub_clk; - polys.memTrace_m_addr[i] = rows[i].memTrace_m_addr; - polys.memTrace_m_tag[i] = rows[i].memTrace_m_tag; - polys.memTrace_m_val[i] = rows[i].memTrace_m_val; - polys.memTrace_m_lastAccess[i] = rows[i].memTrace_m_lastAccess; - polys.memTrace_m_last[i] = rows[i].memTrace_m_last; - polys.memTrace_m_rw[i] = rows[i].memTrace_m_rw; - polys.memTrace_m_in_tag[i] = rows[i].memTrace_m_in_tag; - polys.memTrace_m_tag_err[i] = rows[i].memTrace_m_tag_err; - polys.memTrace_m_one_min_inv[i] = rows[i].memTrace_m_one_min_inv; - polys.aluChip_alu_clk[i] = rows[i].aluChip_alu_clk; - polys.aluChip_alu_ia[i] = rows[i].aluChip_alu_ia; - polys.aluChip_alu_ib[i] = rows[i].aluChip_alu_ib; - polys.aluChip_alu_ic[i] = rows[i].aluChip_alu_ic; - polys.aluChip_alu_op_add[i] = rows[i].aluChip_alu_op_add; - polys.aluChip_alu_op_sub[i] = rows[i].aluChip_alu_op_sub; - polys.aluChip_alu_op_mul[i] = rows[i].aluChip_alu_op_mul; - polys.aluChip_alu_op_div[i] = rows[i].aluChip_alu_op_div; - polys.aluChip_alu_op_not[i] = rows[i].aluChip_alu_op_not; - polys.aluChip_alu_op_eq[i] = rows[i].aluChip_alu_op_eq; - polys.aluChip_alu_ff_tag[i] = rows[i].aluChip_alu_ff_tag; - polys.aluChip_alu_u8_tag[i] = rows[i].aluChip_alu_u8_tag; - polys.aluChip_alu_u16_tag[i] = rows[i].aluChip_alu_u16_tag; - polys.aluChip_alu_u32_tag[i] = rows[i].aluChip_alu_u32_tag; - polys.aluChip_alu_u64_tag[i] = rows[i].aluChip_alu_u64_tag; - polys.aluChip_alu_u128_tag[i] = rows[i].aluChip_alu_u128_tag; - polys.aluChip_alu_u8_r0[i] = rows[i].aluChip_alu_u8_r0; - polys.aluChip_alu_u8_r1[i] = rows[i].aluChip_alu_u8_r1; - polys.aluChip_alu_u16_r0[i] = rows[i].aluChip_alu_u16_r0; - polys.aluChip_alu_u16_r1[i] = rows[i].aluChip_alu_u16_r1; - polys.aluChip_alu_u16_r2[i] = rows[i].aluChip_alu_u16_r2; - polys.aluChip_alu_u16_r3[i] = rows[i].aluChip_alu_u16_r3; - polys.aluChip_alu_u16_r4[i] = rows[i].aluChip_alu_u16_r4; - polys.aluChip_alu_u16_r5[i] = rows[i].aluChip_alu_u16_r5; - polys.aluChip_alu_u16_r6[i] = rows[i].aluChip_alu_u16_r6; - polys.aluChip_alu_u16_r7[i] = rows[i].aluChip_alu_u16_r7; - polys.aluChip_alu_u64_r0[i] = rows[i].aluChip_alu_u64_r0; - polys.aluChip_alu_cf[i] = rows[i].aluChip_alu_cf; - polys.aluChip_alu_inv_diff[i] = rows[i].aluChip_alu_inv_diff; - polys.avmMini_pc[i] = rows[i].avmMini_pc; - polys.avmMini_internal_return_ptr[i] = rows[i].avmMini_internal_return_ptr; - polys.avmMini_sel_internal_call[i] = rows[i].avmMini_sel_internal_call; - polys.avmMini_sel_internal_return[i] = rows[i].avmMini_sel_internal_return; - polys.avmMini_sel_jump[i] = rows[i].avmMini_sel_jump; - polys.avmMini_sel_halt[i] = rows[i].avmMini_sel_halt; - polys.avmMini_sel_op_add[i] = rows[i].avmMini_sel_op_add; - polys.avmMini_sel_op_sub[i] = rows[i].avmMini_sel_op_sub; - polys.avmMini_sel_op_mul[i] = rows[i].avmMini_sel_op_mul; - polys.avmMini_sel_op_div[i] = rows[i].avmMini_sel_op_div; - polys.avmMini_sel_op_not[i] = rows[i].avmMini_sel_op_not; - polys.avmMini_sel_op_eq[i] = rows[i].avmMini_sel_op_eq; - polys.avmMini_in_tag[i] = rows[i].avmMini_in_tag; - polys.avmMini_op_err[i] = rows[i].avmMini_op_err; - polys.avmMini_tag_err[i] = rows[i].avmMini_tag_err; - polys.avmMini_inv[i] = rows[i].avmMini_inv; - polys.avmMini_ia[i] = rows[i].avmMini_ia; - polys.avmMini_ib[i] = rows[i].avmMini_ib; - polys.avmMini_ic[i] = rows[i].avmMini_ic; - polys.avmMini_mem_op_a[i] = rows[i].avmMini_mem_op_a; - polys.avmMini_mem_op_b[i] = rows[i].avmMini_mem_op_b; - polys.avmMini_mem_op_c[i] = rows[i].avmMini_mem_op_c; - polys.avmMini_rwa[i] = rows[i].avmMini_rwa; - polys.avmMini_rwb[i] = rows[i].avmMini_rwb; - polys.avmMini_rwc[i] = rows[i].avmMini_rwc; - polys.avmMini_mem_idx_a[i] = rows[i].avmMini_mem_idx_a; - polys.avmMini_mem_idx_b[i] = rows[i].avmMini_mem_idx_b; - polys.avmMini_mem_idx_c[i] = rows[i].avmMini_mem_idx_c; - polys.avmMini_last[i] = rows[i].avmMini_last; - } - - polys.aluChip_alu_u16_r2_shift = Polynomial(polys.aluChip_alu_u16_r2.shifted()); - polys.aluChip_alu_u16_r0_shift = Polynomial(polys.aluChip_alu_u16_r0.shifted()); - polys.aluChip_alu_u16_r5_shift = Polynomial(polys.aluChip_alu_u16_r5.shifted()); - polys.aluChip_alu_u16_r6_shift = Polynomial(polys.aluChip_alu_u16_r6.shifted()); - polys.aluChip_alu_u16_r1_shift = Polynomial(polys.aluChip_alu_u16_r1.shifted()); - polys.aluChip_alu_u16_r7_shift = Polynomial(polys.aluChip_alu_u16_r7.shifted()); - polys.aluChip_alu_u16_r3_shift = Polynomial(polys.aluChip_alu_u16_r3.shifted()); - polys.aluChip_alu_u16_r4_shift = Polynomial(polys.aluChip_alu_u16_r4.shifted()); - polys.avmMini_pc_shift = Polynomial(polys.avmMini_pc.shifted()); - polys.avmMini_internal_return_ptr_shift = Polynomial(polys.avmMini_internal_return_ptr.shifted()); - polys.memTrace_m_tag_shift = Polynomial(polys.memTrace_m_tag.shifted()); - polys.memTrace_m_rw_shift = Polynomial(polys.memTrace_m_rw.shifted()); - polys.memTrace_m_addr_shift = Polynomial(polys.memTrace_m_addr.shifted()); - polys.memTrace_m_val_shift = Polynomial(polys.memTrace_m_val.shifted()); - - return polys; - } - - [[maybe_unused]] bool check_circuit() - { - - auto polys = compute_polynomials(); - const size_t num_rows = polys.get_polynomial_size(); - - const auto evaluate_relation = [&](const std::string& relation_name, - std::string (*debug_label)(int)) { - typename Relation::SumcheckArrayOfValuesOverSubrelations result; - for (auto& r : result) { - r = 0; - } - constexpr size_t NUM_SUBRELATIONS = result.size(); - - for (size_t i = 0; i < num_rows; ++i) { - Relation::accumulate(result, polys.get_row(i), {}, 1); - - bool x = true; - for (size_t j = 0; j < NUM_SUBRELATIONS; ++j) { - if (result[j] != 0) { - std::string row_name = debug_label(static_cast(j)); - throw_or_abort( - format("Relation ", relation_name, ", subrelation index ", row_name, " failed at row ", i)); - x = false; - } - } - if (!x) { - return false; - } - } - return true; - }; - - if (!evaluate_relation.template operator()>("alu_chip", - AvmMini_vm::get_relation_label_alu_chip)) { - return false; - } - if (!evaluate_relation.template operator()>("avm_mini", - AvmMini_vm::get_relation_label_avm_mini)) { - return false; - } - if (!evaluate_relation.template operator()>( - "mem_trace", AvmMini_vm::get_relation_label_mem_trace)) { - return false; - } - - return true; - } - - [[nodiscard]] size_t get_num_gates() const { return rows.size(); } - - [[nodiscard]] size_t get_circuit_subgroup_size() const - { - const size_t num_rows = get_num_gates(); - const auto num_rows_log2 = static_cast(numeric::get_msb64(num_rows)); - size_t num_rows_pow2 = 1UL << (num_rows_log2 + (1UL << num_rows_log2 == num_rows ? 0 : 1)); - return num_rows_pow2; - } -}; -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/alu_chip.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/alu_chip.hpp deleted file mode 100644 index ec24125e8f20..000000000000 --- a/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/alu_chip.hpp +++ /dev/null @@ -1,336 +0,0 @@ - -#pragma once -#include "../../relation_parameters.hpp" -#include "../../relation_types.hpp" -#include "./declare_views.hpp" - -namespace bb::AvmMini_vm { - -template struct Alu_chipRow { - FF aluChip_alu_ic{}; - FF aluChip_alu_u16_r2_shift{}; - FF aluChip_alu_op_not{}; - FF aluChip_alu_op_add{}; - FF aluChip_alu_u16_r0_shift{}; - FF aluChip_alu_u8_r1{}; - FF aluChip_alu_u16_r6{}; - FF aluChip_alu_cf{}; - FF aluChip_alu_u16_r7{}; - FF aluChip_alu_u16_r5{}; - FF aluChip_alu_inv_diff{}; - FF aluChip_alu_op_eq{}; - FF aluChip_alu_u16_r5_shift{}; - FF aluChip_alu_u16_r1{}; - FF aluChip_alu_u16_r3{}; - FF aluChip_alu_u8_tag{}; - FF aluChip_alu_u64_tag{}; - FF aluChip_alu_ib{}; - FF aluChip_alu_u16_r6_shift{}; - FF aluChip_alu_u16_r2{}; - FF aluChip_alu_u8_r0{}; - FF aluChip_alu_u16_r4{}; - FF aluChip_alu_u32_tag{}; - FF aluChip_alu_op_mul{}; - FF aluChip_alu_u16_r1_shift{}; - FF aluChip_alu_u16_tag{}; - FF aluChip_alu_op_sub{}; - FF aluChip_alu_u16_r7_shift{}; - FF aluChip_alu_u16_r3_shift{}; - FF aluChip_alu_ff_tag{}; - FF aluChip_alu_u64_r0{}; - FF aluChip_alu_u16_r0{}; - FF aluChip_alu_u128_tag{}; - FF aluChip_alu_ia{}; - FF aluChip_alu_u16_r4_shift{}; -}; - -inline std::string get_relation_label_alu_chip(int index) -{ - switch (index) { - case 16: - return "ALU_RES_IS_BOOL"; - - case 14: - return "ALU_FF_NOT_XOR"; - - case 6: - return "ALU_ADD_SUB_1"; - - case 10: - return "ALU_MUL_COMMON_2"; - - case 8: - return "ALU_MULTIPLICATION_FF"; - - case 7: - return "ALU_ADD_SUB_2"; - - case 9: - return "ALU_MUL_COMMON_1"; - - case 13: - return "ALU_MULTIPLICATION_OUT_U128"; - - case 15: - return "ALU_OP_NOT"; - - case 17: - return "ALU_OP_EQ"; - } - return std::to_string(index); -} - -template class alu_chipImpl { - public: - using FF = FF_; - - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS{ - 3, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 6, 6, 8, 3, 4, 4, 5, - }; - - template - void static accumulate(ContainerOverSubrelations& evals, - const AllEntities& new_term, - [[maybe_unused]] const RelationParameters&, - [[maybe_unused]] const FF& scaling_factor) - { - - // Contribution 0 - { - AvmMini_DECLARE_VIEWS(0); - - auto tmp = (aluChip_alu_ff_tag * (-aluChip_alu_ff_tag + FF(1))); - tmp *= scaling_factor; - std::get<0>(evals) += tmp; - } - // Contribution 1 - { - AvmMini_DECLARE_VIEWS(1); - - auto tmp = (aluChip_alu_u8_tag * (-aluChip_alu_u8_tag + FF(1))); - tmp *= scaling_factor; - std::get<1>(evals) += tmp; - } - // Contribution 2 - { - AvmMini_DECLARE_VIEWS(2); - - auto tmp = (aluChip_alu_u16_tag * (-aluChip_alu_u16_tag + FF(1))); - tmp *= scaling_factor; - std::get<2>(evals) += tmp; - } - // Contribution 3 - { - AvmMini_DECLARE_VIEWS(3); - - auto tmp = (aluChip_alu_u32_tag * (-aluChip_alu_u32_tag + FF(1))); - tmp *= scaling_factor; - std::get<3>(evals) += tmp; - } - // Contribution 4 - { - AvmMini_DECLARE_VIEWS(4); - - auto tmp = (aluChip_alu_u64_tag * (-aluChip_alu_u64_tag + FF(1))); - tmp *= scaling_factor; - std::get<4>(evals) += tmp; - } - // Contribution 5 - { - AvmMini_DECLARE_VIEWS(5); - - auto tmp = (aluChip_alu_u128_tag * (-aluChip_alu_u128_tag + FF(1))); - tmp *= scaling_factor; - std::get<5>(evals) += tmp; - } - // Contribution 6 - { - AvmMini_DECLARE_VIEWS(6); - - auto tmp = - (((aluChip_alu_op_add + aluChip_alu_op_sub) * - ((((((((((aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))) + (aluChip_alu_u16_r0 * FF(65536))) + - (aluChip_alu_u16_r1 * FF(4294967296UL))) + - (aluChip_alu_u16_r2 * FF(281474976710656UL))) + - (aluChip_alu_u16_r3 * FF(uint256_t{ 0, 1, 0, 0 }))) + - (aluChip_alu_u16_r4 * FF(uint256_t{ 0, 65536, 0, 0 }))) + - (aluChip_alu_u16_r5 * FF(uint256_t{ 0, 4294967296, 0, 0 }))) + - (aluChip_alu_u16_r6 * FF(uint256_t{ 0, 281474976710656, 0, 0 }))) - - aluChip_alu_ia) + - (aluChip_alu_ff_tag * aluChip_alu_ic))) + - ((aluChip_alu_op_add - aluChip_alu_op_sub) * - ((aluChip_alu_cf * FF(uint256_t{ 0, 0, 1, 0 })) - aluChip_alu_ib))); - tmp *= scaling_factor; - std::get<6>(evals) += tmp; - } - // Contribution 7 - { - AvmMini_DECLARE_VIEWS(7); - - auto tmp = - (((aluChip_alu_op_add + aluChip_alu_op_sub) * - (((((((aluChip_alu_u8_tag * aluChip_alu_u8_r0) + - (aluChip_alu_u16_tag * (aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))))) + - (aluChip_alu_u32_tag * - ((aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))) + (aluChip_alu_u16_r0 * FF(65536))))) + - (aluChip_alu_u64_tag * - ((((aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))) + (aluChip_alu_u16_r0 * FF(65536))) + - (aluChip_alu_u16_r1 * FF(4294967296UL))) + - (aluChip_alu_u16_r2 * FF(281474976710656UL))))) + - (aluChip_alu_u128_tag * - ((((((((aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))) + (aluChip_alu_u16_r0 * FF(65536))) + - (aluChip_alu_u16_r1 * FF(4294967296UL))) + - (aluChip_alu_u16_r2 * FF(281474976710656UL))) + - (aluChip_alu_u16_r3 * FF(uint256_t{ 0, 1, 0, 0 }))) + - (aluChip_alu_u16_r4 * FF(uint256_t{ 0, 65536, 0, 0 }))) + - (aluChip_alu_u16_r5 * FF(uint256_t{ 0, 4294967296, 0, 0 }))) + - (aluChip_alu_u16_r6 * FF(uint256_t{ 0, 281474976710656, 0, 0 }))))) + - (aluChip_alu_ff_tag * aluChip_alu_ia)) - - aluChip_alu_ic)) + - ((aluChip_alu_ff_tag * (aluChip_alu_op_add - aluChip_alu_op_sub)) * aluChip_alu_ib)); - tmp *= scaling_factor; - std::get<7>(evals) += tmp; - } - // Contribution 8 - { - AvmMini_DECLARE_VIEWS(8); - - auto tmp = - ((aluChip_alu_ff_tag * aluChip_alu_op_mul) * ((aluChip_alu_ia * aluChip_alu_ib) - aluChip_alu_ic)); - tmp *= scaling_factor; - std::get<8>(evals) += tmp; - } - // Contribution 9 - { - AvmMini_DECLARE_VIEWS(9); - - auto tmp = - ((((-aluChip_alu_ff_tag + FF(1)) - aluChip_alu_u128_tag) * aluChip_alu_op_mul) * - (((((((((aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))) + (aluChip_alu_u16_r0 * FF(65536))) + - (aluChip_alu_u16_r1 * FF(4294967296UL))) + - (aluChip_alu_u16_r2 * FF(281474976710656UL))) + - (aluChip_alu_u16_r3 * FF(uint256_t{ 0, 1, 0, 0 }))) + - (aluChip_alu_u16_r4 * FF(uint256_t{ 0, 65536, 0, 0 }))) + - (aluChip_alu_u16_r5 * FF(uint256_t{ 0, 4294967296, 0, 0 }))) + - (aluChip_alu_u16_r6 * FF(uint256_t{ 0, 281474976710656, 0, 0 }))) - - (aluChip_alu_ia * aluChip_alu_ib))); - tmp *= scaling_factor; - std::get<9>(evals) += tmp; - } - // Contribution 10 - { - AvmMini_DECLARE_VIEWS(10); - - auto tmp = (aluChip_alu_op_mul * - (((((aluChip_alu_u8_tag * aluChip_alu_u8_r0) + - (aluChip_alu_u16_tag * (aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))))) + - (aluChip_alu_u32_tag * - ((aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))) + (aluChip_alu_u16_r0 * FF(65536))))) + - (aluChip_alu_u64_tag * - ((((aluChip_alu_u8_r0 + (aluChip_alu_u8_r1 * FF(256))) + (aluChip_alu_u16_r0 * FF(65536))) + - (aluChip_alu_u16_r1 * FF(4294967296UL))) + - (aluChip_alu_u16_r2 * FF(281474976710656UL))))) - - (((-aluChip_alu_ff_tag + FF(1)) - aluChip_alu_u128_tag) * aluChip_alu_ic))); - tmp *= scaling_factor; - std::get<10>(evals) += tmp; - } - // Contribution 11 - { - AvmMini_DECLARE_VIEWS(11); - - auto tmp = ((aluChip_alu_u128_tag * aluChip_alu_op_mul) * - (((((aluChip_alu_u16_r0 + (aluChip_alu_u16_r1 * FF(65536))) + - (aluChip_alu_u16_r2 * FF(4294967296UL))) + - (aluChip_alu_u16_r3 * FF(281474976710656UL))) + - ((((aluChip_alu_u16_r4 + (aluChip_alu_u16_r5 * FF(65536))) + - (aluChip_alu_u16_r6 * FF(4294967296UL))) + - (aluChip_alu_u16_r7 * FF(281474976710656UL))) * - FF(uint256_t{ 0, 1, 0, 0 }))) - - aluChip_alu_ia)); - tmp *= scaling_factor; - std::get<11>(evals) += tmp; - } - // Contribution 12 - { - AvmMini_DECLARE_VIEWS(12); - - auto tmp = ((aluChip_alu_u128_tag * aluChip_alu_op_mul) * - (((((aluChip_alu_u16_r0_shift + (aluChip_alu_u16_r1_shift * FF(65536))) + - (aluChip_alu_u16_r2_shift * FF(4294967296UL))) + - (aluChip_alu_u16_r3_shift * FF(281474976710656UL))) + - ((((aluChip_alu_u16_r4_shift + (aluChip_alu_u16_r5_shift * FF(65536))) + - (aluChip_alu_u16_r6_shift * FF(4294967296UL))) + - (aluChip_alu_u16_r7_shift * FF(281474976710656UL))) * - FF(uint256_t{ 0, 1, 0, 0 }))) - - aluChip_alu_ib)); - tmp *= scaling_factor; - std::get<12>(evals) += tmp; - } - // Contribution 13 - { - AvmMini_DECLARE_VIEWS(13); - - auto tmp = ((aluChip_alu_u128_tag * aluChip_alu_op_mul) * - ((((aluChip_alu_ia * (((aluChip_alu_u16_r0_shift + (aluChip_alu_u16_r1_shift * FF(65536))) + - (aluChip_alu_u16_r2_shift * FF(4294967296UL))) + - (aluChip_alu_u16_r3_shift * FF(281474976710656UL)))) + - (((((aluChip_alu_u16_r0 + (aluChip_alu_u16_r1 * FF(65536))) + - (aluChip_alu_u16_r2 * FF(4294967296UL))) + - (aluChip_alu_u16_r3 * FF(281474976710656UL))) * - (((aluChip_alu_u16_r4_shift + (aluChip_alu_u16_r5_shift * FF(65536))) + - (aluChip_alu_u16_r6_shift * FF(4294967296UL))) + - (aluChip_alu_u16_r7_shift * FF(281474976710656UL)))) * - FF(uint256_t{ 0, 1, 0, 0 }))) - - (((aluChip_alu_cf * FF(uint256_t{ 0, 1, 0, 0 })) + aluChip_alu_u64_r0) * - FF(uint256_t{ 0, 0, 1, 0 }))) - - aluChip_alu_ic)); - tmp *= scaling_factor; - std::get<13>(evals) += tmp; - } - // Contribution 14 - { - AvmMini_DECLARE_VIEWS(14); - - auto tmp = (aluChip_alu_op_not * aluChip_alu_ff_tag); - tmp *= scaling_factor; - std::get<14>(evals) += tmp; - } - // Contribution 15 - { - AvmMini_DECLARE_VIEWS(15); - - auto tmp = (aluChip_alu_op_not * ((aluChip_alu_ia + aluChip_alu_ic) - - ((((((aluChip_alu_u8_tag * FF(256)) + (aluChip_alu_u16_tag * FF(65536))) + - (aluChip_alu_u32_tag * FF(4294967296UL))) + - (aluChip_alu_u64_tag * FF(uint256_t{ 0, 1, 0, 0 }))) + - (aluChip_alu_u128_tag * FF(uint256_t{ 0, 0, 1, 0 }))) - - FF(1)))); - tmp *= scaling_factor; - std::get<15>(evals) += tmp; - } - // Contribution 16 - { - AvmMini_DECLARE_VIEWS(16); - - auto tmp = (aluChip_alu_op_eq * (aluChip_alu_ic * (-aluChip_alu_ic + FF(1)))); - tmp *= scaling_factor; - std::get<16>(evals) += tmp; - } - // Contribution 17 - { - AvmMini_DECLARE_VIEWS(17); - - auto tmp = - (aluChip_alu_op_eq * ((((aluChip_alu_ia - aluChip_alu_ib) * - ((aluChip_alu_ic * (-aluChip_alu_inv_diff + FF(1))) + aluChip_alu_inv_diff)) - - FF(1)) + - aluChip_alu_ic)); - tmp *= scaling_factor; - std::get<17>(evals) += tmp; - } - } -}; - -template using alu_chip = Relation>; - -} // namespace bb::AvmMini_vm \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/avm_mini.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/avm_mini.hpp deleted file mode 100644 index 82b7ef3fa544..000000000000 --- a/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/avm_mini.hpp +++ /dev/null @@ -1,413 +0,0 @@ - -#pragma once -#include "../../relation_parameters.hpp" -#include "../../relation_types.hpp" -#include "./declare_views.hpp" - -namespace bb::AvmMini_vm { - -template struct Avm_miniRow { - FF avmMini_pc{}; - FF avmMini_mem_op_a{}; - FF avmMini_mem_idx_b{}; - FF avmMini_sel_internal_call{}; - FF avmMini_sel_internal_return{}; - FF avmMini_rwc{}; - FF avmMini_mem_idx_a{}; - FF avmMini_sel_op_div{}; - FF avmMini_sel_op_sub{}; - FF avmMini_tag_err{}; - FF avmMini_op_err{}; - FF avmMini_sel_halt{}; - FF avmMini_rwb{}; - FF avmMini_inv{}; - FF avmMini_pc_shift{}; - FF avmMini_sel_op_add{}; - FF avmMini_first{}; - FF avmMini_sel_jump{}; - FF avmMini_ic{}; - FF avmMini_internal_return_ptr_shift{}; - FF avmMini_ia{}; - FF avmMini_rwa{}; - FF avmMini_mem_op_b{}; - FF avmMini_sel_op_not{}; - FF avmMini_sel_op_eq{}; - FF avmMini_internal_return_ptr{}; - FF avmMini_ib{}; - FF avmMini_mem_op_c{}; - FF avmMini_sel_op_mul{}; -}; - -inline std::string get_relation_label_avm_mini(int index) -{ - switch (index) { - case 37: - return "PC_INCREMENT"; - - case 21: - return "SUBOP_DIVISION_FF"; - - case 22: - return "SUBOP_DIVISION_ZERO_ERR1"; - - case 26: - return "RETURN_POINTER_INCREMENT"; - - case 32: - return "RETURN_POINTER_DECREMENT"; - - case 23: - return "SUBOP_DIVISION_ZERO_ERR2"; - - case 24: - return "SUBOP_ERROR_RELEVANT_OP"; - - case 38: - return "INTERNAL_RETURN_POINTER_CONSISTENCY"; - } - return std::to_string(index); -} - -template class avm_miniImpl { - public: - using FF = FF_; - - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS{ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, - }; - - template - void static accumulate(ContainerOverSubrelations& evals, - const AllEntities& new_term, - [[maybe_unused]] const RelationParameters&, - [[maybe_unused]] const FF& scaling_factor) - { - - // Contribution 0 - { - AvmMini_DECLARE_VIEWS(0); - - auto tmp = (avmMini_sel_op_add * (-avmMini_sel_op_add + FF(1))); - tmp *= scaling_factor; - std::get<0>(evals) += tmp; - } - // Contribution 1 - { - AvmMini_DECLARE_VIEWS(1); - - auto tmp = (avmMini_sel_op_sub * (-avmMini_sel_op_sub + FF(1))); - tmp *= scaling_factor; - std::get<1>(evals) += tmp; - } - // Contribution 2 - { - AvmMini_DECLARE_VIEWS(2); - - auto tmp = (avmMini_sel_op_mul * (-avmMini_sel_op_mul + FF(1))); - tmp *= scaling_factor; - std::get<2>(evals) += tmp; - } - // Contribution 3 - { - AvmMini_DECLARE_VIEWS(3); - - auto tmp = (avmMini_sel_op_div * (-avmMini_sel_op_div + FF(1))); - tmp *= scaling_factor; - std::get<3>(evals) += tmp; - } - // Contribution 4 - { - AvmMini_DECLARE_VIEWS(4); - - auto tmp = (avmMini_sel_op_not * (-avmMini_sel_op_not + FF(1))); - tmp *= scaling_factor; - std::get<4>(evals) += tmp; - } - // Contribution 5 - { - AvmMini_DECLARE_VIEWS(5); - - auto tmp = (avmMini_sel_op_eq * (-avmMini_sel_op_eq + FF(1))); - tmp *= scaling_factor; - std::get<5>(evals) += tmp; - } - // Contribution 6 - { - AvmMini_DECLARE_VIEWS(6); - - auto tmp = (avmMini_sel_internal_call * (-avmMini_sel_internal_call + FF(1))); - tmp *= scaling_factor; - std::get<6>(evals) += tmp; - } - // Contribution 7 - { - AvmMini_DECLARE_VIEWS(7); - - auto tmp = (avmMini_sel_internal_return * (-avmMini_sel_internal_return + FF(1))); - tmp *= scaling_factor; - std::get<7>(evals) += tmp; - } - // Contribution 8 - { - AvmMini_DECLARE_VIEWS(8); - - auto tmp = (avmMini_sel_jump * (-avmMini_sel_jump + FF(1))); - tmp *= scaling_factor; - std::get<8>(evals) += tmp; - } - // Contribution 9 - { - AvmMini_DECLARE_VIEWS(9); - - auto tmp = (avmMini_sel_halt * (-avmMini_sel_halt + FF(1))); - tmp *= scaling_factor; - std::get<9>(evals) += tmp; - } - // Contribution 10 - { - AvmMini_DECLARE_VIEWS(10); - - auto tmp = (avmMini_op_err * (-avmMini_op_err + FF(1))); - tmp *= scaling_factor; - std::get<10>(evals) += tmp; - } - // Contribution 11 - { - AvmMini_DECLARE_VIEWS(11); - - auto tmp = (avmMini_tag_err * (-avmMini_tag_err + FF(1))); - tmp *= scaling_factor; - std::get<11>(evals) += tmp; - } - // Contribution 12 - { - AvmMini_DECLARE_VIEWS(12); - - auto tmp = (avmMini_mem_op_a * (-avmMini_mem_op_a + FF(1))); - tmp *= scaling_factor; - std::get<12>(evals) += tmp; - } - // Contribution 13 - { - AvmMini_DECLARE_VIEWS(13); - - auto tmp = (avmMini_mem_op_b * (-avmMini_mem_op_b + FF(1))); - tmp *= scaling_factor; - std::get<13>(evals) += tmp; - } - // Contribution 14 - { - AvmMini_DECLARE_VIEWS(14); - - auto tmp = (avmMini_mem_op_c * (-avmMini_mem_op_c + FF(1))); - tmp *= scaling_factor; - std::get<14>(evals) += tmp; - } - // Contribution 15 - { - AvmMini_DECLARE_VIEWS(15); - - auto tmp = (avmMini_rwa * (-avmMini_rwa + FF(1))); - tmp *= scaling_factor; - std::get<15>(evals) += tmp; - } - // Contribution 16 - { - AvmMini_DECLARE_VIEWS(16); - - auto tmp = (avmMini_rwb * (-avmMini_rwb + FF(1))); - tmp *= scaling_factor; - std::get<16>(evals) += tmp; - } - // Contribution 17 - { - AvmMini_DECLARE_VIEWS(17); - - auto tmp = (avmMini_rwc * (-avmMini_rwc + FF(1))); - tmp *= scaling_factor; - std::get<17>(evals) += tmp; - } - // Contribution 18 - { - AvmMini_DECLARE_VIEWS(18); - - auto tmp = (avmMini_tag_err * avmMini_ia); - tmp *= scaling_factor; - std::get<18>(evals) += tmp; - } - // Contribution 19 - { - AvmMini_DECLARE_VIEWS(19); - - auto tmp = (avmMini_tag_err * avmMini_ib); - tmp *= scaling_factor; - std::get<19>(evals) += tmp; - } - // Contribution 20 - { - AvmMini_DECLARE_VIEWS(20); - - auto tmp = (avmMini_tag_err * avmMini_ic); - tmp *= scaling_factor; - std::get<20>(evals) += tmp; - } - // Contribution 21 - { - AvmMini_DECLARE_VIEWS(21); - - auto tmp = ((avmMini_sel_op_div * (-avmMini_op_err + FF(1))) * ((avmMini_ic * avmMini_ib) - avmMini_ia)); - tmp *= scaling_factor; - std::get<21>(evals) += tmp; - } - // Contribution 22 - { - AvmMini_DECLARE_VIEWS(22); - - auto tmp = (avmMini_sel_op_div * (((avmMini_ib * avmMini_inv) - FF(1)) + avmMini_op_err)); - tmp *= scaling_factor; - std::get<22>(evals) += tmp; - } - // Contribution 23 - { - AvmMini_DECLARE_VIEWS(23); - - auto tmp = ((avmMini_sel_op_div * avmMini_op_err) * (-avmMini_inv + FF(1))); - tmp *= scaling_factor; - std::get<23>(evals) += tmp; - } - // Contribution 24 - { - AvmMini_DECLARE_VIEWS(24); - - auto tmp = (avmMini_op_err * (avmMini_sel_op_div - FF(1))); - tmp *= scaling_factor; - std::get<24>(evals) += tmp; - } - // Contribution 25 - { - AvmMini_DECLARE_VIEWS(25); - - auto tmp = (avmMini_sel_jump * (avmMini_pc_shift - avmMini_ia)); - tmp *= scaling_factor; - std::get<25>(evals) += tmp; - } - // Contribution 26 - { - AvmMini_DECLARE_VIEWS(26); - - auto tmp = (avmMini_sel_internal_call * - (avmMini_internal_return_ptr_shift - (avmMini_internal_return_ptr + FF(1)))); - tmp *= scaling_factor; - std::get<26>(evals) += tmp; - } - // Contribution 27 - { - AvmMini_DECLARE_VIEWS(27); - - auto tmp = (avmMini_sel_internal_call * (avmMini_internal_return_ptr - avmMini_mem_idx_b)); - tmp *= scaling_factor; - std::get<27>(evals) += tmp; - } - // Contribution 28 - { - AvmMini_DECLARE_VIEWS(28); - - auto tmp = (avmMini_sel_internal_call * (avmMini_pc_shift - avmMini_ia)); - tmp *= scaling_factor; - std::get<28>(evals) += tmp; - } - // Contribution 29 - { - AvmMini_DECLARE_VIEWS(29); - - auto tmp = (avmMini_sel_internal_call * ((avmMini_pc + FF(1)) - avmMini_ib)); - tmp *= scaling_factor; - std::get<29>(evals) += tmp; - } - // Contribution 30 - { - AvmMini_DECLARE_VIEWS(30); - - auto tmp = (avmMini_sel_internal_call * (avmMini_rwb - FF(1))); - tmp *= scaling_factor; - std::get<30>(evals) += tmp; - } - // Contribution 31 - { - AvmMini_DECLARE_VIEWS(31); - - auto tmp = (avmMini_sel_internal_call * (avmMini_mem_op_b - FF(1))); - tmp *= scaling_factor; - std::get<31>(evals) += tmp; - } - // Contribution 32 - { - AvmMini_DECLARE_VIEWS(32); - - auto tmp = (avmMini_sel_internal_return * - (avmMini_internal_return_ptr_shift - (avmMini_internal_return_ptr - FF(1)))); - tmp *= scaling_factor; - std::get<32>(evals) += tmp; - } - // Contribution 33 - { - AvmMini_DECLARE_VIEWS(33); - - auto tmp = (avmMini_sel_internal_return * ((avmMini_internal_return_ptr - FF(1)) - avmMini_mem_idx_a)); - tmp *= scaling_factor; - std::get<33>(evals) += tmp; - } - // Contribution 34 - { - AvmMini_DECLARE_VIEWS(34); - - auto tmp = (avmMini_sel_internal_return * (avmMini_pc_shift - avmMini_ia)); - tmp *= scaling_factor; - std::get<34>(evals) += tmp; - } - // Contribution 35 - { - AvmMini_DECLARE_VIEWS(35); - - auto tmp = (avmMini_sel_internal_return * avmMini_rwa); - tmp *= scaling_factor; - std::get<35>(evals) += tmp; - } - // Contribution 36 - { - AvmMini_DECLARE_VIEWS(36); - - auto tmp = (avmMini_sel_internal_return * (avmMini_mem_op_a - FF(1))); - tmp *= scaling_factor; - std::get<36>(evals) += tmp; - } - // Contribution 37 - { - AvmMini_DECLARE_VIEWS(37); - - auto tmp = ((((-avmMini_first + FF(1)) * (-avmMini_sel_halt + FF(1))) * - (((((avmMini_sel_op_add + avmMini_sel_op_sub) + avmMini_sel_op_div) + avmMini_sel_op_mul) + - avmMini_sel_op_not) + - avmMini_sel_op_eq)) * - (avmMini_pc_shift - (avmMini_pc + FF(1)))); - tmp *= scaling_factor; - std::get<37>(evals) += tmp; - } - // Contribution 38 - { - AvmMini_DECLARE_VIEWS(38); - - auto tmp = - ((-(((avmMini_first + avmMini_sel_internal_call) + avmMini_sel_internal_return) + avmMini_sel_halt) + - FF(1)) * - (avmMini_internal_return_ptr_shift - avmMini_internal_return_ptr)); - tmp *= scaling_factor; - std::get<38>(evals) += tmp; - } - } -}; - -template using avm_mini = Relation>; - -} // namespace bb::AvmMini_vm \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/declare_views.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/declare_views.hpp deleted file mode 100644 index e2cd5edde8a0..000000000000 --- a/barretenberg/cpp/src/barretenberg/relations/generated/AvmMini/declare_views.hpp +++ /dev/null @@ -1,89 +0,0 @@ - -#define AvmMini_DECLARE_VIEWS(index) \ - using Accumulator = typename std::tuple_element::type; \ - using View = typename Accumulator::View; \ - [[maybe_unused]] auto avmMini_clk = View(new_term.avmMini_clk); \ - [[maybe_unused]] auto avmMini_first = View(new_term.avmMini_first); \ - [[maybe_unused]] auto memTrace_m_clk = View(new_term.memTrace_m_clk); \ - [[maybe_unused]] auto memTrace_m_sub_clk = View(new_term.memTrace_m_sub_clk); \ - [[maybe_unused]] auto memTrace_m_addr = View(new_term.memTrace_m_addr); \ - [[maybe_unused]] auto memTrace_m_tag = View(new_term.memTrace_m_tag); \ - [[maybe_unused]] auto memTrace_m_val = View(new_term.memTrace_m_val); \ - [[maybe_unused]] auto memTrace_m_lastAccess = View(new_term.memTrace_m_lastAccess); \ - [[maybe_unused]] auto memTrace_m_last = View(new_term.memTrace_m_last); \ - [[maybe_unused]] auto memTrace_m_rw = View(new_term.memTrace_m_rw); \ - [[maybe_unused]] auto memTrace_m_in_tag = View(new_term.memTrace_m_in_tag); \ - [[maybe_unused]] auto memTrace_m_tag_err = View(new_term.memTrace_m_tag_err); \ - [[maybe_unused]] auto memTrace_m_one_min_inv = View(new_term.memTrace_m_one_min_inv); \ - [[maybe_unused]] auto aluChip_alu_clk = View(new_term.aluChip_alu_clk); \ - [[maybe_unused]] auto aluChip_alu_ia = View(new_term.aluChip_alu_ia); \ - [[maybe_unused]] auto aluChip_alu_ib = View(new_term.aluChip_alu_ib); \ - [[maybe_unused]] auto aluChip_alu_ic = View(new_term.aluChip_alu_ic); \ - [[maybe_unused]] auto aluChip_alu_op_add = View(new_term.aluChip_alu_op_add); \ - [[maybe_unused]] auto aluChip_alu_op_sub = View(new_term.aluChip_alu_op_sub); \ - [[maybe_unused]] auto aluChip_alu_op_mul = View(new_term.aluChip_alu_op_mul); \ - [[maybe_unused]] auto aluChip_alu_op_div = View(new_term.aluChip_alu_op_div); \ - [[maybe_unused]] auto aluChip_alu_op_not = View(new_term.aluChip_alu_op_not); \ - [[maybe_unused]] auto aluChip_alu_op_eq = View(new_term.aluChip_alu_op_eq); \ - [[maybe_unused]] auto aluChip_alu_ff_tag = View(new_term.aluChip_alu_ff_tag); \ - [[maybe_unused]] auto aluChip_alu_u8_tag = View(new_term.aluChip_alu_u8_tag); \ - [[maybe_unused]] auto aluChip_alu_u16_tag = View(new_term.aluChip_alu_u16_tag); \ - [[maybe_unused]] auto aluChip_alu_u32_tag = View(new_term.aluChip_alu_u32_tag); \ - [[maybe_unused]] auto aluChip_alu_u64_tag = View(new_term.aluChip_alu_u64_tag); \ - [[maybe_unused]] auto aluChip_alu_u128_tag = View(new_term.aluChip_alu_u128_tag); \ - [[maybe_unused]] auto aluChip_alu_u8_r0 = View(new_term.aluChip_alu_u8_r0); \ - [[maybe_unused]] auto aluChip_alu_u8_r1 = View(new_term.aluChip_alu_u8_r1); \ - [[maybe_unused]] auto aluChip_alu_u16_r0 = View(new_term.aluChip_alu_u16_r0); \ - [[maybe_unused]] auto aluChip_alu_u16_r1 = View(new_term.aluChip_alu_u16_r1); \ - [[maybe_unused]] auto aluChip_alu_u16_r2 = View(new_term.aluChip_alu_u16_r2); \ - [[maybe_unused]] auto aluChip_alu_u16_r3 = View(new_term.aluChip_alu_u16_r3); \ - [[maybe_unused]] auto aluChip_alu_u16_r4 = View(new_term.aluChip_alu_u16_r4); \ - [[maybe_unused]] auto aluChip_alu_u16_r5 = View(new_term.aluChip_alu_u16_r5); \ - [[maybe_unused]] auto aluChip_alu_u16_r6 = View(new_term.aluChip_alu_u16_r6); \ - [[maybe_unused]] auto aluChip_alu_u16_r7 = View(new_term.aluChip_alu_u16_r7); \ - [[maybe_unused]] auto aluChip_alu_u64_r0 = View(new_term.aluChip_alu_u64_r0); \ - [[maybe_unused]] auto aluChip_alu_cf = View(new_term.aluChip_alu_cf); \ - [[maybe_unused]] auto aluChip_alu_inv_diff = View(new_term.aluChip_alu_inv_diff); \ - [[maybe_unused]] auto avmMini_pc = View(new_term.avmMini_pc); \ - [[maybe_unused]] auto avmMini_internal_return_ptr = View(new_term.avmMini_internal_return_ptr); \ - [[maybe_unused]] auto avmMini_sel_internal_call = View(new_term.avmMini_sel_internal_call); \ - [[maybe_unused]] auto avmMini_sel_internal_return = View(new_term.avmMini_sel_internal_return); \ - [[maybe_unused]] auto avmMini_sel_jump = View(new_term.avmMini_sel_jump); \ - [[maybe_unused]] auto avmMini_sel_halt = View(new_term.avmMini_sel_halt); \ - [[maybe_unused]] auto avmMini_sel_op_add = View(new_term.avmMini_sel_op_add); \ - [[maybe_unused]] auto avmMini_sel_op_sub = View(new_term.avmMini_sel_op_sub); \ - [[maybe_unused]] auto avmMini_sel_op_mul = View(new_term.avmMini_sel_op_mul); \ - [[maybe_unused]] auto avmMini_sel_op_div = View(new_term.avmMini_sel_op_div); \ - [[maybe_unused]] auto avmMini_sel_op_not = View(new_term.avmMini_sel_op_not); \ - [[maybe_unused]] auto avmMini_sel_op_eq = View(new_term.avmMini_sel_op_eq); \ - [[maybe_unused]] auto avmMini_in_tag = View(new_term.avmMini_in_tag); \ - [[maybe_unused]] auto avmMini_op_err = View(new_term.avmMini_op_err); \ - [[maybe_unused]] auto avmMini_tag_err = View(new_term.avmMini_tag_err); \ - [[maybe_unused]] auto avmMini_inv = View(new_term.avmMini_inv); \ - [[maybe_unused]] auto avmMini_ia = View(new_term.avmMini_ia); \ - [[maybe_unused]] auto avmMini_ib = View(new_term.avmMini_ib); \ - [[maybe_unused]] auto avmMini_ic = View(new_term.avmMini_ic); \ - [[maybe_unused]] auto avmMini_mem_op_a = View(new_term.avmMini_mem_op_a); \ - [[maybe_unused]] auto avmMini_mem_op_b = View(new_term.avmMini_mem_op_b); \ - [[maybe_unused]] auto avmMini_mem_op_c = View(new_term.avmMini_mem_op_c); \ - [[maybe_unused]] auto avmMini_rwa = View(new_term.avmMini_rwa); \ - [[maybe_unused]] auto avmMini_rwb = View(new_term.avmMini_rwb); \ - [[maybe_unused]] auto avmMini_rwc = View(new_term.avmMini_rwc); \ - [[maybe_unused]] auto avmMini_mem_idx_a = View(new_term.avmMini_mem_idx_a); \ - [[maybe_unused]] auto avmMini_mem_idx_b = View(new_term.avmMini_mem_idx_b); \ - [[maybe_unused]] auto avmMini_mem_idx_c = View(new_term.avmMini_mem_idx_c); \ - [[maybe_unused]] auto avmMini_last = View(new_term.avmMini_last); \ - [[maybe_unused]] auto aluChip_alu_u16_r2_shift = View(new_term.aluChip_alu_u16_r2_shift); \ - [[maybe_unused]] auto aluChip_alu_u16_r0_shift = View(new_term.aluChip_alu_u16_r0_shift); \ - [[maybe_unused]] auto aluChip_alu_u16_r5_shift = View(new_term.aluChip_alu_u16_r5_shift); \ - [[maybe_unused]] auto aluChip_alu_u16_r6_shift = View(new_term.aluChip_alu_u16_r6_shift); \ - [[maybe_unused]] auto aluChip_alu_u16_r1_shift = View(new_term.aluChip_alu_u16_r1_shift); \ - [[maybe_unused]] auto aluChip_alu_u16_r7_shift = View(new_term.aluChip_alu_u16_r7_shift); \ - [[maybe_unused]] auto aluChip_alu_u16_r3_shift = View(new_term.aluChip_alu_u16_r3_shift); \ - [[maybe_unused]] auto aluChip_alu_u16_r4_shift = View(new_term.aluChip_alu_u16_r4_shift); \ - [[maybe_unused]] auto avmMini_pc_shift = View(new_term.avmMini_pc_shift); \ - [[maybe_unused]] auto avmMini_internal_return_ptr_shift = View(new_term.avmMini_internal_return_ptr_shift); \ - [[maybe_unused]] auto memTrace_m_tag_shift = View(new_term.memTrace_m_tag_shift); \ - [[maybe_unused]] auto memTrace_m_rw_shift = View(new_term.memTrace_m_rw_shift); \ - [[maybe_unused]] auto memTrace_m_addr_shift = View(new_term.memTrace_m_addr_shift); \ - [[maybe_unused]] auto memTrace_m_val_shift = View(new_term.memTrace_m_val_shift);