Skip to content

Commit

Permalink
Renames
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumata888 committed Dec 6, 2023
1 parent d1bf33e commit a1801df
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "barretenberg/ecc/curves/bn254/bn254.hpp"
#include "barretenberg/flavor/flavor.hpp"
#include "barretenberg/polynomials/univariate.hpp"
#include "barretenberg/relations/avm_templates/generic_permutation_relation.hpp"
#include "barretenberg/relations/avm_templates/relation_definer.hpp"
#include "barretenberg/relations/relation_parameters.hpp"
#include "barretenberg/relations/relation_types.hpp"
#include "barretenberg/relations/toy_avm/generic_permutation_relation.hpp"
#include "barretenberg/relations/toy_avm/relation_definer.hpp"
#include "relation_definitions_fwd.hpp"
#include <array>
#include <concepts>
Expand All @@ -26,7 +26,7 @@ namespace flavor {
* integrating those mechanisms into AVM easier
*
*/
class AVMTemplate {
class ToyAVM {
public:
using Curve = curve::BN254;
using FF = Curve::ScalarField;
Expand Down Expand Up @@ -434,7 +434,7 @@ class AVMTemplate {
} // namespace flavor
namespace sumcheck {

DECLARE_IMPLEMENTATIONS_FOR_ALL_SETTINGS(GenericPermutationRelationImpl, flavor::AVMTemplate)
DECLARE_IMPLEMENTATIONS_FOR_ALL_SETTINGS(GenericPermutationRelationImpl, flavor::ToyAVM)

} // namespace sumcheck
} // namespace proof_system::honk
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
*/
#pragma once

#include "barretenberg/common/constexpr_utils.hpp"
#include "barretenberg/ecc/curves/bn254/fr.hpp"
#include "barretenberg/flavor/avm_template.hpp"
#include "barretenberg/flavor/toy_avm.hpp"
#include "barretenberg/honk/proof_system/logderivative_library.hpp"
#include "barretenberg/relations/relation_parameters.hpp"
#include "barretenberg/relations/toy_avm/generic_permutation_relation.hpp"

namespace proof_system {

template <typename Flavor> class ToyAVMCircuitBuilder {
public:
using FF = typename Flavor::FF;
using FF = Flavor::FF;
using Polynomial = typename Flavor::Polynomial;

static constexpr size_t NUM_POLYNOMIALS = Flavor::NUM_ALL_ENTITIES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "avm_template_circuit_builder.hpp"
#include "toy_avm_circuit_builder.hpp"
#include "barretenberg/crypto/generators/generator_data.hpp"
#include "barretenberg/crypto/pedersen_commitment/pedersen.hpp"
#include <gtest/gtest.h>

using namespace barretenberg;
Expand All @@ -11,22 +10,16 @@ auto& engine = numeric::random::get_debug_engine();

namespace toy_avm_circuit_builder_tests {

template <typename Flavor> class ToyAVMCircuitBuilderTests : public ::testing::Test {};

using FlavorTypes = ::testing::Types<proof_system::honk::flavor::AVMTemplate>;
TYPED_TEST_SUITE(AVMTemplateCircuitBuilderTests, FlavorTypes);

/**
* @brief A test explaining the work of the permutations in Toy AVM
*
*/
TYPED_TEST(ToyAVMCircuitBuilderTests, BaseCase)
TEST(ToyAVMCircuitBuilder, BaseCase)
{
using Flavor = TypeParam;
using FF = typename Flavor::FF;

using FF = proof_system::honk::flavor::ToyAVM::FF;
const size_t circuit_size = 16;
proof_system::ToyAVMCircuitBuilder<Flavor> circuit_builder;
proof_system::ToyAVMCircuitBuilder<proof_system::honk::flavor::ToyAVM> circuit_builder;

// Sample 2*16 random elements for the tuple permutation example
std::vector<FF> column_0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "generic_permutation_relation.hpp"
#include "barretenberg/flavor/avm_template.hpp"
#include "barretenberg/flavor/relation_definitions_fwd.hpp"
#include "barretenberg/flavor/toy_avm.hpp"
#include "barretenberg/honk/proof_system/logderivative_library.hpp"
#include "relation_definer.hpp"

Expand Down Expand Up @@ -30,5 +30,5 @@ void GenericPermutationRelationImpl<Settings, FF>::accumulate(ContainerOverSubre
// using GenericPermutationRelationExampleSettingsImpl = GenericPermutationRelationImpl<ExamplePermutationSettings,
// FF_>; DEFINE_SUMCHECK_RELATION_CLASS(GenericPermutationRelationExampleSettingsImpl, flavor::AVMTemplate);

DEFINE_IMPLEMENTATIONS_FOR_ALL_SETTINGS(GenericPermutationRelationImpl, flavor::AVMTemplate);
DEFINE_IMPLEMENTATIONS_FOR_ALL_SETTINGS(GenericPermutationRelationImpl, flavor::ToyAVM);
} // namespace proof_system::honk::sumcheck

0 comments on commit a1801df

Please sign in to comment.