knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::ESGReasoner Class Reference

#include <ESGReasoner.h>

Inheritance diagram for knowrob::ESGReasoner:
Collaboration diagram for knowrob::ESGReasoner:

Public Member Functions

 ESGReasoner ()
 
 ESGReasoner ()
 
- 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< TermPtrrunTests (const std::string &target)
 
bool initializeReasoner (const PropertyTree &cfg) override
 
bool evaluate (GoalPtr query) override
 
void unload () 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< TermPtrrunTests (const std::string &target)
 
bool initializeReasoner (const PropertyTree &cfg) override
 
bool evaluate (GoalPtr query) override
 
void unload () 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
 
ReasonerManagerreasonerManager () 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
 
ReasonerManagerreasonerManager () 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
 

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< NamedReasonergetDefinedReasoner (const term_t &t_reasonerManager, const term_t &t_reasonerModule)
 
static std::shared_ptr< NamedReasonergetDefinedReasoner (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< GraphSelectorcreateAnswerFrame (const PrologTerm &plTerm)
 
static bool putQueryFrame (PrologTerm &frameTerm, const GraphSelector &frame)
 
static std::shared_ptr< GraphSelectorcreateAnswerFrame (const PrologTerm &plTerm)
 
- Protected Attributes inherited from knowrob::PrologReasoner
std::shared_ptr< PrologBackendknowledgeGraph_
 
- Protected Attributes inherited from knowrob::GoalDrivenReasoner
std::set< PredicateIndicatordefinedRelations_
 
std::set< PredicateIndicatordefinedClasses_
 
int features_
 
- Protected Attributes inherited from knowrob::DataSourceHandler
std::map< std::string, DataSourceLoaderdataSourceHandler_
 
- Static Protected Attributes inherited from knowrob::PrologReasoner
static bool isKnowRobInitialized_ = false
 

Detailed Description

Definition at line 17 of file ESGReasoner.h.

Constructor & Destructor Documentation

◆ ESGReasoner() [1/2]

ESGReasoner::ESGReasoner ( )

Definition at line 17 of file ESGReasoner.cpp.

19 {
20 }

◆ ESGReasoner() [2/2]

knowrob::ESGReasoner::ESGReasoner ( )

Member Function Documentation

◆ initializeDefaultPackages() [1/2]

bool ESGReasoner::initializeDefaultPackages ( )
overrideprotectedvirtual

Reimplemented from knowrob::PrologReasoner.

Definition at line 22 of file ESGReasoner.cpp.

23 {
24  return consult(std::filesystem::path("reasoner") / "esg" / "__init__.pl", nullptr, false);
25 }
bool consult(const std::filesystem::path &uri, const char *module={}, bool doTransformQuery=true)

◆ initializeDefaultPackages() [2/2]

bool knowrob::ESGReasoner::initializeDefaultPackages ( )
overrideprotectedvirtual

Reimplemented from knowrob::PrologReasoner.


The documentation for this class was generated from the following files: