21 #include "effect_visitor.h"
24 using namespace pddl_parser;
39 : pddl_operator_(pddl_operator), positive_effect_(positive)
53 return vector<string>({a});
69 vector<string> sub_effects =
71 res.insert(res.end(), sub_effects.begin(), sub_effects.end());
77 vector<string> sub_effects =
80 res.insert(res.end(), sub_effects.begin(), sub_effects.end());
84 string constants =
"";
86 vector<string> p_strings =
88 if (p_strings.size() != 1) {
90 "expected exactly one");
92 string p_string = p_strings[0];
93 if (p_string[0] ==
'?') {
95 if (p_string.length() <= 1) {
98 params +=
" " + p_string.substr(1);
103 constants +=
" " + p_string;
106 res.push_back(
string(
"(domain-effect"
120 + (positive_effect_ ?
"POSITIVE" :
"NEGATIVE")