22 #ifndef PLUGINS_STN_H_
23 #define PLUGINS_STN_H_
25 #include "domain_action.h"
26 #include "stn_action.h"
28 #include <aspect/logging.h>
29 #include <graphviz/gvc.h>
30 #include <pddl_parser/pddl_ast.h>
33 #include <bsoncxx/document/value.hpp>
35 #include <mongocxx/client.hpp>
49 void add_plan_action(
const std::string &name,
const std::string ¶ms);
55 std::vector<bsoncxx::document::value>
get_bson();
65 bool gen_classic_dom_ =
false;
66 std::string classic_dom_path_;
69 std::vector<DomainAction> domain_actions_;
70 std::vector<plan_action> plan_actions_;
71 std::vector<StnAction> stn_actions_;
73 std::vector<std::pair<StnAction, StnAction>> cond_edges_;
74 std::vector<std::pair<StnAction, StnAction>> temp_edges_;
76 enum LogLevel { WARN, INFO, DEBUG };
77 void log_warn(
const std::string &s);
78 void log_info(
const std::string &s);
79 void log_debug(
const std::string &s);
80 void log(
const std::string &s, Stn::LogLevel log_leve);
81 StnAction findActionById(
size_t id);
82 void add_domain_action(
const DomainAction &action);
83 void build_pred_list(pddl_parser::Expression e, std::vector<Predicate> *preconds,
bool condition);
84 void build_breakup_list(pddl_parser::Expression e, std::vector<std::string> *breakups);
85 void generate_classic_pddl_domain(
pddl_parser::Domain *dom,
const std::string &classic_dom_path);
86 void output_pred_list(pddl_parser::Expression e, std::ofstream &out);