diff --git a/src/core/algorithms/dc/verifier/dc_verifier.cpp b/src/core/algorithms/dc/verifier/dc_verifier.cpp index 82746ec241..f3c04efb7b 100644 --- a/src/core/algorithms/dc/verifier/dc_verifier.cpp +++ b/src/core/algorithms/dc/verifier/dc_verifier.cpp @@ -49,10 +49,13 @@ void DCVerifier::RegisterOptions() { RegisterOption(Option(&dc_string_, kDenialConstraint, kDDenialConstraint, "")); RegisterOption(config::kTableOpt(&input_table_)); + RegisterOption(Option(&do_collect_violations_, kDoCollectViolations, + kDDoCollectViolations, false)); } void DCVerifier::MakeExecuteOptsAvailable() { MakeOptionsAvailable({config::names::kDenialConstraint}); + MakeOptionsAvailable({config::names::kDoCollectViolations}); } void DCVerifier::LoadDataInternal() { diff --git a/src/core/algorithms/dc/verifier/dc_verifier.h b/src/core/algorithms/dc/verifier/dc_verifier.h index a4cb1137ff..8165f58811 100644 --- a/src/core/algorithms/dc/verifier/dc_verifier.h +++ b/src/core/algorithms/dc/verifier/dc_verifier.h @@ -33,6 +33,7 @@ class DCVerifier final : public Algorithm { std::unique_ptr relation_; std::vector data_; config::InputTable input_table_; + bool do_collect_violations_; std::string dc_string_; size_t index_offset_; bool result_; diff --git a/src/core/config/descriptions.h b/src/core/config/descriptions.h index cbc9c037e5..543d1237c0 100644 --- a/src/core/config/descriptions.h +++ b/src/core/config/descriptions.h @@ -173,4 +173,5 @@ constexpr auto kDColumnMatches = "column matches to examine"; constexpr auto kDMaxCardinality = "maximum number of MD matching classifiers"; auto const kDLevelDefinition = details::kDLevelDefinitionString.c_str(); constexpr auto kDDenialConstraint = "String representation of a Denial Constraint"; +constexpr auto kDDoCollectViolations = "Flag which tells whether to collect violations or not"; } // namespace config::descriptions diff --git a/src/core/config/names.h b/src/core/config/names.h index 85cc96abcd..ec87cd8adc 100644 --- a/src/core/config/names.h +++ b/src/core/config/names.h @@ -87,4 +87,5 @@ constexpr auto kColumnMatches = "column_matches"; constexpr auto kMaxCardinality = "max_cardinality"; constexpr auto kLevelDefinition = "level_definition"; constexpr auto kDenialConstraint = "denial_constraint"; +constexpr auto kDoCollectViolations = "do_collect_violations"; } // namespace config::names diff --git a/src/tests/test_dc_verifier.cpp b/src/tests/test_dc_verifier.cpp index 582a2bd6c0..afd43fd7ee 100644 --- a/src/tests/test_dc_verifier.cpp +++ b/src/tests/test_dc_verifier.cpp @@ -18,7 +18,7 @@ namespace mo = model; static algos::StdParamsMap GetParamMap(CSVConfig const& csv_config, std::string dc) { using namespace config::names; - return {{kCsvConfig, csv_config}, {kDenialConstraint, dc}}; + return {{kCsvConfig, csv_config}, {kDenialConstraint, dc}, {kDoCollectViolations, true}}; } struct DCTestParams {