symbolic
axiom.h
1 
10 #ifndef SYMBOLIC_AXIOM_H_
11 #define SYMBOLIC_AXIOM_H_
12 
13 #include "symbolic/action.h"
14 #include "symbolic/normal_form.h"
15 
16 namespace symbolic {
17 
18 class Axiom : public Action {
19  public:
20  Axiom(const Pddl& pddl, const VAL::operator_* symbol);
21 
28  bool IsConsistent(const State& state) const;
29 
36  bool IsConsistent(const PartialState& state) const;
37 
49  static bool IsConsistent(const std::vector<std::shared_ptr<Axiom>>& axioms,
50  const PartialState& state);
51 
56  State Apply(const State& state) const;
57  bool Apply(State* state) const;
58 
63  PartialState Apply(const PartialState& state) const;
64  int Apply(PartialState* state) const;
65 
69  const SignedProposition& context() const { return context_; }
70 
71  friend std::ostream& operator<<(std::ostream& os, const Axiom& axiom);
72 
78  static std::optional<
79  std::function<const std::vector<Object>*(const std::vector<Object>&)>>
80  CreateApplicationFunction(const std::vector<Object>& action_params,
81  const std::vector<Object>& action_prop_params,
82  const std::vector<Object>& axiom_params,
83  const std::vector<Object>& axiom_prop_params);
84 
85  private:
86  bool IsConsistent(PartialState* state, bool* is_changed) const;
87 
88  std::vector<std::vector<Object>> arguments_;
89  SignedProposition context_;
90  std::string formula_;
91 };
92 
93 } // namespace symbolic
94 
95 #endif // SYMBOLIC_AXIOM_H_
symbolic
Definition: action.cc:329
symbolic::Axiom
Definition: axiom.h:18
symbolic::Axiom::IsConsistent
bool IsConsistent(const State &state) const
Definition: axiom.cc:120
symbolic::Pddl
Definition: pddl.h:40
symbolic::Axiom::Axiom
Axiom(const Pddl &pddl, const VAL::operator_*symbol)
Definition: axiom.cc:112
symbolic::Action
Definition: action.h:36
symbolic::State
Definition: state.h:40
symbolic::Axiom::CreateApplicationFunction
static std::optional< std::function< const std::vector< Object > *(const std::vector< Object > &)> > CreateApplicationFunction(const std::vector< Object > &action_params, const std::vector< Object > &action_prop_params, const std::vector< Object > &axiom_params, const std::vector< Object > &axiom_prop_params)
Definition: axiom.cc:236
symbolic::Axiom::Apply
State Apply(const State &state) const
Definition: axiom.cc:188
symbolic::Axiom::context
const SignedProposition & context() const
Definition: axiom.h:69
symbolic::PartialState
Definition: state.h:126
symbolic::SignedProposition
Definition: proposition.h:127