From 97c819a7074039b9fd11ac6d496a669adf4ff263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salom=C3=A9=20Eriksson?= Date: Thu, 4 Jul 2024 15:41:28 +0200 Subject: [PATCH] Fix style and extend one comment. --- src/search/heuristics/relaxation_heuristic.cc | 1 - src/search/landmarks/landmark_heuristic.cc | 4 ++-- src/search/tasks/negated_axioms_task.cc | 4 ++-- src/search/tasks/negated_axioms_task.h | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/search/heuristics/relaxation_heuristic.cc b/src/search/heuristics/relaxation_heuristic.cc index 13492ea637..69df7f967c 100644 --- a/src/search/heuristics/relaxation_heuristic.cc +++ b/src/search/heuristics/relaxation_heuristic.cc @@ -319,5 +319,4 @@ void RelaxationHeuristic::add_options_to_feature(plugins::Feature &feature) { "a potentially expensive precomputation.", "false"); } - } diff --git a/src/search/landmarks/landmark_heuristic.cc b/src/search/landmarks/landmark_heuristic.cc index 9cfb134b6c..fcdf91b1c6 100644 --- a/src/search/landmarks/landmark_heuristic.cc +++ b/src/search/landmarks/landmark_heuristic.cc @@ -40,8 +40,8 @@ void LandmarkHeuristic::initialize(const plugins::Options &opts) { && dynamic_cast(task.get()) == nullptr) { cerr << "The landmark heuristics currently only support " << "task transformations that modify the operator costs " - "or add negated axioms. See issues 845 and 686 " - "for details." << endl; + << "or add negated axioms. See issues 845 and 686 " + << "for details." << endl; utils::exit_with(utils::ExitCode::SEARCH_UNSUPPORTED); } diff --git a/src/search/tasks/negated_axioms_task.cc b/src/search/tasks/negated_axioms_task.cc index 3ae288b5fd..32b4b92300 100644 --- a/src/search/tasks/negated_axioms_task.cc +++ b/src/search/tasks/negated_axioms_task.cc @@ -172,7 +172,7 @@ unordered_set NegatedAxiomsTask::collect_needed_negatively( pair) doesn't depend on anything. */ if ((non_default) && - (simple_default_axioms || var_to_scc[var]->size() > 1) ) { + (simple_default_axioms || var_to_scc[var]->size() > 1)) { continue; } @@ -334,7 +334,7 @@ FactPair NegatedAxiomsTask::get_operator_precondition( assert(fact_index == 0); FactPair head = negated_axioms[op_index - negated_axioms_start_index].head; - return FactPair(head.var, 1-head.value); + return FactPair(head.var, 1 - head.value); } int NegatedAxiomsTask::get_num_operator_effects(int op_index, bool is_axiom) const { diff --git a/src/search/tasks/negated_axioms_task.h b/src/search/tasks/negated_axioms_task.h index 5ea461761a..d31dfc4079 100644 --- a/src/search/tasks/negated_axioms_task.h +++ b/src/search/tasks/negated_axioms_task.h @@ -16,6 +16,7 @@ class Options; that together represent ¬v <- ¬c_1 ^ ... ^ ¬c_n. Notes: + - We assume that derived variables are binary. - THE TRANSFORMATION CAN BE SLOW! The rule ¬v <- ¬c_1 ^ ... ^ ¬c_n must be split up into axioms whose conditions are simple conjunctions. Since all c_i are also simple conjunctions, this amounts to converting a CNF