knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <SWRLReasoner.h>
Public Member Functions | |
SWRLReasoner () | |
bool | loadSWRLFile (const DataSourcePtr &dataFile) |
void | unload () override |
SWRLReasoner () | |
bool | loadSWRLFile (const DataSourcePtr &dataFile) |
void | unload () override |
Public Member Functions inherited from knowrob::PrologReasoner | |
PrologReasoner () | |
~PrologReasoner () override | |
PrologReasoner (const PrologReasoner &)=delete | |
bool | setReasonerSetting (const TermPtr &key, const TermPtr &valueString) |
bool | consult (const std::filesystem::path &uri, const char *module={}, bool doTransformQuery=true) |
bool | load_rdf_xml (const std::filesystem::path &rdfFile) |
virtual std::string_view | callFunctor () |
PrologTerm | transformGoal (const PrologTerm &goal) |
std::list< TermPtr > | runTests (const std::string &target) |
bool | initializeReasoner (const PropertyTree &cfg) override |
bool | evaluate (GoalPtr query) override |
PrologReasoner () | |
~PrologReasoner () override | |
PrologReasoner (const PrologReasoner &)=delete | |
bool | setReasonerSetting (const TermPtr &key, const TermPtr &valueString) |
bool | consult (const std::filesystem::path &uri, const char *module={}, bool doTransformQuery=true) |
bool | load_rdf_xml (const std::filesystem::path &rdfFile) |
virtual std::string_view | callFunctor () |
PrologTerm | transformGoal (const PrologTerm &goal) |
std::list< TermPtr > | runTests (const std::string &target) |
bool | initializeReasoner (const PropertyTree &cfg) override |
bool | evaluate (GoalPtr query) override |
Public Member Functions inherited from knowrob::GoalDrivenReasoner | |
GoalDrivenReasoner () | |
bool | hasFeature (GoalDrivenReasonerFeature feature) const |
void | enableFeature (GoalDrivenReasonerFeature feature) |
bool | isRelationDefined (const PredicateIndicator &indicator) |
bool | isClassDefined (const std::string_view &iri) |
void | defineRelation (const PredicateIndicator &indicator) |
void | defineRelation (const IRIAtomPtr &iri) |
void | undefineRelation (const PredicateIndicator &indicator) |
void | defineClass (const IRIAtomPtr &iri) |
void | undefineClass (const IRIAtomPtr &iri) |
const auto & | definedRelations () const |
const auto & | definedClasses () const |
GoalDrivenReasoner () | |
bool | hasFeature (GoalDrivenReasonerFeature feature) const |
void | enableFeature (GoalDrivenReasonerFeature feature) |
bool | isRelationDefined (const PredicateIndicator &indicator) |
bool | isClassDefined (const std::string_view &iri) |
void | defineRelation (const PredicateIndicator &indicator) |
void | defineRelation (const IRIAtomPtr &iri) |
void | undefineRelation (const PredicateIndicator &indicator) |
void | defineClass (const IRIAtomPtr &iri) |
void | undefineClass (const IRIAtomPtr &iri) |
const auto & | definedRelations () const |
const auto & | definedClasses () const |
Public Member Functions inherited from knowrob::Reasoner | |
Reasoner () | |
virtual | ~Reasoner ()=default |
auto & | reasonerName () const |
auto | reasonerLanguage () const |
auto | storage () const |
template<class T > | |
std::shared_ptr< T > | getTypedStorage () const |
ReasonerManager & | reasonerManager () const |
void | pushWork (const std::function< void(void)> &fn) |
void | setStorage (const StoragePtr &storage) |
Reasoner () | |
virtual | ~Reasoner ()=default |
auto & | reasonerName () const |
auto | reasonerLanguage () const |
auto | storage () const |
template<class T > | |
std::shared_ptr< T > | getTypedStorage () const |
ReasonerManager & | reasonerManager () const |
void | pushWork (const std::function< void(void)> &fn) |
void | setStorage (const StoragePtr &storage) |
Public Member Functions inherited from knowrob::DataSourceHandler | |
DataSourceHandler ()=default | |
virtual | ~DataSourceHandler ()=default |
void | addDataHandler (const std::string &format, const DataSourceLoader &fn) |
bool | loadDataSource (const DataSourcePtr &dataSource) |
bool | hasDataHandler (const DataSourcePtr &dataSource) const |
DataSourceHandler ()=default | |
virtual | ~DataSourceHandler ()=default |
void | addDataHandler (const std::string &format, const DataSourceLoader &fn) |
bool | loadDataSource (const DataSourcePtr &dataSource) |
bool | hasDataHandler (const DataSourcePtr &dataSource) const |
Static Public Attributes | |
static const std::string | SWRL_FORMAT = "pl-swrl" |
Protected Member Functions | |
bool | initializeDefaultPackages () override |
bool | initializeDefaultPackages () override |
Protected Member Functions inherited from knowrob::PrologReasoner | |
virtual bool | initializeGlobalPackages () |
virtual void | initializeReasonerStorage () |
bool | loadDataSourceWithUnknownFormat (const DataSourcePtr &dataFile) override |
AnswerYesPtr | yes (const GoalPtr &query, const PrologTerm &rdfGoal, const PrologTerm &frameTerm) |
AnswerNoPtr | no (const GoalPtr &query) |
PrologTerm | getReasonerQuery (const PrologTerm &goal) |
virtual bool | initializeGlobalPackages () |
virtual void | initializeReasonerStorage () |
bool | loadDataSourceWithUnknownFormat (const DataSourcePtr &dataFile) override |
AnswerYesPtr | yes (const GoalPtr &query, const PrologTerm &rdfGoal, const PrologTerm &frameTerm) |
AnswerNoPtr | no (const GoalPtr &query) |
PrologTerm | getReasonerQuery (const PrologTerm &goal) |
Additional Inherited Members | |
Static Public Member Functions inherited from knowrob::PrologReasoner | |
static std::shared_ptr< NamedReasoner > | getDefinedReasoner (const term_t &t_reasonerManager, const term_t &t_reasonerModule) |
static std::shared_ptr< NamedReasoner > | getDefinedReasoner (const term_t &t_reasonerManager, const term_t &t_reasonerModule) |
Static Protected Member Functions inherited from knowrob::PrologReasoner | |
static bool | putQueryFrame (PrologTerm &frameTerm, const GraphSelector &frame) |
static std::shared_ptr< GraphSelector > | createAnswerFrame (const PrologTerm &plTerm) |
static bool | putQueryFrame (PrologTerm &frameTerm, const GraphSelector &frame) |
static std::shared_ptr< GraphSelector > | createAnswerFrame (const PrologTerm &plTerm) |
Protected Attributes inherited from knowrob::PrologReasoner | |
std::shared_ptr< PrologBackend > | knowledgeGraph_ |
Protected Attributes inherited from knowrob::GoalDrivenReasoner | |
std::set< PredicateIndicator > | definedRelations_ |
std::set< PredicateIndicator > | definedClasses_ |
int | features_ |
Protected Attributes inherited from knowrob::DataSourceHandler | |
std::map< std::string, DataSourceLoader > | dataSourceHandler_ |
Static Protected Attributes inherited from knowrob::PrologReasoner | |
static bool | isKnowRobInitialized_ = false |
Definition at line 14 of file SWRLReasoner.h.
SWRLReasoner::SWRLReasoner | ( | ) |
Definition at line 17 of file SWRLReasoner.cpp.
knowrob::SWRLReasoner::SWRLReasoner | ( | ) |
|
overrideprotectedvirtual |
Reimplemented from knowrob::PrologReasoner.
Definition at line 37 of file SWRLReasoner.cpp.
|
overrideprotectedvirtual |
Reimplemented from knowrob::PrologReasoner.
bool SWRLReasoner::loadSWRLFile | ( | const DataSourcePtr & | dataFile | ) |
Definition at line 30 of file SWRLReasoner.cpp.
bool knowrob::SWRLReasoner::loadSWRLFile | ( | const DataSourcePtr & | dataFile | ) |
|
overridevirtual |
Unload the reasoner, meaning that all static resources associated to this reasoner are released.
Reimplemented from knowrob::PrologReasoner.
Definition at line 23 of file SWRLReasoner.cpp.
|
overridevirtual |
Unload the reasoner, meaning that all static resources associated to this reasoner are released.
Reimplemented from knowrob::PrologReasoner.
|
static |
Definition at line 16 of file SWRLReasoner.h.