From aee86b10ba748e55136a153c253059cb6df889b9 Mon Sep 17 00:00:00 2001 From: fcarreiro Date: Wed, 5 Feb 2025 20:20:58 +0000 Subject: [PATCH] chore(avm): add names to lookup settings --- .../avm/generated/relations/lookups_alu.hpp | 8 ++- .../generated/relations/lookups_binary.hpp | 8 ++- .../avm/generated/relations/lookups_gas.hpp | 20 +++++-- .../avm/generated/relations/lookups_main.hpp | 8 ++- .../avm/generated/relations/lookups_mem.hpp | 12 +++-- .../generated/relations/lookups_mem_slice.hpp | 8 ++- .../relations/lookups_range_check.hpp | 40 ++++++++++---- .../vm/avm/generated/relations/perms_alu.hpp | 8 ++- .../vm/avm/generated/relations/perms_cmp.hpp | 12 +++-- .../vm/avm/generated/relations/perms_main.hpp | 52 ++++++++++++++----- .../generated/relations/perms_mem_slice.hpp | 4 +- .../generated/relations/perms_merkle_tree.hpp | 4 +- .../generated/relations/perms_poseidon2.hpp | 32 +++++++++--- .../relations/perms_poseidon2_full.hpp | 4 +- .../relations/lookups_bc_decomposition.hpp | 4 +- .../generated/relations/lookups_bitwise.hpp | 8 ++- .../generated/relations/lookups_execution.hpp | 8 ++- .../relations/lookups_range_check.hpp | 40 ++++++++++---- .../generated/relations/lookups_sha256.hpp | 4 +- .../generated/relations/perms_execution.hpp | 4 +- .../vm2/tracegen/lib/lookup_builder.hpp | 5 +- .../bb-pil-backend/templates/lookup.hpp.hbs | 4 +- .../templates/permutation.hpp.hbs | 4 +- 23 files changed, 224 insertions(+), 77 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_alu.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_alu.hpp index 3ab5f494003..c656066f1fa 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_alu.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_alu.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class lookup_pow_2_0_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_POW_2_0"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -72,7 +74,7 @@ class lookup_pow_2_0_lookup_settings { template class lookup_pow_2_0_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_POW_2_0"; + static constexpr std::string_view NAME = lookup_pow_2_0_lookup_settings::NAME; }; template using lookup_pow_2_0 = GenericLookup; @@ -80,6 +82,8 @@ template using lookup_pow_2_0 = GenericLookup class lookup_pow_2_1_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_POW_2_1"; + static constexpr std::string_view NAME = lookup_pow_2_1_lookup_settings::NAME; }; template using lookup_pow_2_1 = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_binary.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_binary.hpp index 29a927783bd..5588c1f1c29 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_binary.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_binary.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class lookup_byte_lengths_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_BYTE_LENGTHS"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -73,7 +75,7 @@ class lookup_byte_lengths_lookup_settings { template class lookup_byte_lengths_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_BYTE_LENGTHS"; + static constexpr std::string_view NAME = lookup_byte_lengths_lookup_settings::NAME; }; template using lookup_byte_lengths = GenericLookup; @@ -81,6 +83,8 @@ template using lookup_byte_lengths = GenericLookup class lookup_byte_operations_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_BYTE_OPERATIONS"; + static constexpr std::string_view NAME = lookup_byte_operations_lookup_settings::NAME; }; template using lookup_byte_operations = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_gas.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_gas.hpp index 5a47f4a6a12..e6a0e3f6459 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_gas.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_gas.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class lookup_opcode_gas_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_OPCODE_GAS"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -85,7 +87,7 @@ class lookup_opcode_gas_lookup_settings { template class lookup_opcode_gas_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_OPCODE_GAS"; + static constexpr std::string_view NAME = lookup_opcode_gas_lookup_settings::NAME; }; template using lookup_opcode_gas = GenericLookup; @@ -93,6 +95,8 @@ template using lookup_opcode_gas = GenericLookup class lookup_l2_gas_rng_chk_0_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_L2_GAS_RNG_CHK_0"; + static constexpr std::string_view NAME = lookup_l2_gas_rng_chk_0_lookup_settings::NAME; }; template using lookup_l2_gas_rng_chk_0 = GenericLookup; @@ -156,6 +160,8 @@ template using lookup_l2_gas_rng_chk_0 = GenericLookup class lookup_l2_gas_rng_chk_1_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_L2_GAS_RNG_CHK_1"; + static constexpr std::string_view NAME = lookup_l2_gas_rng_chk_1_lookup_settings::NAME; }; template using lookup_l2_gas_rng_chk_1 = GenericLookup; @@ -219,6 +225,8 @@ template using lookup_l2_gas_rng_chk_1 = GenericLookup class lookup_da_gas_rng_chk_0_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_DA_GAS_RNG_CHK_0"; + static constexpr std::string_view NAME = lookup_da_gas_rng_chk_0_lookup_settings::NAME; }; template using lookup_da_gas_rng_chk_0 = GenericLookup; @@ -282,6 +290,8 @@ template using lookup_da_gas_rng_chk_0 = GenericLookup class lookup_da_gas_rng_chk_1_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_DA_GAS_RNG_CHK_1"; + static constexpr std::string_view NAME = lookup_da_gas_rng_chk_1_lookup_settings::NAME; }; template using lookup_da_gas_rng_chk_1 = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_main.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_main.hpp index 0736f0f0591..710314a0aa8 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_main.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_main.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class incl_main_tag_err_lookup_settings { public: + static constexpr std::string_view NAME = "INCL_MAIN_TAG_ERR"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -69,7 +71,7 @@ class incl_main_tag_err_lookup_settings { template class incl_main_tag_err_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "INCL_MAIN_TAG_ERR"; + static constexpr std::string_view NAME = incl_main_tag_err_lookup_settings::NAME; }; template using incl_main_tag_err = GenericLookup; @@ -77,6 +79,8 @@ template using incl_main_tag_err = GenericLookup class incl_mem_tag_err_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "INCL_MEM_TAG_ERR"; + static constexpr std::string_view NAME = incl_mem_tag_err_lookup_settings::NAME; }; template using incl_mem_tag_err = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem.hpp index 8f0bc95b744..f6e84a56449 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class lookup_mem_rng_chk_0_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_MEM_RNG_CHK_0"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -69,7 +71,7 @@ class lookup_mem_rng_chk_0_lookup_settings { template class lookup_mem_rng_chk_0_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_MEM_RNG_CHK_0"; + static constexpr std::string_view NAME = lookup_mem_rng_chk_0_lookup_settings::NAME; }; template using lookup_mem_rng_chk_0 = GenericLookup; @@ -77,6 +79,8 @@ template using lookup_mem_rng_chk_0 = GenericLookup class lookup_mem_rng_chk_1_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_MEM_RNG_CHK_1"; + static constexpr std::string_view NAME = lookup_mem_rng_chk_1_lookup_settings::NAME; }; template using lookup_mem_rng_chk_1 = GenericLookup; @@ -140,6 +144,8 @@ template using lookup_mem_rng_chk_1 = GenericLookup class lookup_mem_rng_chk_2_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_MEM_RNG_CHK_2"; + static constexpr std::string_view NAME = lookup_mem_rng_chk_2_lookup_settings::NAME; }; template using lookup_mem_rng_chk_2 = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem_slice.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem_slice.hpp index 20b629bc9b5..2bb34fd9260 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem_slice.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_mem_slice.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class lookup_cd_value_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_CD_VALUE"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -72,7 +74,7 @@ class lookup_cd_value_lookup_settings { template class lookup_cd_value_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_CD_VALUE"; + static constexpr std::string_view NAME = lookup_cd_value_lookup_settings::NAME; }; template using lookup_cd_value = GenericLookup; @@ -80,6 +82,8 @@ template using lookup_cd_value = GenericLookup class lookup_ret_value_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RET_VALUE"; + static constexpr std::string_view NAME = lookup_ret_value_lookup_settings::NAME; }; template using lookup_ret_value = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_range_check.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_range_check.hpp index bc264db8322..847c9d9b02e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_range_check.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookups_range_check.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class lookup_rng_chk_pow_2_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_POW_2"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -73,7 +75,7 @@ class lookup_rng_chk_pow_2_lookup_settings { template class lookup_rng_chk_pow_2_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_POW_2"; + static constexpr std::string_view NAME = lookup_rng_chk_pow_2_lookup_settings::NAME; }; template using lookup_rng_chk_pow_2 = GenericLookup; @@ -81,6 +83,8 @@ template using lookup_rng_chk_pow_2 = GenericLookup class lookup_rng_chk_diff_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_DIFF"; + static constexpr std::string_view NAME = lookup_rng_chk_diff_lookup_settings::NAME; }; template using lookup_rng_chk_diff = GenericLookup; @@ -144,6 +148,8 @@ template using lookup_rng_chk_diff = GenericLookup class lookup_rng_chk_0_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_0"; + static constexpr std::string_view NAME = lookup_rng_chk_0_lookup_settings::NAME; }; template using lookup_rng_chk_0 = GenericLookup; @@ -207,6 +213,8 @@ template using lookup_rng_chk_0 = GenericLookup class lookup_rng_chk_1_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_1"; + static constexpr std::string_view NAME = lookup_rng_chk_1_lookup_settings::NAME; }; template using lookup_rng_chk_1 = GenericLookup; @@ -270,6 +278,8 @@ template using lookup_rng_chk_1 = GenericLookup class lookup_rng_chk_2_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_2"; + static constexpr std::string_view NAME = lookup_rng_chk_2_lookup_settings::NAME; }; template using lookup_rng_chk_2 = GenericLookup; @@ -333,6 +343,8 @@ template using lookup_rng_chk_2 = GenericLookup class lookup_rng_chk_3_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_3"; + static constexpr std::string_view NAME = lookup_rng_chk_3_lookup_settings::NAME; }; template using lookup_rng_chk_3 = GenericLookup; @@ -396,6 +408,8 @@ template using lookup_rng_chk_3 = GenericLookup class lookup_rng_chk_4_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_4"; + static constexpr std::string_view NAME = lookup_rng_chk_4_lookup_settings::NAME; }; template using lookup_rng_chk_4 = GenericLookup; @@ -459,6 +473,8 @@ template using lookup_rng_chk_4 = GenericLookup class lookup_rng_chk_5_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_5"; + static constexpr std::string_view NAME = lookup_rng_chk_5_lookup_settings::NAME; }; template using lookup_rng_chk_5 = GenericLookup; @@ -522,6 +538,8 @@ template using lookup_rng_chk_5 = GenericLookup class lookup_rng_chk_6_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_6"; + static constexpr std::string_view NAME = lookup_rng_chk_6_lookup_settings::NAME; }; template using lookup_rng_chk_6 = GenericLookup; @@ -585,6 +603,8 @@ template using lookup_rng_chk_6 = GenericLookup class lookup_rng_chk_7_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_7"; + static constexpr std::string_view NAME = lookup_rng_chk_7_lookup_settings::NAME; }; template using lookup_rng_chk_7 = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_alu.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_alu.hpp index 5d19861468c..939df9a1f33 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_alu.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_alu.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class perm_rng_alu_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_RNG_ALU"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 3; @@ -59,7 +61,7 @@ class perm_rng_alu_permutation_settings { template class perm_rng_alu_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_RNG_ALU"; + static constexpr std::string_view NAME = perm_rng_alu_permutation_settings::NAME; }; template using perm_rng_alu = GenericPermutation; @@ -67,6 +69,8 @@ template using perm_rng_alu = GenericPermutation class perm_cmp_alu_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_CMP_ALU"; + static constexpr std::string_view NAME = perm_cmp_alu_permutation_settings::NAME; }; template using perm_cmp_alu = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_cmp.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_cmp.hpp index d1308f03348..efea46aa744 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_cmp.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_cmp.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class perm_rng_non_ff_cmp_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_RNG_NON_FF_CMP"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 2; @@ -55,7 +57,7 @@ class perm_rng_non_ff_cmp_permutation_settings { template class perm_rng_non_ff_cmp_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_RNG_NON_FF_CMP"; + static constexpr std::string_view NAME = perm_rng_non_ff_cmp_permutation_settings::NAME; }; template using perm_rng_non_ff_cmp = GenericPermutation; @@ -63,6 +65,8 @@ template using perm_rng_non_ff_cmp = GenericPermutation class perm_rng_cmp_lo_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_RNG_CMP_LO"; + static constexpr std::string_view NAME = perm_rng_cmp_lo_permutation_settings::NAME; }; template using perm_rng_cmp_lo = GenericPermutation; @@ -112,6 +116,8 @@ template using perm_rng_cmp_lo = GenericPermutation class perm_rng_cmp_hi_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_RNG_CMP_HI"; + static constexpr std::string_view NAME = perm_rng_cmp_hi_permutation_settings::NAME; }; template using perm_rng_cmp_hi = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_main.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_main.hpp index 9185726aa7b..56773a935ec 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_main.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_main.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class perm_main_alu_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_MAIN_ALU"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 16; @@ -111,7 +113,7 @@ class perm_main_alu_permutation_settings { template class perm_main_alu_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_ALU"; + static constexpr std::string_view NAME = perm_main_alu_permutation_settings::NAME; }; template using perm_main_alu = GenericPermutation; @@ -119,6 +121,8 @@ template using perm_main_alu = GenericPermutation class perm_main_bin_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_BIN"; + static constexpr std::string_view NAME = perm_main_bin_permutation_settings::NAME; }; template using perm_main_bin = GenericPermutation; @@ -184,6 +188,8 @@ template using perm_main_bin = GenericPermutation class perm_main_conv_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_CONV"; + static constexpr std::string_view NAME = perm_main_conv_permutation_settings::NAME; }; template using perm_main_conv = GenericPermutation; @@ -245,6 +251,8 @@ template using perm_main_conv = GenericPermutation class perm_main_sha256_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_SHA256"; + static constexpr std::string_view NAME = perm_main_sha256_permutation_settings::NAME; }; template using perm_main_sha256 = GenericPermutation; @@ -302,6 +310,8 @@ template using perm_main_sha256 = GenericPermutation class perm_main_pos2_perm_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_POS2_PERM"; + static constexpr std::string_view NAME = perm_main_pos2_perm_permutation_settings::NAME; }; template using perm_main_pos2_perm = GenericPermutation; @@ -359,6 +369,8 @@ template using perm_main_pos2_perm = GenericPermutation class perm_main_mem_a_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_A"; + static constexpr std::string_view NAME = perm_main_mem_a_permutation_settings::NAME; }; template using perm_main_mem_a = GenericPermutation; @@ -432,6 +444,8 @@ template using perm_main_mem_a = GenericPermutation class perm_main_mem_b_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_B"; + static constexpr std::string_view NAME = perm_main_mem_b_permutation_settings::NAME; }; template using perm_main_mem_b = GenericPermutation; @@ -505,6 +519,8 @@ template using perm_main_mem_b = GenericPermutation class perm_main_mem_c_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_C"; + static constexpr std::string_view NAME = perm_main_mem_c_permutation_settings::NAME; }; template using perm_main_mem_c = GenericPermutation; @@ -574,6 +590,8 @@ template using perm_main_mem_c = GenericPermutation class perm_main_mem_d_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_D"; + static constexpr std::string_view NAME = perm_main_mem_d_permutation_settings::NAME; }; template using perm_main_mem_d = GenericPermutation; @@ -643,6 +661,8 @@ template using perm_main_mem_d = GenericPermutation class perm_main_mem_ind_addr_a_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_IND_ADDR_A"; + static constexpr std::string_view NAME = perm_main_mem_ind_addr_a_permutation_settings::NAME; }; template using perm_main_mem_ind_addr_a = GenericPermutation; @@ -702,6 +722,8 @@ using perm_main_mem_ind_addr_a = GenericPermutation class perm_main_mem_ind_addr_b_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_IND_ADDR_B"; + static constexpr std::string_view NAME = perm_main_mem_ind_addr_b_permutation_settings::NAME; }; template using perm_main_mem_ind_addr_b = GenericPermutation; @@ -761,6 +783,8 @@ using perm_main_mem_ind_addr_b = GenericPermutation class perm_main_mem_ind_addr_c_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_IND_ADDR_C"; + static constexpr std::string_view NAME = perm_main_mem_ind_addr_c_permutation_settings::NAME; }; template using perm_main_mem_ind_addr_c = GenericPermutation; @@ -820,6 +844,8 @@ using perm_main_mem_ind_addr_c = GenericPermutation class perm_main_mem_ind_addr_d_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MAIN_MEM_IND_ADDR_D"; + static constexpr std::string_view NAME = perm_main_mem_ind_addr_d_permutation_settings::NAME; }; template using perm_main_mem_ind_addr_d = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_mem_slice.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_mem_slice.hpp index 1346517a181..72e79b2a55c 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_mem_slice.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_mem_slice.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class perm_slice_mem_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_SLICE_MEM"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 5; @@ -67,7 +69,7 @@ class perm_slice_mem_permutation_settings { template class perm_slice_mem_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_SLICE_MEM"; + static constexpr std::string_view NAME = perm_slice_mem_permutation_settings::NAME; }; template using perm_slice_mem = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_merkle_tree.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_merkle_tree.hpp index efd19e83030..8364b26afb2 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_merkle_tree.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_merkle_tree.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class perm_merkle_poseidon2_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_MERKLE_POSEIDON2"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 4; @@ -64,7 +66,7 @@ template class perm_merkle_poseidon2_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_MERKLE_POSEIDON2"; + static constexpr std::string_view NAME = perm_merkle_poseidon2_permutation_settings::NAME; }; template using perm_merkle_poseidon2 = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2.hpp index 0513879c0f5..71186c8d965 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class perm_pos_mem_read_a_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_POS_MEM_READ_A"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 5; @@ -67,7 +69,7 @@ class perm_pos_mem_read_a_permutation_settings { template class perm_pos_mem_read_a_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_READ_A"; + static constexpr std::string_view NAME = perm_pos_mem_read_a_permutation_settings::NAME; }; template using perm_pos_mem_read_a = GenericPermutation; @@ -75,6 +77,8 @@ template using perm_pos_mem_read_a = GenericPermutation class perm_pos_mem_read_b_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_READ_B"; + static constexpr std::string_view NAME = perm_pos_mem_read_b_permutation_settings::NAME; }; template using perm_pos_mem_read_b = GenericPermutation; @@ -136,6 +140,8 @@ template using perm_pos_mem_read_b = GenericPermutation class perm_pos_mem_read_c_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_READ_C"; + static constexpr std::string_view NAME = perm_pos_mem_read_c_permutation_settings::NAME; }; template using perm_pos_mem_read_c = GenericPermutation; @@ -197,6 +203,8 @@ template using perm_pos_mem_read_c = GenericPermutation class perm_pos_mem_read_d_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_READ_D"; + static constexpr std::string_view NAME = perm_pos_mem_read_d_permutation_settings::NAME; }; template using perm_pos_mem_read_d = GenericPermutation; @@ -258,6 +266,8 @@ template using perm_pos_mem_read_d = GenericPermutation class perm_pos_mem_write_a_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_WRITE_A"; + static constexpr std::string_view NAME = perm_pos_mem_write_a_permutation_settings::NAME; }; template using perm_pos_mem_write_a = GenericPermutation; @@ -320,6 +330,8 @@ template using perm_pos_mem_write_a = GenericPermutation class perm_pos_mem_write_b_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_WRITE_B"; + static constexpr std::string_view NAME = perm_pos_mem_write_b_permutation_settings::NAME; }; template using perm_pos_mem_write_b = GenericPermutation; @@ -382,6 +394,8 @@ template using perm_pos_mem_write_b = GenericPermutation class perm_pos_mem_write_c_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_WRITE_C"; + static constexpr std::string_view NAME = perm_pos_mem_write_c_permutation_settings::NAME; }; template using perm_pos_mem_write_c = GenericPermutation; @@ -444,6 +458,8 @@ template using perm_pos_mem_write_c = GenericPermutation class perm_pos_mem_write_d_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS_MEM_WRITE_D"; + static constexpr std::string_view NAME = perm_pos_mem_write_d_permutation_settings::NAME; }; template using perm_pos_mem_write_d = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2_full.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2_full.hpp index f9f85cedef0..3fcf47e3d24 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2_full.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perms_poseidon2_full.hpp @@ -14,6 +14,8 @@ namespace bb::avm { class perm_pos2_fixed_pos2_perm_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_POS2_FIXED_POS2_PERM"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 9; @@ -84,7 +86,7 @@ template class perm_pos2_fixed_pos2_perm_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_POS2_FIXED_POS2_PERM"; + static constexpr std::string_view NAME = perm_pos2_fixed_pos2_perm_permutation_settings::NAME; }; template using perm_pos2_fixed_pos2_perm = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bc_decomposition.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bc_decomposition.hpp index ac054cbfc18..d1f47a1d911 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bc_decomposition.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bc_decomposition.hpp @@ -14,6 +14,8 @@ namespace bb::avm2 { class lookup_bytecode_to_read_unary_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_BYTECODE_TO_READ_UNARY"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -75,7 +77,7 @@ template class lookup_bytecode_to_read_unary_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_BYTECODE_TO_READ_UNARY"; + static constexpr std::string_view NAME = lookup_bytecode_to_read_unary_lookup_settings::NAME; }; template using lookup_bytecode_to_read_unary = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bitwise.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bitwise.hpp index 07f24f2006b..d2bb98304cc 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bitwise.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_bitwise.hpp @@ -14,6 +14,8 @@ namespace bb::avm2 { class lookup_bitw_byte_lengths_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_BITW_BYTE_LENGTHS"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -72,7 +74,7 @@ class lookup_bitw_byte_lengths_lookup_settings { template class lookup_bitw_byte_lengths_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_BITW_BYTE_LENGTHS"; + static constexpr std::string_view NAME = lookup_bitw_byte_lengths_lookup_settings::NAME; }; template using lookup_bitw_byte_lengths = GenericLookup; @@ -80,6 +82,8 @@ template using lookup_bitw_byte_lengths = GenericLookup class lookup_bitw_byte_operations_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_BITW_BYTE_OPERATIONS"; + static constexpr std::string_view NAME = lookup_bitw_byte_operations_lookup_settings::NAME; }; template using lookup_bitw_byte_operations = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_execution.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_execution.hpp index e5fbd387103..db68fe8aff2 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_execution.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_execution.hpp @@ -14,6 +14,8 @@ namespace bb::avm2 { class lookup_dummy_precomputed_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_DUMMY_PRECOMPUTED"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -80,7 +82,7 @@ class lookup_dummy_precomputed_lookup_settings { template class lookup_dummy_precomputed_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_DUMMY_PRECOMPUTED"; + static constexpr std::string_view NAME = lookup_dummy_precomputed_lookup_settings::NAME; }; template using lookup_dummy_precomputed = GenericLookup; @@ -88,6 +90,8 @@ template using lookup_dummy_precomputed = GenericLookup class lookup_dummy_dynamic_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_DUMMY_DYNAMIC"; + static constexpr std::string_view NAME = lookup_dummy_dynamic_lookup_settings::NAME; }; template using lookup_dummy_dynamic = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_range_check.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_range_check.hpp index 4305e105dd9..d167baa29fb 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_range_check.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_range_check.hpp @@ -14,6 +14,8 @@ namespace bb::avm2 { class lookup_rng_chk_pow_2_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_POW_2"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -73,7 +75,7 @@ class lookup_rng_chk_pow_2_lookup_settings { template class lookup_rng_chk_pow_2_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_POW_2"; + static constexpr std::string_view NAME = lookup_rng_chk_pow_2_lookup_settings::NAME; }; template using lookup_rng_chk_pow_2 = GenericLookup; @@ -81,6 +83,8 @@ template using lookup_rng_chk_pow_2 = GenericLookup class lookup_rng_chk_diff_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_DIFF"; + static constexpr std::string_view NAME = lookup_rng_chk_diff_lookup_settings::NAME; }; template using lookup_rng_chk_diff = GenericLookup; @@ -144,6 +148,8 @@ template using lookup_rng_chk_diff = GenericLookup class lookup_rng_chk_is_r0_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R0_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r0_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r0_16_bit = GenericLookup; @@ -209,6 +215,8 @@ using lookup_rng_chk_is_r0_16_bit = GenericLookup class lookup_rng_chk_is_r1_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R1_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r1_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r1_16_bit = GenericLookup; @@ -274,6 +282,8 @@ using lookup_rng_chk_is_r1_16_bit = GenericLookup class lookup_rng_chk_is_r2_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R2_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r2_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r2_16_bit = GenericLookup; @@ -339,6 +349,8 @@ using lookup_rng_chk_is_r2_16_bit = GenericLookup class lookup_rng_chk_is_r3_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R3_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r3_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r3_16_bit = GenericLookup; @@ -404,6 +416,8 @@ using lookup_rng_chk_is_r3_16_bit = GenericLookup class lookup_rng_chk_is_r4_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R4_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r4_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r4_16_bit = GenericLookup; @@ -469,6 +483,8 @@ using lookup_rng_chk_is_r4_16_bit = GenericLookup class lookup_rng_chk_is_r5_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R5_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r5_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r5_16_bit = GenericLookup; @@ -534,6 +550,8 @@ using lookup_rng_chk_is_r5_16_bit = GenericLookup class lookup_rng_chk_is_r6_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R6_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r6_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r6_16_bit = GenericLookup; @@ -599,6 +617,8 @@ using lookup_rng_chk_is_r6_16_bit = GenericLookup class lookup_rng_chk_is_r7_16_bit_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_RNG_CHK_IS_R7_16_BIT"; + static constexpr std::string_view NAME = lookup_rng_chk_is_r7_16_bit_lookup_settings::NAME; }; template using lookup_rng_chk_is_r7_16_bit = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_sha256.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_sha256.hpp index 086379e84bc..c3616e3faac 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_sha256.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookups_sha256.hpp @@ -14,6 +14,8 @@ namespace bb::avm2 { class lookup_sha256_round_constant_lookup_settings { public: + static constexpr std::string_view NAME = "LOOKUP_SHA256_ROUND_CONSTANT"; + static constexpr size_t READ_TERMS = 1; static constexpr size_t WRITE_TERMS = 1; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; @@ -75,7 +77,7 @@ template class lookup_sha256_round_constant_relation : public GenericLookupRelation { public: - static constexpr std::string_view NAME = "LOOKUP_SHA256_ROUND_CONSTANT"; + static constexpr std::string_view NAME = lookup_sha256_round_constant_lookup_settings::NAME; }; template using lookup_sha256_round_constant = GenericLookup; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/perms_execution.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/perms_execution.hpp index aa7dce25a5f..34375bbcdda 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/perms_execution.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/perms_execution.hpp @@ -14,6 +14,8 @@ namespace bb::avm2 { class perm_dummy_dynamic_permutation_settings { public: + static constexpr std::string_view NAME = "PERM_DUMMY_DYNAMIC"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 4; @@ -63,7 +65,7 @@ class perm_dummy_dynamic_permutation_settings { template class perm_dummy_dynamic_relation : public GenericPermutationRelation { public: - static constexpr std::string_view NAME = "PERM_DUMMY_DYNAMIC"; + static constexpr std::string_view NAME = perm_dummy_dynamic_permutation_settings::NAME; }; template using perm_dummy_dynamic = GenericPermutation; diff --git a/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/lookup_builder.hpp b/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/lookup_builder.hpp index 70f00ae67ef..eceb0f803a1 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/lookup_builder.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/tracegen/lib/lookup_builder.hpp @@ -80,9 +80,8 @@ template class LookupIntoDynamicTable : public BaseLo if (it != row_idx.end()) { return it->second; } - // throw std::runtime_error("Failed computing counts for " + std::string(LookupSettings::NAME) + - // ". Could not find tuple in destination."); - throw std::runtime_error("Failed computing counts. Could not find tuple in destination."); + throw std::runtime_error("Failed computing counts for " + std::string(LookupSettings::NAME) + + ". Could not find tuple in destination."); } private: diff --git a/bb-pilcom/bb-pil-backend/templates/lookup.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/lookup.hpp.hbs index baf256319b4..2a6e3cb35fb 100644 --- a/bb-pilcom/bb-pil-backend/templates/lookup.hpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/lookup.hpp.hbs @@ -15,6 +15,8 @@ namespace bb::{{snakeCase root_name}} { class {{lookup_name}}_lookup_settings { public: + static constexpr std::string_view NAME = "{{shoutySnakeCase lookup_name}}"; + static constexpr size_t READ_TERMS = {{read_terms}}; static constexpr size_t WRITE_TERMS = {{write_terms}}; static constexpr size_t READ_TERM_TYPES[READ_TERMS] = {{read_term_types}}; @@ -83,7 +85,7 @@ class {{lookup_name}}_lookup_settings { template class {{lookup_name}}_relation : public GenericLookupRelation<{{lookup_name}}_lookup_settings, FF_> { public: - static constexpr std::string_view NAME = "{{shoutySnakeCase lookup_name}}"; + static constexpr std::string_view NAME = {{lookup_name}}_lookup_settings::NAME; }; template using {{lookup_name}} = GenericLookup<{{lookup_name}}_lookup_settings, FF_>; diff --git a/bb-pilcom/bb-pil-backend/templates/permutation.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/permutation.hpp.hbs index 60eea269bc2..dbca55ff1d9 100644 --- a/bb-pilcom/bb-pil-backend/templates/permutation.hpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/permutation.hpp.hbs @@ -15,6 +15,8 @@ namespace bb::{{snakeCase root_name}} { class {{perm_name}}_permutation_settings { public: + static constexpr std::string_view NAME = "{{shoutySnakeCase perm_name}}"; + // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = {{columns_per_set}}; @@ -49,7 +51,7 @@ class {{perm_name}}_permutation_settings { template class {{perm_name}}_relation : public GenericPermutationRelation<{{perm_name}}_permutation_settings, FF_> { public: - static constexpr std::string_view NAME = "{{shoutySnakeCase perm_name}}"; + static constexpr std::string_view NAME = {{perm_name}}_permutation_settings::NAME; }; template using {{perm_name}} = GenericPermutation<{{perm_name}}_permutation_settings, FF_>;