knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
Unifier.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022, Daniel Beßler
3  * All rights reserved.
4  *
5  * This file is part of KnowRob, please consult
6  * https://github.com/knowrob/knowrob for license details.
7  */
8 
9 #ifndef KNOWROB_UNIFIER_H_
10 #define KNOWROB_UNIFIER_H_
11 
12 #include "Bindings.h"
13 
14 namespace knowrob {
18  class Unifier : public Bindings {
19  public:
25  Unifier(const TermPtr &t0, const TermPtr &t1);
26 
30  bool exists() const { return exists_; }
31 
37 
38  protected:
39  TermPtr t0_;
40  TermPtr t1_;
41  bool exists_;
42 
43  bool unify(const TermPtr &t0, const TermPtr &t1);
44  bool unify(const std::shared_ptr<Variable> &var, const TermPtr &t);
45  };
46 }
47 
48 #endif //KNOWROB_UNIFIER_H_
bool unify(const std::shared_ptr< Variable > &var, const TermPtr &t)
TermPtr t1_
Definition: Unifier.h:40
bool exists() const
Definition: Unifier.h:30
Unifier(const TermPtr &t0, const TermPtr &t1)
TermPtr t0_
Definition: Unifier.h:39
bool unify(const TermPtr &t0, const TermPtr &t1)
VariableRule & var()
Definition: terms.cpp:91
std::shared_ptr< Term > TermPtr
Definition: Term.h:117