Skip to content

Commit

Permalink
[issue1098] Rename cegar directory to cartesian_abstractions.
Browse files Browse the repository at this point in the history
For developers: the cegar directory is now called
cartesian_abstractions to better reflect what it actually contains and
to avoid confusion with CEGAR-based code in the pdbs directory. This
changes includes renaming the namespace as well as some minor changes
in the documentation.
  • Loading branch information
Silvan Sievers committed Jul 27, 2023
1 parent 66a2ca6 commit 1fb9879
Show file tree
Hide file tree
Showing 31 changed files with 51 additions and 51 deletions.
36 changes: 18 additions & 18 deletions src/search/DownwardFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -642,24 +642,24 @@ fast_downward_plugin(

fast_downward_plugin(
NAME CEGAR
HELP "Plugin containing the code for CEGAR heuristics"
SOURCES
cegar/abstraction
cegar/abstract_search
cegar/abstract_state
cegar/additive_cartesian_heuristic
cegar/cartesian_heuristic_function
cegar/cartesian_set
cegar/cegar
cegar/cost_saturation
cegar/refinement_hierarchy
cegar/split_selector
cegar/subtask_generators
cegar/transition
cegar/transition_system
cegar/types
cegar/utils
cegar/utils_landmarks
HELP "Plugin containing the code for Cartesian CEGAR heuristics"
SOURCES
cartesian_abstractions/abstraction
cartesian_abstractions/abstract_search
cartesian_abstractions/abstract_state
cartesian_abstractions/additive_cartesian_heuristic
cartesian_abstractions/cartesian_heuristic_function
cartesian_abstractions/cartesian_set
cartesian_abstractions/cegar
cartesian_abstractions/cost_saturation
cartesian_abstractions/refinement_hierarchy
cartesian_abstractions/split_selector
cartesian_abstractions/subtask_generators
cartesian_abstractions/transition
cartesian_abstractions/transition_system
cartesian_abstractions/types
cartesian_abstractions/utils
cartesian_abstractions/utils_landmarks
DEPENDS ADDITIVE_HEURISTIC DYNAMIC_BITSET EXTRA_TASKS LANDMARKS PRIORITY_QUEUES TASK_PROPERTIES
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
AbstractSearch::AbstractSearch(
const vector<int> &operator_costs)
: operator_costs(operator_costs),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <memory>
#include <vector>

namespace cegar {
namespace cartesian_abstractions {
using Solution = std::deque<Transition>;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
AbstractState::AbstractState(
int state_id, NodeID node_id, CartesianSet &&cartesian_set)
: state_id(state_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class OperatorProxy;
class State;
class TaskProxy;

namespace cegar {
namespace cartesian_abstractions {
class Node;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
Abstraction::Abstraction(const shared_ptr<AbstractTask> &task, utils::LogProxy &log)
: transition_system(utils::make_unique_ptr<TransitionSystem>(TaskProxy(*task).get_operators())),
concrete_initial_state(TaskProxy(*task).get_initial_state()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace utils {
class LogProxy;
}

namespace cegar {
namespace cartesian_abstractions {
class AbstractState;
class RefinementHierarchy;
class TransitionSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
static vector<CartesianHeuristicFunction> generate_heuristic_functions(
const plugins::Options &opts, utils::LogProxy &log) {
if (log.is_at_least_normal()) {
Expand Down Expand Up @@ -62,10 +62,10 @@ class AdditiveCartesianHeuristicFeature
: public plugins::TypedFeature<Evaluator, AdditiveCartesianHeuristic> {
public:
AdditiveCartesianHeuristicFeature() : TypedFeature("cegar") {
document_title("Additive CEGAR heuristic");
document_title("Additive Cartesian CEGAR heuristic");
document_synopsis(
"See the paper introducing Counterexample-guided Abstraction "
"Refinement (CEGAR) for classical planning:" +
"See the paper introducing counterexample-guided Cartesian "
"abstraction refinement (CEGAR) for classical planning:" +
utils::format_conference_reference(
{"Jendrik Seipp", "Malte Helmert"},
"Counterexample-guided Cartesian Abstraction Refinement",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <vector>

namespace cegar {
namespace cartesian_abstractions {
class CartesianHeuristicFunction;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
CartesianHeuristicFunction::CartesianHeuristicFunction(
unique_ptr<RefinementHierarchy> &&hierarchy,
vector<int> &&h_values)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class State;

namespace cegar {
namespace cartesian_abstractions {
class RefinementHierarchy;
/*
Store RefinementHierarchy and heuristic values for looking up abstract state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
CartesianSet::CartesianSet(const vector<int> &domain_sizes) {
domain_subsets.reserve(domain_sizes.size());
for (int domain_size : domain_sizes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <ostream>
#include <vector>

namespace cegar {
namespace cartesian_abstractions {
using Bitset = dynamic_bitset::DynamicBitset<unsigned short>;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
// Create the Cartesian set that corresponds to the given preconditions or goals.
static CartesianSet get_cartesian_set(
const vector<int> &domain_sizes, const ConditionsProxy &conditions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RandomNumberGenerator;
class LogProxy;
}

namespace cegar {
namespace cartesian_abstractions {
class Abstraction;
struct Flaw;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
/*
We reserve some memory to be able to recover from out-of-memory
situations gracefully. When the memory runs out, we stop refining and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class RandomNumberGenerator;
class LogProxy;
}

namespace cegar {
namespace cartesian_abstractions {
class CartesianHeuristicFunction;
class SubtaskGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
Node::Node(int state_id)
: left_child(UNDEFINED),
right_child(UNDEFINED),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class AbstractTask;
class State;

namespace cegar {
namespace cartesian_abstractions {
class Node;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
SplitSelector::SplitSelector(
const shared_ptr<AbstractTask> &task,
PickSplit pick)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace utils {
class RandomNumberGenerator;
}

namespace cegar {
namespace cartesian_abstractions {
class AbstractState;

// Strategies for selecting a split in case there are multiple possibilities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
class SortFactsByIncreasingHaddValues {
// Can't store as unique_ptr since the class needs copy-constructor.
shared_ptr<additive_heuristic::AdditiveHeuristic> hadd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class RandomNumberGenerator;
class LogProxy;
}

namespace cegar {
namespace cartesian_abstractions {
using Facts = std::vector<FactPair>;
using SharedTasks = std::vector<std::shared_ptr<AbstractTask>>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <iostream>

namespace cegar {
namespace cartesian_abstractions {
struct Transition {
int op_id;
int target_id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
static vector<vector<FactPair>> get_preconditions_by_operator(
const OperatorsProxy &ops) {
vector<vector<FactPair>> preconditions_by_operator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace utils {
class LogProxy;
}

namespace cegar {
namespace cartesian_abstractions {
/*
Rewire transitions after each split.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <unordered_set>
#include <vector>

namespace cegar {
namespace cartesian_abstractions {
class AbstractState;
struct Transition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

using namespace std;

namespace cegar {
namespace cartesian_abstractions {
unique_ptr<additive_heuristic::AdditiveHeuristic> create_additive_heuristic(
const shared_ptr<AbstractTask> &task) {
plugins::Options opts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace additive_heuristic {
class AdditiveHeuristic;
}

namespace cegar {
namespace cartesian_abstractions {
extern std::unique_ptr<additive_heuristic::AdditiveHeuristic>
create_additive_heuristic(const std::shared_ptr<AbstractTask> &task);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using namespace std;
using namespace landmarks;

namespace cegar {
namespace cartesian_abstractions {
static FactPair get_fact(const Landmark &landmark) {
// We assume that the given Landmarks are from an h^m landmark graph with m=1.
assert(landmark.facts.size() == 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace landmarks {
class LandmarkGraph;
}

namespace cegar {
namespace cartesian_abstractions {
using VarToValues = std::unordered_map<int, std::vector<int>>;

extern std::shared_ptr<landmarks::LandmarkGraph> get_landmark_graph(
Expand Down

0 comments on commit 1fb9879

Please sign in to comment.