From 51b3ada859151080d57e641639856cef2952a92c Mon Sep 17 00:00:00 2001 From: MakotoNakai Date: Sun, 19 Mar 2023 13:23:08 +0900 Subject: [PATCH 1/2] [fix] delete MeasurementCount clause --- .../ConnectionManager_test.cc | 18 ------------------ .../QRSA/ConnectionManager/RuleSetGenerator.cc | 4 ++-- .../ConnectionManager/RuleSetGenerator_test.cc | 18 ------------------ 3 files changed, 2 insertions(+), 38 deletions(-) diff --git a/quisp/modules/QRSA/ConnectionManager/ConnectionManager_test.cc b/quisp/modules/QRSA/ConnectionManager/ConnectionManager_test.cc index 56d8d4534..b43d0b7d5 100644 --- a/quisp/modules/QRSA/ConnectionManager/ConnectionManager_test.cc +++ b/quisp/modules/QRSA/ConnectionManager/ConnectionManager_test.cc @@ -219,15 +219,6 @@ TEST(ConnectionManagerTest, RespondToRequest) { "num_resource": 1 }, "type": "enough_resource" - }, - { - "options": { - "interface": { - "partner_address": 5 - }, - "num_measure": 0 - }, - "type": "measure_count" } ] }, @@ -541,15 +532,6 @@ TEST(ConnectionManagerTest, RespondToRequest) { "num_resource": 1 }, "type": "enough_resource" - }, - { - "options": { - "interface": { - "partner_address": 2 - }, - "num_measure": 0 - }, - "type": "measure_count" } ] }, diff --git a/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc b/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc index 168a638d9..96592ff93 100644 --- a/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc +++ b/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc @@ -94,9 +94,9 @@ std::unique_ptr RuleSetGenerator::tomographyRule(int partner_address, int // prepare condition auto condition = std::make_unique(); auto enough_resource_clause = std::make_unique(1, partner_address); - auto measure_count_clause = std::make_unique(num_measure, partner_address); + // auto measure_count_clause = std::make_unique(num_measure, partner_address); condition->addClause(std::move(enough_resource_clause)); - condition->addClause(std::move(measure_count_clause)); + // condition->addClause(std::move(measure_count_clause)); tomography_rule->setCondition(std::move(condition)); // prepare action diff --git a/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator_test.cc b/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator_test.cc index 2557239a3..0cc761407 100644 --- a/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator_test.cc +++ b/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator_test.cc @@ -169,15 +169,6 @@ TEST_F(RuleSetGeneratorTest, Simple) { "num_resource": 1 }, "type": "enough_resource" - }, - { - "options": { - "interface": { - "partner_address": 5 - }, - "num_measure": 0 - }, - "type": "measure_count" } ] }, @@ -334,15 +325,6 @@ TEST_F(RuleSetGeneratorTest, tomographyRule) { "num_resource": 1 }, "type": "enough_resource" - }, - { - "options": { - "interface": { - "partner_address": 1 - }, - "num_measure": 5000 - }, - "type": "measure_count" } ] }, From 7bb835f34e57a47872a26db0bea321b4cb367fe7 Mon Sep 17 00:00:00 2001 From: MakotoNakai Date: Sun, 19 Mar 2023 13:46:35 +0900 Subject: [PATCH 2/2] [fix] remove the unneccesary lines --- quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc b/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc index 96592ff93..8b25b75b9 100644 --- a/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc +++ b/quisp/modules/QRSA/ConnectionManager/RuleSetGenerator.cc @@ -94,9 +94,7 @@ std::unique_ptr RuleSetGenerator::tomographyRule(int partner_address, int // prepare condition auto condition = std::make_unique(); auto enough_resource_clause = std::make_unique(1, partner_address); - // auto measure_count_clause = std::make_unique(num_measure, partner_address); condition->addClause(std::move(enough_resource_clause)); - // condition->addClause(std::move(measure_count_clause)); tomography_rule->setCondition(std::move(condition)); // prepare action