6 #include "knowrob/reasoner/prolog/PrologTests.h"
7 #include "knowrob/reasoner/swrl/SWRLReasoner.h"
8 #include "knowrob/reasoner/ReasonerManager.h"
24 static auto unload_f =
"swrl_reasoner_unload";
31 static auto consult_f =
"swrl_file_load";
33 KB_INFO(
"Loading SWRL file: {}", dataFile->uri());
38 KB_DEBUG(
"Initializing SWRL module.");
39 return consult(std::filesystem::path(
"reasoner") /
"swrl" /
"__init__.pl",
nullptr,
false);
43 class SWRLTests :
public PrologTests<knowrob::SWRLReasoner, knowrob::PrologBackend> {
46 return std::filesystem::path(
"reasoner") /
"swrl" / filename;
52 TEST_F(SWRLTests, swrl) { runTests(getPath(
"swrl.plt")); }
#define PROLOG_ENGINE_EVAL(term)
#define KNOWROB_BUILTIN_REASONER(Name, Type)
void addDataHandler(const std::string &format, const DataSourceLoader &fn)
static std::filesystem::path getResourcePath(const std::filesystem::path &filename)
bool consult(const std::filesystem::path &uri, const char *module={}, bool doTransformQuery=true)
PrologTerm getReasonerQuery(const PrologTerm &goal)
static const std::string SWRL_FORMAT
bool loadSWRLFile(const DataSourcePtr &dataFile)
bool initializeDefaultPackages() override
std::shared_ptr< DataSource > DataSourcePtr