knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
ESGReasoner.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #include <memory>
7 
8 #include "knowrob/reasoner/prolog/PrologTests.h"
9 #include "knowrob/reasoner/esg/ESGReasoner.h"
10 #include "knowrob/reasoner/ReasonerManager.h"
11 
12 using namespace knowrob;
13 
14 // make reasoner type accessible
16 
19 {
20 }
21 
23 {
24  return consult(std::filesystem::path("reasoner") / "esg" / "__init__.pl", nullptr, false);
25 }
26 
27 namespace knowrob::testing {
28  class ESGTests : public PrologTests<knowrob::ESGReasoner, knowrob::PrologBackend> {
29  protected:
30  static std::string getPath(const std::string &filename) {
31  return std::filesystem::path("reasoner") / "esg" / filename;
32  }
33  };
34 }
35 using namespace knowrob::testing;
36 
37 TEST_F(ESGTests, esg) { runTests(getPath("esg.plt")); }
38 TEST_F(ESGTests, interval) { runTests(getPath("interval.plt")); }
39 TEST_F(ESGTests, workflow) { runTests(getPath("workflow.pl")); }
40 TEST_F(ESGTests, parser) { runTests(getPath("parser.plt")); }
TEST_F(ESGTests, esg)
Definition: ESGReasoner.cpp:37
#define KNOWROB_BUILTIN_REASONER(Name, Type)
bool initializeDefaultPackages() override
Definition: ESGReasoner.cpp:22
bool consult(const std::filesystem::path &uri, const char *module={}, bool doTransformQuery=true)
TermRule & string()
Definition: terms.cpp:63