knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob Namespace Reference

Namespaces

 graph
 
 modals
 
 mongo
 
 owl
 
 parsers
 
 prolog
 
 py
 
 rdf
 
 rdfs
 
 reasoner
 
 reification
 
 semweb
 
 testing
 
 time
 
 transaction
 
 xsd
 

Classes

class  DataSource
 
class  DataSourceHandler
 
class  Bottom
 
class  CompoundFormula
 
class  Conjunction
 
class  DependencyNode
 
struct  DependencyGroup
 
class  DependencyGraph
 
class  Disjunction
 
class  FirstOrderLiteral
 
class  Formula
 
class  FormulaLabel
 
class  FramedPredicate
 
class  Implication
 
class  ModalFormula
 
class  ModalOperator
 
class  ModalIteration
 
class  Negation
 
class  Predicate
 
class  PredicateIndicator
 
class  SimpleConjunction
 
class  Top
 
class  InterfaceUtils
 
class  PrologBackend
 
class  PrologEngine
 
class  PrologTerm
 
class  PrologList
 
class  PythonError
 
class  KnowledgeBase
 
class  GlobalSettings
 
class  KnowRobError
 
class  Logger
 
class  NamedPlugin
 
class  PluginFactory
 
class  PluginLibrary
 
class  PluginManager
 
class  PluginModule
 
class  TypedPluginFactory
 
class  Printable
 
class  PropertyTree
 
class  Answer
 
struct  AnswerComparator
 
class  AnswerDontKnow
 
class  AnswerMerger
 
class  AnswerNo
 
class  AnswerTransformer
 
class  AnswerYes
 
class  ConjunctiveBroadcaster
 
class  ConjunctiveQuery
 
class  DisjunctiveBroadcaster
 
class  EndOfEvaluation
 
class  FormulaQuery
 
class  ModalStage
 
class  NegationStage
 
class  PredicateNegationStage
 
class  ModalNegationStage
 
class  Query
 
struct  QueryContext
 
class  QueryError
 
class  QueryParser
 
class  QueryPipeline
 
class  AnswerBuffer_WithReference
 
class  QueryStage
 
class  TypedQueryStage
 
class  TypedQueryStageVec
 
class  QueryTree
 
class  RedundantAnswerFilter
 
class  Token
 
class  TokenBroadcaster
 
class  TokenBuffer
 
class  TokenQueue
 
class  TokenStream
 
class  Computable
 
class  DataDrivenReasoner
 
class  ESGReasoner
 
class  Goal
 
class  GoalDrivenReasoner
 
class  ReasonerRunner
 
class  MongologReasoner
 
class  PrologReasoner
 
class  PrologTestsBase
 
class  PrologTests
 
class  RDFGoal
 
class  RDFGoalReasoner
 
class  Reasoner
 
class  ReasonerError
 
class  ReasonerManager
 
class  SWRLReasoner
 
class  CurrentGraph
 
class  GraphBuiltin
 
class  GraphConnective
 
class  GraphPathQuery
 
class  GraphPattern
 
class  GraphQuery
 
struct  GraphQueryExpansion
 
class  GraphRenaming
 
class  GraphRestructuring
 
struct  GraphSelector
 
class  GraphSequence
 
class  GraphTerm
 
class  GraphTransformation
 
class  GraphTransformationRule
 
class  GraphUnion
 
class  ImportHierarchy
 
class  OntologyError
 
class  OntologyFile
 
class  OntologyParser
 
class  OntologySource
 
class  Perspective
 
struct  PrefixProbe
 
class  PrefixRegistry
 
struct  RDFIndicator
 
class  SPARQLQuery
 
class  SPARQLService
 
class  TransformedOntology
 
class  Triple
 
class  TripleTemplate
 
struct  TriplePtr
 
class  TripleContainer
 
class  MutableTripleContainer
 
class  ProxyTripleContainer
 
class  TripleViewBatch
 
class  TriplePattern
 
class  TriplePatternContainer
 
class  Vocabulary
 
class  MongoKnowledgeGraph
 
class  Observer
 
class  ObserverJob
 
class  ObserverManager
 
class  QueryableStorage
 
class  RaptorContainer
 
class  RedlandModel
 
class  RedlandURI
 
class  ReificationContainer
 
class  ReifiedQuery
 
class  ReifiedTriple
 
class  SPARQLBackend
 
class  Storage
 
class  StorageError
 
class  StorageInterface
 
class  StorageManager
 
class  UnReificationContainer
 
class  VersionedOrigin
 
class  Atom
 
class  Atomic
 
class  Bindings
 
class  Blank
 
class  Function
 
class  groundable
 
class  IRIAtom
 
class  ListTerm
 
class  Numeric
 
class  NumericTemplate
 
class  OptionList
 
class  RDFNode
 
class  StringBase
 
class  StringTemplate
 
class  Term
 
class  Unifier
 
class  Variable
 
struct  VariablePtrComparator
 
class  XSDAtomic
 
class  ThreadPool
 
class  TimeInterval
 
class  URI
 

Typedefs

using DataSourcePtr = std::shared_ptr< DataSource >
 
using DataSourceLoader = std::function< bool(const DataSourcePtr &)>
 
using DependencyNodePtr = std::shared_ptr< DependencyNode >
 
using FirstOrderLiteralPtr = std::shared_ptr< FirstOrderLiteral >
 
using FormulaPtr = std::shared_ptr< Formula >
 
using FormulaLabelPtr = std::shared_ptr< FormulaLabel >
 
using ModalOperatorPtr = std::shared_ptr< const ModalOperator >
 
using PredicatePtr = std::shared_ptr< Predicate >
 
using SimpleConjunctionPtr = std::shared_ptr< SimpleConjunction >
 
using KnowledgeBasePtr = std::shared_ptr< KnowledgeBase >
 
using AnswerPtr = std::shared_ptr< const Answer >
 
using AnswerSet = std::set< AnswerPtr, AnswerComparator >
 
using AnswerHandler = std::function< void(const AnswerPtr &)>
 
using AnswerDontKnowPtr = std::shared_ptr< const AnswerDontKnow >
 
using AnswerNoPtr = std::shared_ptr< const AnswerNo >
 
using AnswerYesPtr = std::shared_ptr< const AnswerYes >
 
using ConjunctiveQueryPtr = std::shared_ptr< ConjunctiveQuery >
 
using QueryContextPtr = std::shared_ptr< const QueryContext >
 
using TokenPtr = std::shared_ptr< const Token >
 
using TokenMap = std::map< uint32_t, std::vector< TokenPtr > >
 
using TokenBufferPtr = std::shared_ptr< TokenBuffer >
 
using ComputablePtr = std::shared_ptr< Computable >
 
using DataDrivenReasonerPtr = std::shared_ptr< DataDrivenReasoner >
 
using GoalPtr = std::shared_ptr< Goal >
 
using GoalDrivenReasonerPtr = std::shared_ptr< GoalDrivenReasoner >
 
using DefiningReasoner = std::pair< GoalDrivenReasonerPtr, AtomPtr >
 
using RDFGoalPtr = std::shared_ptr< RDFGoal >
 
using NamedReasoner = NamedPlugin< Reasoner >
 
using ReasonerFactory = PluginFactory< Reasoner >
 
using ReasonerPtr = std::shared_ptr< Reasoner >
 
using GraphPathQueryPtr = std::shared_ptr< GraphPathQuery >
 
using GraphQueryPtr = std::shared_ptr< GraphQuery >
 
using GraphQueryExpansionPtr = std::shared_ptr< GraphQueryExpansion >
 
using GraphRenamingMap = std::map< std::string, std::string, std::less<> >
 
using GraphSelectorPtr = std::shared_ptr< const GraphSelector >
 
using PerspectivePtr = std::shared_ptr< Perspective >
 
using OptionalStringRef = std::optional< std::reference_wrapper< const std::string > >
 
using SPARQLFlags = SPARQLFlag
 
using TripleCopy = TripleTemplate< std::string >
 
using TripleView = TripleTemplate< std::string_view >
 
using TripleContainerPtr = std::shared_ptr< TripleContainer >
 
using TripleHandler = std::function< void(const TripleContainerPtr &)>
 
using TripleVisitor = std::function< void(const TriplePtr &)>
 
using MutableTripleContainerPtr = std::shared_ptr< MutableTripleContainer >
 
using MutableTripleHandler = std::function< void(const MutableTripleContainerPtr &)>
 
using TripleFilter = std::function< bool(const Triple &)>
 
using TriplePatternPtr = std::shared_ptr< TriplePattern >
 
using VocabularyPtr = std::shared_ptr< Vocabulary >
 
using ObserverPtr = std::shared_ptr< Observer >
 
using ObserverManagerPtr = std::shared_ptr< ObserverManager >
 
using ResourceCounter = std::function< void(std::string_view, uint64_t)>
 
using QueryableBackendPtr = std::shared_ptr< QueryableStorage >
 
using ReifiedNames = std::shared_ptr< std::vector< IRIAtomPtr > >
 
using ReifiedTriplePtr = std::shared_ptr< ReifiedTriple >
 
using StorageFeatures = StorageFeature
 
using StoragePtr = std::shared_ptr< Storage >
 
using BackendFactory = PluginFactory< Storage >
 
using NamedBackend = NamedPlugin< Storage >
 
using VersionedOriginPtr = std::shared_ptr< VersionedOrigin >
 
using AtomPtr = std::shared_ptr< Atom >
 
using BindingsPtr = std::shared_ptr< const Bindings >
 
using BindingsHandler = std::function< void(const BindingsPtr &)>
 
using FunctionPtr = std::shared_ptr< Function >
 
using IRIAtomPtr = std::shared_ptr< IRIAtom >
 
using Integer = NumericTemplate< int, XSDType::INTEGER >
 
using Long = NumericTemplate< long, XSDType::LONG >
 
using Short = NumericTemplate< short, XSDType::SHORT >
 
using UnsignedLong = NumericTemplate< unsigned long, XSDType::UNSIGNED_LONG >
 
using UnsignedInt = NumericTemplate< unsigned int, XSDType::UNSIGNED_INT >
 
using UnsignedShort = NumericTemplate< unsigned short, XSDType::UNSIGNED_SHORT >
 
using Float = NumericTemplate< float, XSDType::FLOAT >
 
using Double = NumericTemplate< double, XSDType::DOUBLE >
 
using Boolean = NumericTemplate< bool, XSDType::BOOLEAN >
 
using String = StringTemplate< std::string >
 
using StringView = StringTemplate< std::string_view >
 
using TermPtr = std::shared_ptr< Term >
 
using VariablePtr = std::shared_ptr< Variable >
 
typedef std::chrono::time_point< std::chrono::system_clock, std::chrono::seconds > TimePoint
 

Enumerations

enum class  DataSourceType { ONTOLOGY , UNSPECIFIED , ONTOLOGY , UNSPECIFIED }
 
enum class  FormulaType {
  PREDICATE , CONJUNCTION , DISJUNCTION , NEGATION ,
  IMPLICATION , MODAL , PREDICATE , CONJUNCTION ,
  DISJUNCTION , NEGATION , IMPLICATION , MODAL
}
 
enum class  ModalType {
  KNOWLEDGE = 1 , BELIEF , ALWAYS , SOMETIMES ,
  KNOWLEDGE = 1 , BELIEF , ALWAYS , SOMETIMES
}
 
enum  PluginLanguage { CPP = 0 , PYTHON = 1 , CPP = 0 , PYTHON = 1 }
 
enum  QueryFlag {
  QUERY_FLAG_ALL_SOLUTIONS = 1 << 0 , QUERY_FLAG_ONE_SOLUTION = 1 << 1 , QUERY_FLAG_PERSIST_SOLUTIONS = 1 << 2 , QUERY_FLAG_UNIQUE_SOLUTIONS = 1 << 3 ,
  QUERY_FLAG_ALL_SOLUTIONS = 1 << 0 , QUERY_FLAG_ONE_SOLUTION = 1 << 1 , QUERY_FLAG_PERSIST_SOLUTIONS = 1 << 2 , QUERY_FLAG_UNIQUE_SOLUTIONS = 1 << 3
}
 
enum class  TokenType : uint8_t { CONTROL_TOKEN = 0 , ANSWER_TOKEN , CONTROL_TOKEN = 0 , ANSWER_TOKEN }
 
enum class  GoalDrivenReasonerFeature { SupportsSimpleConjunctions = 0x01 , SupportsExtensionalGrounding = 0x02 , SupportsSimpleConjunctions = 0x01 , SupportsExtensionalGrounding = 0x02 }
 
enum class  GraphBuiltinType {
  Bind , Min , Max , Less ,
  LessOrEqual , Greater , GreaterOrEqual , Equal ,
  NotEqual , Bind , Min , Max ,
  Less , LessOrEqual , Greater , GreaterOrEqual ,
  Equal , NotEqual
}
 
enum class  GraphTermType {
  Sequence , Union , Pattern , Builtin ,
  Sequence , Union , Pattern , Builtin
}
 
enum class  SPARQLFlag : std::uint8_t { NOTHING = 1ul << 0 , NOT_EXISTS_UNSUPPORTED = 1ul << 1 , NOTHING = 1ul << 0 , NOT_EXISTS_UNSUPPORTED = 1ul << 1 }
 
enum class  FilterType {
  EQ = 0 , NEQ , LT , GT ,
  LEQ , GEQ , EQ = 0 , NEQ ,
  LT , GT , LEQ , GEQ
}
 
enum class  RedlandStorageType {
  MEMORY , HASHES , MYSQL , POSTGRESQL ,
  SQLITE , MEMORY , HASHES , MYSQL ,
  POSTGRESQL , SQLITE
}
 
enum class  RedlandHashType { MEMORY , BDB , MEMORY , BDB }
 
enum  ReificationFlag { IncludeOriginal = 1 << 0 , IncludeReified = 1 << 1 , IncludeOriginal = 1 << 0 , IncludeReified = 1 << 1 }
 
enum class  StorageFeature : std::uint8_t {
  NothingSpecial = 1ul << 0 , ReAssignment = 1ul << 2 , TripleContext = 1ul << 3 , NothingSpecial = 1ul << 0 ,
  ReAssignment = 1ul << 2 , TripleContext = 1ul << 3
}
 
enum class  AtomType { REGULAR , IRI , REGULAR , IRI }
 
enum class  AtomicType {
  ATOM , NUMERIC , STRING , ATOM ,
  NUMERIC , STRING
}
 
enum class  RDFNodeType {
  BLANK , IRI , LITERAL , BLANK ,
  IRI , LITERAL
}
 
enum class  TermType : uint8_t {
  ATOMIC = 0 , VARIABLE , FUNCTION , ATOMIC = 0 ,
  VARIABLE , FUNCTION
}
 
enum class  XSDType {
  STRING = 0 , BOOLEAN , DOUBLE , FLOAT ,
  INTEGER , LONG , SHORT , UNSIGNED_LONG ,
  UNSIGNED_INT , UNSIGNED_SHORT , NON_NEGATIVE_INTEGER , LAST ,
  STRING = 0 , BOOLEAN , DOUBLE , FLOAT ,
  INTEGER , LONG , SHORT , UNSIGNED_LONG ,
  UNSIGNED_INT , UNSIGNED_SHORT , NON_NEGATIVE_INTEGER , LAST
}
 The XSDType enum Enumeration of the XSD types. More...
 
enum class  DataSourceType { ONTOLOGY , UNSPECIFIED , ONTOLOGY , UNSPECIFIED }
 
enum class  FormulaType {
  PREDICATE , CONJUNCTION , DISJUNCTION , NEGATION ,
  IMPLICATION , MODAL , PREDICATE , CONJUNCTION ,
  DISJUNCTION , NEGATION , IMPLICATION , MODAL
}
 
enum class  ModalType {
  KNOWLEDGE = 1 , BELIEF , ALWAYS , SOMETIMES ,
  KNOWLEDGE = 1 , BELIEF , ALWAYS , SOMETIMES
}
 
enum  PluginLanguage { CPP = 0 , PYTHON = 1 , CPP = 0 , PYTHON = 1 }
 
enum  QueryFlag {
  QUERY_FLAG_ALL_SOLUTIONS = 1 << 0 , QUERY_FLAG_ONE_SOLUTION = 1 << 1 , QUERY_FLAG_PERSIST_SOLUTIONS = 1 << 2 , QUERY_FLAG_UNIQUE_SOLUTIONS = 1 << 3 ,
  QUERY_FLAG_ALL_SOLUTIONS = 1 << 0 , QUERY_FLAG_ONE_SOLUTION = 1 << 1 , QUERY_FLAG_PERSIST_SOLUTIONS = 1 << 2 , QUERY_FLAG_UNIQUE_SOLUTIONS = 1 << 3
}
 
enum class  TokenType : uint8_t { CONTROL_TOKEN = 0 , ANSWER_TOKEN , CONTROL_TOKEN = 0 , ANSWER_TOKEN }
 
enum class  GoalDrivenReasonerFeature { SupportsSimpleConjunctions = 0x01 , SupportsExtensionalGrounding = 0x02 , SupportsSimpleConjunctions = 0x01 , SupportsExtensionalGrounding = 0x02 }
 
enum class  GraphBuiltinType {
  Bind , Min , Max , Less ,
  LessOrEqual , Greater , GreaterOrEqual , Equal ,
  NotEqual , Bind , Min , Max ,
  Less , LessOrEqual , Greater , GreaterOrEqual ,
  Equal , NotEqual
}
 
enum class  GraphTermType {
  Sequence , Union , Pattern , Builtin ,
  Sequence , Union , Pattern , Builtin
}
 
enum class  SPARQLFlag : std::uint8_t { NOTHING = 1ul << 0 , NOT_EXISTS_UNSUPPORTED = 1ul << 1 , NOTHING = 1ul << 0 , NOT_EXISTS_UNSUPPORTED = 1ul << 1 }
 
enum class  FilterType {
  EQ = 0 , NEQ , LT , GT ,
  LEQ , GEQ , EQ = 0 , NEQ ,
  LT , GT , LEQ , GEQ
}
 
enum class  RedlandStorageType {
  MEMORY , HASHES , MYSQL , POSTGRESQL ,
  SQLITE , MEMORY , HASHES , MYSQL ,
  POSTGRESQL , SQLITE
}
 
enum class  RedlandHashType { MEMORY , BDB , MEMORY , BDB }
 
enum  ReificationFlag { IncludeOriginal = 1 << 0 , IncludeReified = 1 << 1 , IncludeOriginal = 1 << 0 , IncludeReified = 1 << 1 }
 
enum class  StorageFeature : std::uint8_t {
  NothingSpecial = 1ul << 0 , ReAssignment = 1ul << 2 , TripleContext = 1ul << 3 , NothingSpecial = 1ul << 0 ,
  ReAssignment = 1ul << 2 , TripleContext = 1ul << 3
}
 
enum class  AtomType { REGULAR , IRI , REGULAR , IRI }
 
enum class  AtomicType {
  ATOM , NUMERIC , STRING , ATOM ,
  NUMERIC , STRING
}
 
enum class  RDFNodeType {
  BLANK , IRI , LITERAL , BLANK ,
  IRI , LITERAL
}
 
enum class  TermType : uint8_t {
  ATOMIC = 0 , VARIABLE , FUNCTION , ATOMIC = 0 ,
  VARIABLE , FUNCTION
}
 
enum class  XSDType {
  STRING = 0 , BOOLEAN , DOUBLE , FLOAT ,
  INTEGER , LONG , SHORT , UNSIGNED_LONG ,
  UNSIGNED_INT , UNSIGNED_SHORT , NON_NEGATIVE_INTEGER , LAST ,
  STRING = 0 , BOOLEAN , DOUBLE , FLOAT ,
  INTEGER , LONG , SHORT , UNSIGNED_LONG ,
  UNSIGNED_INT , UNSIGNED_SHORT , NON_NEGATIVE_INTEGER , LAST
}
 The XSDType enum Enumeration of the XSD types. More...
 

Functions

FormulaPtr operator& (const FormulaPtr &phi, const FormulaPtr &psi)
 
FormulaPtr operator| (const FormulaPtr &phi, const FormulaPtr &psi)
 
FirstOrderLiteralPtr applyBindings (const FirstOrderLiteralPtr &lit, const Bindings &bindings)
 
FormulaPtr operator~ (const FormulaPtr &phi)
 
void InitKnowRob (int argc, char **argv, bool initPython=true)
 
void ShutdownKnowRob ()
 
char * getNameOfExecutable ()
 
void hashCombine (std::size_t &seed, const std::size_t &v)
 
void insertUnique (std::ostream &os)
 
std::ostream & operator<< (std::ostream &os, const Printable &printable)
 
AnswerPtr mergeAnswers (const AnswerPtr &a, const AnswerPtr &b, bool ignoreInconsistencies)
 
const std::shared_ptr< const AnswerDontKnow > & GenericDontKnow ()
 
const std::shared_ptr< const AnswerNo > & GenericNo ()
 
AnswerPtr mergeNegativeAnswers (const AnswerNoPtr &a, const AnswerNoPtr &b)
 
const std::shared_ptr< const AnswerYes > & GenericYes ()
 
AnswerPtr mergePositiveAnswers (const AnswerYesPtr &a, const AnswerYesPtr &b, bool ignoreInconsistencies)
 
QueryContextPtr DefaultQueryContext ()
 
QueryContextPtr OneSolutionContext ()
 
void operator>> (const std::shared_ptr< TokenBroadcaster > &a, const std::shared_ptr< TokenStream > &b)
 
ComputablePtr applyBindings (const ComputablePtr &lit, const Bindings &bindings)
 
GraphSelectorPtr DefaultGraphSelector ()
 
std::shared_ptr< GraphTermapplyBindings (const std::shared_ptr< GraphTerm > &term, const Bindings &bindings)
 
std::shared_ptr< GraphTermoperator& (const std::shared_ptr< GraphTerm > &a, const std::shared_ptr< GraphTerm > &b)
 
std::shared_ptr< GraphTermoperator| (const std::shared_ptr< GraphTerm > &a, const std::shared_ptr< GraphTerm > &b)
 
bool isClassIRI (std::string_view iri)
 
bool isInverseOfIRI (std::string_view iri)
 
bool isObjectPropertyIRI (std::string_view iri)
 
bool isDatatypePropertyIRI (std::string_view iri)
 
bool isAnnotationPropertyIRI (std::string_view iri)
 
bool isTransitivePropertyIRI (std::string_view iri)
 
bool isSymmetricPropertyIRI (std::string_view iri)
 
bool isReflexivePropertyIRI (std::string_view iri)
 
bool operator< (PrefixProbe a, std::string_view b)
 
bool operator< (std::string_view a, PrefixProbe b)
 
bool isTypeIRI (std::string_view iri)
 
bool isPropertyIRI (std::string_view iri)
 
bool isSubClassOfIRI (std::string_view iri)
 
bool isSubPropertyOfIRI (std::string_view iri)
 
SPARQLFlag operator| (SPARQLFlag a, SPARQLFlag b)
 
bool operator& (SPARQLFlag a, SPARQLFlag b)
 
FilterType inverseFilterType (FilterType op)
 
TriplePatternPtr applyBindings (const TriplePatternPtr &pat, const Bindings &bindings)
 
StorageFeature operator| (StorageFeature a, StorageFeature b)
 
bool operator& (StorageFeature a, StorageFeature b)
 
TermPtr applyBindings (const TermPtr &term, const Bindings &bindings)
 
FormulaPtr applyBindings (const FormulaPtr &phi, const Bindings &bindings)
 
IRIAtomPtr iri (std::string_view ns, std::string_view name)
 
RDFNodeType rdfNodeTypeGuess (std::string_view str)
 
XSDType xsdTypeFromIRI (std::string_view iri)
 
std::string_view xsdTypeToIRI (XSDType type)
 
std::shared_ptr< ThreadPoolDefaultThreadPool ()
 
void InitPythonPath ()
 
void InitKnowRob (char *nameOfExecutable, bool initPython)
 
template<>
std::shared_ptr< semweb::ClassVocabulary::define< semweb::Class > (const std::string_view &iri)
 
template<>
std::shared_ptr< semweb::PropertyVocabulary::define< semweb::Property > (const std::string_view &iri)
 

Variables

char * NAME_OF_EXECUTABLE = nullptr
 

Detailed Description

Register the backend with the BackendManager

Typedef Documentation

◆ AnswerDontKnowPtr

typedef std::shared_ptr< const AnswerDontKnow > knowrob::AnswerDontKnowPtr

Definition at line 33 of file AnswerDontKnow.h.

◆ AnswerHandler

typedef std::function< void(const AnswerPtr &)> knowrob::AnswerHandler

Definition at line 151 of file Answer.h.

◆ AnswerNoPtr

typedef std::shared_ptr< const AnswerNo > knowrob::AnswerNoPtr

Definition at line 74 of file AnswerNo.h.

◆ AnswerPtr

typedef std::shared_ptr< const Answer > knowrob::AnswerPtr

Definition at line 129 of file Answer.h.

◆ AnswerSet

A set that removes duplicate answers.

Definition at line 150 of file Answer.h.

◆ AnswerYesPtr

typedef std::shared_ptr< const AnswerYes > knowrob::AnswerYesPtr

Definition at line 108 of file AnswerYes.h.

◆ AtomPtr

typedef std::shared_ptr< Atom > knowrob::AtomPtr

Definition at line 69 of file Atom.h.

◆ BackendFactory

Definition at line 155 of file Storage.h.

◆ BindingsHandler

typedef std::function< void(const BindingsPtr &)> knowrob::BindingsHandler

Definition at line 152 of file Bindings.h.

◆ BindingsPtr

typedef std::shared_ptr< const Bindings > knowrob::BindingsPtr

Definition at line 151 of file Bindings.h.

◆ Boolean

A numeric term that holds a copy of a boolean.

Definition at line 226 of file Numeric.h.

◆ ComputablePtr

typedef std::shared_ptr< Computable > knowrob::ComputablePtr

Definition at line 45 of file Computable.h.

◆ ConjunctiveQueryPtr

typedef std::shared_ptr< ConjunctiveQuery > knowrob::ConjunctiveQueryPtr

Definition at line 54 of file ConjunctiveQuery.h.

◆ DataDrivenReasonerPtr

Definition at line 126 of file DataDrivenReasoner.h.

◆ DataSourceLoader

typedef std::function< bool(const DataSourcePtr &)> knowrob::DataSourceLoader

Definition at line 15 of file DataSourceHandler.h.

◆ DataSourcePtr

typedef std::shared_ptr< DataSource > knowrob::DataSourcePtr

Definition at line 107 of file DataSource.h.

◆ DefiningReasoner

Definition at line 149 of file GoalDrivenReasoner.h.

◆ DependencyNodePtr

typedef std::shared_ptr< DependencyNode > knowrob::DependencyNodePtr

Definition at line 54 of file DependencyGraph.h.

◆ Double

A numeric term that holds a copy of a double.

Definition at line 221 of file Numeric.h.

◆ FirstOrderLiteralPtr

Definition at line 64 of file FirstOrderLiteral.h.

◆ Float

A numeric term that holds a copy of a float.

Definition at line 216 of file Numeric.h.

◆ FormulaLabelPtr

typedef std::shared_ptr< FormulaLabel > knowrob::FormulaLabelPtr

Definition at line 100 of file Formula.h.

◆ FormulaPtr

typedef std::shared_ptr< Formula > knowrob::FormulaPtr

Definition at line 99 of file Formula.h.

◆ FunctionPtr

typedef std::shared_ptr< Function > knowrob::FunctionPtr

Definition at line 73 of file Function.h.

◆ GoalDrivenReasonerPtr

Definition at line 148 of file GoalDrivenReasoner.h.

◆ GoalPtr

typedef std::shared_ptr< Goal > knowrob::GoalPtr

Definition at line 84 of file Goal.h.

◆ GraphPathQueryPtr

typedef std::shared_ptr< GraphPathQuery > knowrob::GraphPathQueryPtr

Definition at line 48 of file GraphPathQuery.h.

◆ GraphQueryExpansionPtr

Definition at line 27 of file GraphQueryExpansion.h.

◆ GraphQueryPtr

typedef std::shared_ptr< GraphQuery > knowrob::GraphQueryPtr

Definition at line 65 of file GraphQuery.h.

◆ GraphRenamingMap

typedef std::map< std::string, std::string, std::less<> > knowrob::GraphRenamingMap

A map of entity names to their renamed counterparts.

Definition at line 18 of file GraphRenaming.h.

◆ GraphSelectorPtr

typedef std::shared_ptr< const GraphSelector > knowrob::GraphSelectorPtr

Definition at line 76 of file GraphSelector.h.

◆ Integer

A numeric term that holds a copy of an integer.

Definition at line 186 of file Numeric.h.

◆ IRIAtomPtr

typedef std::shared_ptr< IRIAtom > knowrob::IRIAtomPtr

Definition at line 57 of file IRIAtom.h.

◆ KnowledgeBasePtr

typedef std::shared_ptr< KnowledgeBase > knowrob::KnowledgeBasePtr

Definition at line 233 of file KnowledgeBase.h.

◆ Long

A numeric term that holds a copy of a long.

Definition at line 191 of file Numeric.h.

◆ ModalOperatorPtr

typedef std::shared_ptr< const ModalOperator > knowrob::ModalOperatorPtr

Definition at line 136 of file ModalOperator.h.

◆ MutableTripleContainerPtr

Definition at line 194 of file TripleContainer.h.

◆ MutableTripleHandler

typedef std::function< void(const MutableTripleContainerPtr &)> knowrob::MutableTripleHandler

Definition at line 195 of file TripleContainer.h.

◆ NamedBackend

Definition at line 156 of file Storage.h.

◆ NamedReasoner

Definition at line 102 of file Reasoner.h.

◆ ObserverManagerPtr

typedef std::shared_ptr< ObserverManager > knowrob::ObserverManagerPtr

Definition at line 79 of file ObserverManager.h.

◆ ObserverPtr

typedef std::shared_ptr< Observer > knowrob::ObserverPtr

Definition at line 42 of file Observer.h.

◆ OptionalStringRef

typedef std::optional< std::reference_wrapper< const std::string > > knowrob::OptionalStringRef

Definition at line 15 of file PrefixRegistry.h.

◆ PerspectivePtr

typedef std::shared_ptr< Perspective > knowrob::PerspectivePtr

Definition at line 68 of file Perspective.h.

◆ PredicatePtr

typedef std::shared_ptr< Predicate > knowrob::PredicatePtr

Definition at line 77 of file Predicate.h.

◆ QueryableBackendPtr

typedef std::shared_ptr< QueryableStorage > knowrob::QueryableBackendPtr

Definition at line 133 of file QueryableStorage.h.

◆ QueryContextPtr

typedef std::shared_ptr< const QueryContext > knowrob::QueryContextPtr

Definition at line 41 of file QueryContext.h.

◆ RDFGoalPtr

typedef std::shared_ptr< RDFGoal > knowrob::RDFGoalPtr

Definition at line 42 of file RDFGoal.h.

◆ ReasonerFactory

Definition at line 103 of file Reasoner.h.

◆ ReasonerPtr

typedef std::shared_ptr< Reasoner > knowrob::ReasonerPtr

Definition at line 104 of file Reasoner.h.

◆ ReifiedNames

typedef std::shared_ptr< std::vector< IRIAtomPtr > > knowrob::ReifiedNames

Definition at line 15 of file ReificationContainer.h.

◆ ReifiedTriplePtr

typedef std::shared_ptr< ReifiedTriple > knowrob::ReifiedTriplePtr

Definition at line 75 of file ReifiedTriple.h.

◆ ResourceCounter

typedef std::function< void(std::string_view, uint64_t)> knowrob::ResourceCounter

Definition at line 20 of file QueryableStorage.h.

◆ Short

A numeric term that holds a copy of a short.

Definition at line 196 of file Numeric.h.

◆ SimpleConjunctionPtr

Definition at line 37 of file SimpleConjunction.h.

◆ SPARQLFlags

Definition at line 22 of file SPARQLQuery.h.

◆ StorageFeatures

Definition at line 34 of file Storage.h.

◆ StoragePtr

typedef std::shared_ptr< Storage > knowrob::StoragePtr

Definition at line 154 of file Storage.h.

◆ String

typedef StringTemplate< std::string > knowrob::String

A string term that holds a copy of a string.

Definition at line 56 of file String.h.

◆ StringView

typedef StringTemplate< std::string_view > knowrob::StringView

A string term that holds a view on a string which is allocated elsewhere.

Note
Make sure the string is not deallocated before the string term is destroyed.

Definition at line 61 of file String.h.

◆ TermPtr

typedef std::shared_ptr< Term > knowrob::TermPtr

Definition at line 117 of file Term.h.

◆ TimePoint

typedef std::chrono::time_point< std::chrono::system_clock, std::chrono::seconds > knowrob::TimePoint

A time point in seconds.

Definition at line 16 of file TimePoint.h.

◆ TokenBufferPtr

typedef std::shared_ptr< TokenBuffer > knowrob::TokenBufferPtr

Definition at line 43 of file TokenBuffer.h.

◆ TokenMap

typedef std::map< uint32_t, std::vector< TokenPtr > > knowrob::TokenMap

Definition at line 75 of file Token.h.

◆ TokenPtr

typedef std::shared_ptr< const Token > knowrob::TokenPtr

Definition at line 74 of file Token.h.

◆ TripleContainerPtr

typedef std::shared_ptr< TripleContainer > knowrob::TripleContainerPtr

Definition at line 190 of file TripleContainer.h.

◆ TripleCopy

typedef TripleTemplate< std::string > knowrob::TripleCopy

A Triple that holds a copy of the data.

Definition at line 577 of file Triple.h.

◆ TripleFilter

typedef std::function< bool(const Triple &)> knowrob::TripleFilter

Definition at line 197 of file TripleContainer.h.

◆ TripleHandler

typedef std::function< void(const TripleContainerPtr &)> knowrob::TripleHandler

Definition at line 191 of file TripleContainer.h.

◆ TriplePatternPtr

typedef std::shared_ptr< TriplePattern > knowrob::TriplePatternPtr

A shared pointer to a framed triple pattern.

Definition at line 275 of file TriplePattern.h.

◆ TripleView

typedef TripleTemplate< std::string_view > knowrob::TripleView

A Triple with eternally allocated data.

Definition at line 581 of file Triple.h.

◆ TripleVisitor

typedef std::function< void(const TriplePtr &)> knowrob::TripleVisitor

Definition at line 192 of file TripleContainer.h.

◆ UnsignedInt

A numeric term that holds a copy of an unsigned long.

Definition at line 206 of file Numeric.h.

◆ UnsignedLong

A numeric term that holds a copy of an unsigned integer.

Definition at line 201 of file Numeric.h.

◆ UnsignedShort

A numeric term that holds a copy of an unsigned short.

Definition at line 211 of file Numeric.h.

◆ VariablePtr

typedef std::shared_ptr< Variable > knowrob::VariablePtr

Definition at line 60 of file Variable.h.

◆ VersionedOriginPtr

typedef std::shared_ptr< VersionedOrigin > knowrob::VersionedOriginPtr

Definition at line 42 of file VersionedOrigin.h.

◆ VocabularyPtr

typedef std::shared_ptr< Vocabulary > knowrob::VocabularyPtr

Definition at line 233 of file Vocabulary.h.

Enumeration Type Documentation

◆ AtomicType [1/2]

enum knowrob::AtomicType
strong

The type of an atomic term.

Enumerator
ATOM 

an atom

NUMERIC 

a numeric term

STRING 

a string

ATOM 

an atom

NUMERIC 

a numeric term

STRING 

a string

Definition at line 17 of file Atomic.h.

◆ AtomicType [2/2]

enum knowrob::AtomicType
strong

The type of an atomic term.

Enumerator
ATOM 

an atom

NUMERIC 

a numeric term

STRING 

a string

ATOM 

an atom

NUMERIC 

a numeric term

STRING 

a string

Definition at line 17 of file Atomic.h.

17  {
19  ATOM,
21  NUMERIC,
23  STRING
24  };

◆ AtomType [1/2]

enum knowrob::AtomType
strong

The type of an atom.

Enumerator
REGULAR 

a regular atom

IRI 

an IRI node

REGULAR 

a regular atom

IRI 

an IRI node

Definition at line 18 of file Atom.h.

18  {
20  REGULAR,
22  IRI
23  };

◆ AtomType [2/2]

enum knowrob::AtomType
strong

The type of an atom.

Enumerator
REGULAR 

a regular atom

IRI 

an IRI node

REGULAR 

a regular atom

IRI 

an IRI node

Definition at line 18 of file Atom.h.

18  {
20  REGULAR,
22  IRI
23  };

◆ DataSourceType [1/2]

Some data source types that receive special handling in the knowledge base.

Enumerator
ONTOLOGY 
UNSPECIFIED 
ONTOLOGY 
UNSPECIFIED 

Definition at line 17 of file DataSource.h.

◆ DataSourceType [2/2]

Some data source types that receive special handling in the knowledge base.

Enumerator
ONTOLOGY 
UNSPECIFIED 
ONTOLOGY 
UNSPECIFIED 

Definition at line 17 of file DataSource.h.

17  {
18  ONTOLOGY,
20  };

◆ FilterType [1/2]

enum knowrob::FilterType
strong

Unary operators that can be applied on terms.

Enumerator
EQ 
NEQ 
LT 
GT 
LEQ 
GEQ 
EQ 
NEQ 
LT 
GT 
LEQ 
GEQ 

Definition at line 23 of file TriplePattern.h.

◆ FilterType [2/2]

enum knowrob::FilterType
strong

Unary operators that can be applied on terms.

Enumerator
EQ 
NEQ 
LT 
GT 
LEQ 
GEQ 
EQ 
NEQ 
LT 
GT 
LEQ 
GEQ 

Definition at line 23 of file TriplePattern.h.

23  {
24  EQ = 0,
25  NEQ,
26  LT,
27  GT,
28  LEQ,
29  GEQ
30  };

◆ FormulaType [1/2]

enum knowrob::FormulaType
strong

The type of a formula.

Enumerator
PREDICATE 
CONJUNCTION 
DISJUNCTION 
NEGATION 
IMPLICATION 
MODAL 
PREDICATE 
CONJUNCTION 
DISJUNCTION 
NEGATION 
IMPLICATION 
MODAL 

Definition at line 17 of file Formula.h.

17  {
18  // A formula of the form `P(t_1,..,t_n)` where each ti is a term
19  // and "P" is a n-ary predicate symbol (or functor).
20  PREDICATE,
21  // A formula of the form `phi_1 AND ... AND phi_n` where each phi_i is a formula.
23  // A formula of the form `phi_1 OR ... OR phi_n` where each phi_i is a formula.
25  NEGATION,
27  MODAL
28  };
PREDICATE(mng_collections, 2)
Definition: mongo_kb.cpp:48

◆ FormulaType [2/2]

enum knowrob::FormulaType
strong

The type of a formula.

Enumerator
PREDICATE 
CONJUNCTION 
DISJUNCTION 
NEGATION 
IMPLICATION 
MODAL 
PREDICATE 
CONJUNCTION 
DISJUNCTION 
NEGATION 
IMPLICATION 
MODAL 

Definition at line 17 of file Formula.h.

17  {
18  // A formula of the form `P(t_1,..,t_n)` where each ti is a term
19  // and "P" is a n-ary predicate symbol (or functor).
20  PREDICATE,
21  // A formula of the form `phi_1 AND ... AND phi_n` where each phi_i is a formula.
23  // A formula of the form `phi_1 OR ... OR phi_n` where each phi_i is a formula.
25  NEGATION,
27  MODAL
28  };

◆ GoalDrivenReasonerFeature [1/2]

An enumeration of reasoner features for goal-driven reasoning.

Enumerator
SupportsSimpleConjunctions 

The reasoner supports simple conjunctions. A simple conjunction is a conjunction of literals. If this feature is not enabled, the reasoner will only receive queries that contain a single literal.

SupportsExtensionalGrounding 

The reasoner can ground literals in extensional knowledge, i.e. in the factual data contained in its storage backend. Note that if this feature is enabled, the reasoner is expected to provide all extensional groundings for a literal if not told otherwise.

SupportsSimpleConjunctions 

The reasoner supports simple conjunctions. A simple conjunction is a conjunction of literals. If this feature is not enabled, the reasoner will only receive queries that contain a single literal.

SupportsExtensionalGrounding 

The reasoner can ground literals in extensional knowledge, i.e. in the factual data contained in its storage backend. Note that if this feature is enabled, the reasoner is expected to provide all extensional groundings for a literal if not told otherwise.

Definition at line 17 of file GoalDrivenReasoner.h.

◆ GoalDrivenReasonerFeature [2/2]

An enumeration of reasoner features for goal-driven reasoning.

Enumerator
SupportsSimpleConjunctions 

The reasoner supports simple conjunctions. A simple conjunction is a conjunction of literals. If this feature is not enabled, the reasoner will only receive queries that contain a single literal.

SupportsExtensionalGrounding 

The reasoner can ground literals in extensional knowledge, i.e. in the factual data contained in its storage backend. Note that if this feature is enabled, the reasoner is expected to provide all extensional groundings for a literal if not told otherwise.

SupportsSimpleConjunctions 

The reasoner supports simple conjunctions. A simple conjunction is a conjunction of literals. If this feature is not enabled, the reasoner will only receive queries that contain a single literal.

SupportsExtensionalGrounding 

The reasoner can ground literals in extensional knowledge, i.e. in the factual data contained in its storage backend. Note that if this feature is enabled, the reasoner is expected to provide all extensional groundings for a literal if not told otherwise.

Definition at line 17 of file GoalDrivenReasoner.h.

17  {
32  };

◆ GraphBuiltinType [1/2]

The type of a builtin.

Enumerator
Bind 
Min 
Max 
Less 
LessOrEqual 
Greater 
GreaterOrEqual 
Equal 
NotEqual 
Bind 
Min 
Max 
Less 
LessOrEqual 
Greater 
GreaterOrEqual 
Equal 
NotEqual 

Definition at line 22 of file GraphBuiltin.h.

22  {
23  Bind, // Bind a value to a variable in the query pipeline.
24  Min, // Calculate the minimum of two terms.
25  Max, // Calculate the maximum of two terms.
26  Less, // Check if the first term is less than the second term.
27  LessOrEqual, // Check if the first term is less than or equal to the second term.
28  Greater, // Check if the first term is greater than the second term.
29  GreaterOrEqual, // Check if the first term is greater than or equal to the second term.
30  Equal, // Check if the first term is equal to the second term.
31  NotEqual // Check if the first term is not equal to the second term.
32  };

◆ GraphBuiltinType [2/2]

The type of a builtin.

Enumerator
Bind 
Min 
Max 
Less 
LessOrEqual 
Greater 
GreaterOrEqual 
Equal 
NotEqual 
Bind 
Min 
Max 
Less 
LessOrEqual 
Greater 
GreaterOrEqual 
Equal 
NotEqual 

Definition at line 22 of file GraphBuiltin.h.

22  {
23  Bind, // Bind a value to a variable in the query pipeline.
24  Min, // Calculate the minimum of two terms.
25  Max, // Calculate the maximum of two terms.
26  Less, // Check if the first term is less than the second term.
27  LessOrEqual, // Check if the first term is less than or equal to the second term.
28  Greater, // Check if the first term is greater than the second term.
29  GreaterOrEqual, // Check if the first term is greater than or equal to the second term.
30  Equal, // Check if the first term is equal to the second term.
31  NotEqual // Check if the first term is not equal to the second term.
32  };

◆ GraphTermType [1/2]

The type of a graph term.

Enumerator
Sequence 
Union 
Pattern 
Builtin 
Sequence 
Union 
Pattern 
Builtin 

Definition at line 16 of file GraphTerm.h.

◆ GraphTermType [2/2]

The type of a graph term.

Enumerator
Sequence 
Union 
Pattern 
Builtin 
Sequence 
Union 
Pattern 
Builtin 

Definition at line 16 of file GraphTerm.h.

16  {
17  Sequence,
18  Union,
19  Pattern,
20  Builtin
21  };

◆ ModalType [1/2]

enum knowrob::ModalType
strong

The type of a modal operator.

Enumerator
KNOWLEDGE 
BELIEF 
ALWAYS 
SOMETIMES 
KNOWLEDGE 
BELIEF 
ALWAYS 
SOMETIMES 

Definition at line 20 of file ModalOperator.h.

20  {
21  KNOWLEDGE = 1,
22  BELIEF,
23  ALWAYS,
24  SOMETIMES
25  };
@ KNOWLEDGE
@ BELIEF

◆ ModalType [2/2]

enum knowrob::ModalType
strong

The type of a modal operator.

Enumerator
KNOWLEDGE 
BELIEF 
ALWAYS 
SOMETIMES 
KNOWLEDGE 
BELIEF 
ALWAYS 
SOMETIMES 

Definition at line 20 of file ModalOperator.h.

20  {
21  KNOWLEDGE = 1,
22  BELIEF,
23  ALWAYS,
24  SOMETIMES
25  };

◆ PluginLanguage [1/2]

An enumeration of plugin languages.

Enumerator
CPP 
PYTHON 
CPP 
PYTHON 

Definition at line 16 of file NamedPlugin.h.

16  {
17  CPP = 0,
18  PYTHON = 1,
19  };

◆ PluginLanguage [2/2]

An enumeration of plugin languages.

Enumerator
CPP 
PYTHON 
CPP 
PYTHON 

Definition at line 16 of file NamedPlugin.h.

16  {
17  CPP = 0,
18  PYTHON = 1,
19  };

◆ QueryFlag [1/2]

Flags for controlling query evaluation.

Enumerator
QUERY_FLAG_ALL_SOLUTIONS 

Query all solutions.

QUERY_FLAG_ONE_SOLUTION 

Query only one solution.

QUERY_FLAG_PERSIST_SOLUTIONS 

Persist solutions in the data base.

QUERY_FLAG_UNIQUE_SOLUTIONS 

Filter redundant solutions.

QUERY_FLAG_ALL_SOLUTIONS 

Query all solutions.

QUERY_FLAG_ONE_SOLUTION 

Query only one solution.

QUERY_FLAG_PERSIST_SOLUTIONS 

Persist solutions in the data base.

QUERY_FLAG_UNIQUE_SOLUTIONS 

Filter redundant solutions.

Definition at line 13 of file QueryFlag.h.

13  {
15  QUERY_FLAG_ALL_SOLUTIONS = 1 << 0,
17  QUERY_FLAG_ONE_SOLUTION = 1 << 1,
22  };
@ QUERY_FLAG_ONE_SOLUTION
Definition: QueryFlag.h:17
@ QUERY_FLAG_ALL_SOLUTIONS
Definition: QueryFlag.h:15
@ QUERY_FLAG_UNIQUE_SOLUTIONS
Definition: QueryFlag.h:21
@ QUERY_FLAG_PERSIST_SOLUTIONS
Definition: QueryFlag.h:19

◆ QueryFlag [2/2]

Flags for controlling query evaluation.

Enumerator
QUERY_FLAG_ALL_SOLUTIONS 

Query all solutions.

QUERY_FLAG_ONE_SOLUTION 

Query only one solution.

QUERY_FLAG_PERSIST_SOLUTIONS 

Persist solutions in the data base.

QUERY_FLAG_UNIQUE_SOLUTIONS 

Filter redundant solutions.

QUERY_FLAG_ALL_SOLUTIONS 

Query all solutions.

QUERY_FLAG_ONE_SOLUTION 

Query only one solution.

QUERY_FLAG_PERSIST_SOLUTIONS 

Persist solutions in the data base.

QUERY_FLAG_UNIQUE_SOLUTIONS 

Filter redundant solutions.

Definition at line 13 of file QueryFlag.h.

13  {
15  QUERY_FLAG_ALL_SOLUTIONS = 1 << 0,
17  QUERY_FLAG_ONE_SOLUTION = 1 << 1,
22  };

◆ RDFNodeType [1/2]

enum knowrob::RDFNodeType
strong

The type of an RDF node.

Enumerator
BLANK 

blank node

IRI 

IRI

LITERAL 

typed literal

BLANK 

blank node

IRI 

IRI

LITERAL 

typed literal

Definition at line 15 of file RDFNode.h.

15  {
17  BLANK,
19  IRI,
21  LITERAL
22  };

◆ RDFNodeType [2/2]

enum knowrob::RDFNodeType
strong

The type of an RDF node.

Enumerator
BLANK 

blank node

IRI 

IRI

LITERAL 

typed literal

BLANK 

blank node

IRI 

IRI

LITERAL 

typed literal

Definition at line 15 of file RDFNode.h.

15  {
17  BLANK,
19  IRI,
21  LITERAL
22  };

◆ RedlandHashType [1/2]

Redland hash types used by the "hashes" storage type.

Enumerator
MEMORY 
BDB 
MEMORY 
BDB 

Definition at line 38 of file RedlandModel.h.

38  {
39  // The default hash type.
40  MEMORY,
41  // The Berkeley DB hash type.
42  BDB
43  };

◆ RedlandHashType [2/2]

Redland hash types used by the "hashes" storage type.

Enumerator
MEMORY 
BDB 
MEMORY 
BDB 

Definition at line 38 of file RedlandModel.h.

38  {
39  // The default hash type.
40  MEMORY,
41  // The Berkeley DB hash type.
42  BDB
43  };

◆ RedlandStorageType [1/2]

Redland storage types.

See also
https://librdf.org/docs/api/redland-storage-modules.html
Enumerator
MEMORY 
HASHES 
MYSQL 
POSTGRESQL 
SQLITE 
MEMORY 
HASHES 
MYSQL 
POSTGRESQL 
SQLITE 

Definition at line 23 of file RedlandModel.h.

23  {
24  // This module is always present (cannot be removed) and provides a simple and fast in-memory store with no persistence.
25  MEMORY,
26  // This module is always present (cannot be removed) and provides indexed storage using Redland Triple stores
27  HASHES,
28  // This module is compiled in when MySQL 3 or 4 is available.
29  MYSQL,
30  // This module is based on the MySQL store and is compiled in when PostgreSQL is available.
31  POSTGRESQL,
32  // This module provides storage via the SQLite relational database when available and supports SQLite V2 and V3.
33  SQLITE
34  };

◆ RedlandStorageType [2/2]

Redland storage types.

See also
https://librdf.org/docs/api/redland-storage-modules.html
Enumerator
MEMORY 
HASHES 
MYSQL 
POSTGRESQL 
SQLITE 
MEMORY 
HASHES 
MYSQL 
POSTGRESQL 
SQLITE 

Definition at line 23 of file RedlandModel.h.

23  {
24  // This module is always present (cannot be removed) and provides a simple and fast in-memory store with no persistence.
25  MEMORY,
26  // This module is always present (cannot be removed) and provides indexed storage using Redland Triple stores
27  HASHES,
28  // This module is compiled in when MySQL 3 or 4 is available.
29  MYSQL,
30  // This module is based on the MySQL store and is compiled in when PostgreSQL is available.
31  POSTGRESQL,
32  // This module provides storage via the SQLite relational database when available and supports SQLite V2 and V3.
33  SQLITE
34  };

◆ ReificationFlag [1/2]

Enumerator
IncludeOriginal 
IncludeReified 
IncludeOriginal 
IncludeReified 

Definition at line 16 of file ReifiedQuery.h.

16  {
17  IncludeOriginal = 1 << 0,
18  IncludeReified = 1 << 1,
19  };
@ IncludeReified
Definition: ReifiedQuery.h:18
@ IncludeOriginal
Definition: ReifiedQuery.h:17

◆ ReificationFlag [2/2]

Enumerator
IncludeOriginal 
IncludeReified 
IncludeOriginal 
IncludeReified 

Definition at line 16 of file ReifiedQuery.h.

16  {
17  IncludeOriginal = 1 << 0,
18  IncludeReified = 1 << 1,
19  };

◆ SPARQLFlag [1/2]

enum knowrob::SPARQLFlag : std::uint8_t
strong

A flag that indicates whether a SPARQL feature is supported or not.

Enumerator
NOTHING 
NOT_EXISTS_UNSUPPORTED 
NOTHING 
NOT_EXISTS_UNSUPPORTED 

Definition at line 18 of file SPARQLQuery.h.

18  : std::uint8_t {
19  NOTHING = 1ul << 0,
20  NOT_EXISTS_UNSUPPORTED = 1ul << 1
21  };

◆ SPARQLFlag [2/2]

enum knowrob::SPARQLFlag : std::uint8_t
strong

A flag that indicates whether a SPARQL feature is supported or not.

Enumerator
NOTHING 
NOT_EXISTS_UNSUPPORTED 
NOTHING 
NOT_EXISTS_UNSUPPORTED 

Definition at line 18 of file SPARQLQuery.h.

18  : std::uint8_t {
19  NOTHING = 1ul << 0,
20  NOT_EXISTS_UNSUPPORTED = 1ul << 1
21  };

◆ StorageFeature [1/2]

enum knowrob::StorageFeature : std::uint8_t
strong

A flag that indicates whether a SPARQL feature is supported or not.

Enumerator
NothingSpecial 
ReAssignment 
TripleContext 
NothingSpecial 
ReAssignment 
TripleContext 

Definition at line 24 of file Storage.h.

24  : std::uint8_t {
25  // A flag that indicates that nothing special is supported.
26  NothingSpecial = 1ul << 0,
27  // A flag that indicates that re-assignment of variables within query pipelines is supported.
28  ReAssignment = 1ul << 2,
29  // A flag that indicates that triple context is supported.
30  // If this flag is not set, statements with additional context information first must be reified
31  // before they can be handled by this backend.
32  TripleContext = 1ul << 3
33  };

◆ StorageFeature [2/2]

enum knowrob::StorageFeature : std::uint8_t
strong

A flag that indicates whether a SPARQL feature is supported or not.

Enumerator
NothingSpecial 
ReAssignment 
TripleContext 
NothingSpecial 
ReAssignment 
TripleContext 

Definition at line 24 of file Storage.h.

24  : std::uint8_t {
25  // A flag that indicates that nothing special is supported.
26  NothingSpecial = 1ul << 0,
27  // A flag that indicates that re-assignment of variables within query pipelines is supported.
28  ReAssignment = 1ul << 2,
29  // A flag that indicates that triple context is supported.
30  // If this flag is not set, statements with additional context information first must be reified
31  // before they can be handled by this backend.
32  TripleContext = 1ul << 3
33  };

◆ TermType [1/2]

enum knowrob::TermType : uint8_t
strong

The type of a term.

Enumerator
ATOMIC 

atomic term

VARIABLE 

a variable

FUNCTION 

compound term with functor and arguments

ATOMIC 

atomic term

VARIABLE 

a variable

FUNCTION 

compound term with functor and arguments

Definition at line 18 of file Term.h.

18  : uint8_t {
20  ATOMIC = 0,
22  VARIABLE,
24  FUNCTION
25  };

◆ TermType [2/2]

enum knowrob::TermType : uint8_t
strong

The type of a term.

Enumerator
ATOMIC 

atomic term

VARIABLE 

a variable

FUNCTION 

compound term with functor and arguments

ATOMIC 

atomic term

VARIABLE 

a variable

FUNCTION 

compound term with functor and arguments

Definition at line 18 of file Term.h.

18  : uint8_t {
20  ATOMIC = 0,
22  VARIABLE,
24  FUNCTION
25  };

◆ TokenType [1/2]

enum knowrob::TokenType : uint8_t
strong

The type of a token.

Enumerator
CONTROL_TOKEN 
ANSWER_TOKEN 
CONTROL_TOKEN 
ANSWER_TOKEN 

Definition at line 19 of file Token.h.

19  : uint8_t {
20  // A control token is used to control the evaluation pipeline.
21  CONTROL_TOKEN = 0,
22  // An answer token is the result of a query evaluation.
24  };

◆ TokenType [2/2]

enum knowrob::TokenType : uint8_t
strong

The type of a token.

Enumerator
CONTROL_TOKEN 
ANSWER_TOKEN 
CONTROL_TOKEN 
ANSWER_TOKEN 

Definition at line 19 of file Token.h.

19  : uint8_t {
20  // A control token is used to control the evaluation pipeline.
21  CONTROL_TOKEN = 0,
22  // An answer token is the result of a query evaluation.
24  };

◆ XSDType [1/2]

enum knowrob::XSDType
strong

The XSDType enum Enumeration of the XSD types.

Enumerator
STRING 

xsd:string

BOOLEAN 

xsd:boolean

DOUBLE 

xsd:double

FLOAT 

xsd:float

INTEGER 

xsd:integer

LONG 

xsd:long

SHORT 

xsd:short

UNSIGNED_LONG 

xsd:unsignedLong

UNSIGNED_INT 

xsd:unsignedInt

UNSIGNED_SHORT 

xsd:unsignedShort

NON_NEGATIVE_INTEGER 

xsd:nonNegativeInteger

LAST 
STRING 

xsd:string

BOOLEAN 

xsd:boolean

DOUBLE 

xsd:double

FLOAT 

xsd:float

INTEGER 

xsd:integer

LONG 

xsd:long

SHORT 

xsd:short

UNSIGNED_LONG 

xsd:unsignedLong

UNSIGNED_INT 

xsd:unsignedInt

UNSIGNED_SHORT 

xsd:unsignedShort

NON_NEGATIVE_INTEGER 

xsd:nonNegativeInteger

LAST 

Definition at line 16 of file XSDType.h.

◆ XSDType [2/2]

enum knowrob::XSDType
strong

The XSDType enum Enumeration of the XSD types.

Enumerator
STRING 

xsd:string

BOOLEAN 

xsd:boolean

DOUBLE 

xsd:double

FLOAT 

xsd:float

INTEGER 

xsd:integer

LONG 

xsd:long

SHORT 

xsd:short

UNSIGNED_LONG 

xsd:unsignedLong

UNSIGNED_INT 

xsd:unsignedInt

UNSIGNED_SHORT 

xsd:unsignedShort

NON_NEGATIVE_INTEGER 

xsd:nonNegativeInteger

LAST 
STRING 

xsd:string

BOOLEAN 

xsd:boolean

DOUBLE 

xsd:double

FLOAT 

xsd:float

INTEGER 

xsd:integer

LONG 

xsd:long

SHORT 

xsd:short

UNSIGNED_LONG 

xsd:unsignedLong

UNSIGNED_INT 

xsd:unsignedInt

UNSIGNED_SHORT 

xsd:unsignedShort

NON_NEGATIVE_INTEGER 

xsd:nonNegativeInteger

LAST 

Definition at line 16 of file XSDType.h.

16  {
18  STRING = 0,
20  BOOLEAN,
22  DOUBLE,
24  FLOAT,
26  INTEGER,
28  LONG,
30  SHORT,
39  LAST // keep last
40  };

Function Documentation

◆ applyBindings() [1/6]

ComputablePtr knowrob::applyBindings ( const ComputablePtr lit,
const Bindings bindings 
)

Apply a substitution to a computable.

Parameters
litthe computable literal.
bindingsthe substitution.
Returns
the literal with the substitution applied.

Definition at line 18 of file Computable.cpp.

18  {
19  auto predicate = std::static_pointer_cast<Predicate>(applyBindings(lit->predicate(), bindings));
20  if (predicate != lit->predicate()) {
21  return std::make_shared<Computable>(predicate, lit->isNegated(), lit->reasonerList());
22  }
23  else {
24  return lit;
25  }
26  }
PredicateRule & predicate()
Definition: formula.cpp:221
FirstOrderLiteralPtr applyBindings(const FirstOrderLiteralPtr &lit, const Bindings &bindings)

◆ applyBindings() [2/6]

FirstOrderLiteralPtr knowrob::applyBindings ( const FirstOrderLiteralPtr lit,
const Bindings bindings 
)

Apply a substitution to a FOL literal.

Parameters
litthe FOL literal.
bindingsthe substitution.
Returns
the literal with the substitution applied.

Definition at line 30 of file FirstOrderLiteral.cpp.

30  {
31  auto predicate = std::static_pointer_cast<Predicate>(applyBindings(lit->predicate(), bindings));
32  if (predicate != lit->predicate()) {
33  return std::make_shared<FirstOrderLiteral>(predicate, lit->isNegated());
34  }
35  else {
36  return lit;
37  }
38  }

◆ applyBindings() [3/6]

FormulaPtr knowrob::applyBindings ( const FormulaPtr phi,
const Bindings bindings 
)

Apply a substitution to a formula.

Parameters
phia formula.
bindingsa substitution.
Returns
the formula with the substitution applied.

Definition at line 187 of file Bindings.cpp.

187  { //NOLINT(misc-no-recursion)
188  if (phi->isGround()) {
189  return phi;
190  }
191  switch (phi->type()) {
192  case FormulaType::MODAL: {
193  auto modal = std::static_pointer_cast<ModalFormula>(phi);
194  auto inner = applyBindings(modal->modalFormula(), bindings);
195  if (inner == modal->modalFormula()) {
196  return modal;
197  } else {
198  return std::make_shared<ModalFormula>(modal->modalOperator(), inner);
199  }
200  }
201  case FormulaType::IMPLICATION: {
202  auto implication = std::static_pointer_cast<Implication>(phi);
203  auto antecedent = applyBindings(implication->antecedent(), bindings);
204  auto consequent = applyBindings(implication->consequent(), bindings);
205  if (antecedent == implication->antecedent() && consequent == implication->consequent()) {
206  return implication;
207  } else {
208  return std::make_shared<Implication>(antecedent, consequent);
209  }
210  }
211  case FormulaType::NEGATION: {
212  auto negation = std::static_pointer_cast<Negation>(phi);
213  auto negated = applyBindings(negation->negatedFormula(), bindings);
214  if (negated == negation->negatedFormula()) {
215  return negation;
216  } else {
217  return std::make_shared<Negation>(negated);
218  }
219  }
220  case FormulaType::CONJUNCTION:
221  return applyCompoundBindings<Conjunction>(std::static_pointer_cast<Conjunction>(phi), bindings);
222  case FormulaType::DISJUNCTION:
223  return applyCompoundBindings<Disjunction>(std::static_pointer_cast<Disjunction>(phi), bindings);
224  case FormulaType::PREDICATE: {
225  auto predicate = std::static_pointer_cast<Predicate>(phi);
226  auto args = predicate->arguments();
227  auto newArgs = std::vector<TermPtr>(args.size());
228  auto hasNewArg = false;
229  for (uint32_t i = 0; i < args.size(); i++) {
230  auto arg = applyBindings(args[i], bindings);
231  if (arg != args[i]) {
232  hasNewArg = true;
233  }
234  newArgs[i] = arg;
235  }
236  if (!hasNewArg) {
237  return predicate;
238  } else {
239  return std::make_shared<Predicate>(predicate->functor(), newArgs);
240  }
241  }
242  }
243  return phi;
244  }

◆ applyBindings() [4/6]

std::shared_ptr< GraphTerm > knowrob::applyBindings ( const std::shared_ptr< GraphTerm > &  term,
const Bindings bindings 
)

Definition at line 18 of file GraphTerm.cpp.

18  {
19  switch (term->termType()) {
20  case GraphTermType::Pattern: {
21  auto pattern = std::static_pointer_cast<GraphPattern>(term);
22  auto orig = pattern->value();
23  auto substituted = applyBindings(orig, bindings);
24  if (orig != substituted) {
25  return std::make_shared<GraphPattern>(substituted);
26  }
27  break;
28  }
29  case GraphTermType::Builtin: {
30  auto builtin = std::static_pointer_cast<GraphBuiltin>(term);
31  auto args = builtin->arguments();
32  std::vector<TermPtr> newArgs;
33  for (const auto &arg: args) {
34  newArgs.push_back(applyBindings(arg, bindings));
35  }
36  return std::make_shared<GraphBuiltin>(builtin->builtinType(),
37  builtin->functor(),
38  newArgs,
39  builtin->bindVar());
40  }
41  case GraphTermType::Sequence: {
42  auto sequence = std::static_pointer_cast<GraphSequence>(term);
43  std::vector<std::shared_ptr<GraphTerm>> newTerms;
44  for (const auto &subTerm: sequence->terms()) {
45  newTerms.push_back(applyBindings(subTerm, bindings));
46  }
47  return std::make_shared<GraphSequence>(newTerms);
48  }
49  case GraphTermType::Union: {
50  auto unionTerm = std::static_pointer_cast<GraphUnion>(term);
51  std::vector<std::shared_ptr<GraphTerm>> newTerms;
52  for (const auto &subTerm: unionTerm->terms()) {
53  newTerms.push_back(applyBindings(subTerm, bindings));
54  }
55  return std::make_shared<GraphUnion>(newTerms);
56  }
57  }
58  return term;
59  }
GraphTermRule & pattern()
Definition: graph.cpp:23
TermRule & term()
Definition: terms.cpp:136

◆ applyBindings() [5/6]

TermPtr knowrob::applyBindings ( const TermPtr term,
const Bindings bindings 
)

Apply a substitution to a term.

Parameters
terma term.
bindingsa substitution.
Returns
the term with the substitution applied.

Definition at line 246 of file Bindings.cpp.

246  { //NOLINT
247  if (t->isGround()) {
248  return t;
249  }
250  switch (t->termType()) {
251  case TermType::ATOMIC:
252  return t;
253  case TermType::VARIABLE: {
254  auto var = std::static_pointer_cast<Variable>(t);
255  auto term = bindings.get(var->name());
256  if (term) {
257  return term;
258  } else {
259  return var;
260  }
261  }
262  case TermType::FUNCTION: {
263  auto function = std::static_pointer_cast<Function>(t);
264  auto args = function->arguments();
265  auto newArgs = std::vector<TermPtr>(args.size());
266  auto hasNewArg = false;
267  for (uint32_t i = 0; i < args.size(); i++) {
268  auto arg = applyBindings(args[i], bindings);
269  if (arg != args[i]) {
270  hasNewArg = true;
271  }
272  newArgs[i] = arg;
273  }
274  if (!hasNewArg) {
275  return function;
276  } else {
277  return std::make_shared<Function>(function->functor(), newArgs);
278  }
279  }
280  }
281  return t;
282  }
const TermPtr & get(std::string_view varName) const
Definition: Bindings.cpp:60
VariableRule & var()
Definition: terms.cpp:91
FunctionRule & function()
Definition: terms.cpp:140

◆ applyBindings() [6/6]

TriplePatternPtr knowrob::applyBindings ( const TriplePatternPtr pat,
const Bindings bindings 
)

Apply a substitution to a framed triple pattern.

Parameters
patthe framed triple pattern.
bindingsthe substitution.
Returns
the framed triple pattern with the substitution applied.

Definition at line 440 of file TriplePattern.cpp.

440  {
441  bool hasChanges = false;
442 
443  auto subject = applyBindings(pat->subjectTerm(), bindings);
444  if (subject != pat->subjectTerm()) hasChanges = true;
445 
446  auto property = applyBindings(pat->propertyTerm(), bindings);
447  if (property != pat->propertyTerm()) hasChanges = true;
448 
449  auto object = applyBindings(pat->objectTerm(), bindings);
450  if (object != pat->objectTerm()) hasChanges = true;
451  else if (pat->objectVariable()) {
452  auto actualObject = applyBindings(pat->objectVariable(), bindings);
453  if (actualObject && actualObject != pat->objectTerm()) {
454  object = actualObject;
455  hasChanges = true;
456  }
457  }
458 
459  auto graph = pat->graphTerm() ? applyBindings(*pat->graphTerm(), bindings) : nullptr;
460  if (graph && graph != *pat->graphTerm()) hasChanges = true;
461 
462  auto agent = pat->perspectiveTerm() ? applyBindings(*pat->perspectiveTerm(), bindings) : nullptr;
463  if (agent && agent != *pat->perspectiveTerm()) hasChanges = true;
464 
465  auto confidence = pat->confidenceTerm() ? applyBindings(*pat->confidenceTerm(), bindings) : nullptr;
466  if (confidence && confidence != *pat->confidenceTerm()) hasChanges = true;
467 
468  auto begin = pat->beginTerm() ? applyBindings(*pat->beginTerm(), bindings) : nullptr;
469  if (begin && begin != *pat->beginTerm()) hasChanges = true;
470 
471  auto end = pat->endTerm() ? applyBindings(*pat->endTerm(), bindings) : nullptr;
472  if (end && end != *pat->endTerm()) hasChanges = true;
473 
474  auto occasional = pat->isOccasionalTerm() ? applyBindings(*pat->isOccasionalTerm(), bindings) : nullptr;
475  if (occasional && occasional != *pat->isOccasionalTerm()) hasChanges = true;
476 
477  auto uncertain = pat->isUncertainTerm() ? applyBindings(*pat->isUncertainTerm(), bindings) : nullptr;
478  if (uncertain && uncertain != *pat->isUncertainTerm()) hasChanges = true;
479 
480  if (!hasChanges) return pat;
481 
482  auto patInstance = std::make_shared<TriplePattern>(
483  subject, property, object, pat->isNegated());
484  patInstance->setObjectOperator(pat->objectOperator());
485  if (graph) patInstance->setGraphTerm(groundable<Atom>::cast(graph));
486  if (agent) patInstance->setPerspectiveTerm(groundable<Atom>::cast(agent));
487  if (confidence) patInstance->setConfidenceTerm(groundable<Double>::cast(confidence));
488  if (begin) patInstance->setBeginTerm(groundable<Double>::cast(begin));
489  if (end) patInstance->setEndTerm(groundable<Double>::cast(end));
490  if (occasional) patInstance->setIsOccasionalTerm(groundable<Numeric>::cast(occasional));
491  if (uncertain) patInstance->setIsUncertainTerm(groundable<Numeric>::cast(uncertain));
492  return patInstance;
493  }

◆ DefaultGraphSelector()

GraphSelectorPtr knowrob::DefaultGraphSelector ( )
Returns
the default graph selector

Definition at line 138 of file GraphSelector.cpp.

138  {
139  static auto defaultSelector = std::make_shared<const GraphSelector>();
140  return defaultSelector;
141  }

◆ DefaultQueryContext()

QueryContextPtr knowrob::DefaultQueryContext ( )
Returns
a query context that selects the default graph, i.e. the one that represents the current state of the world from the perspective of the robot.

Definition at line 11 of file Query.cpp.

11  {
12  return std::make_shared<QueryContext>();
13  }

◆ DefaultThreadPool()

std::shared_ptr< ThreadPool > knowrob::DefaultThreadPool ( )
Returns
a default thread pool.

Definition at line 19 of file ThreadPool.cpp.

19  {
20  static auto pool =
21  std::make_shared<ThreadPool>(std::thread::hardware_concurrency());
22  return pool;
23  }

◆ GenericDontKnow()

const std::shared_ptr< const AnswerDontKnow > & knowrob::GenericDontKnow ( )
Returns
a positive result without additional constraints.

Definition at line 10 of file AnswerDontKnow.cpp.

10  {
11  static const auto instance = std::make_shared<const AnswerDontKnow>();
12  return instance;
13  }

◆ GenericNo()

const std::shared_ptr< const AnswerNo > & knowrob::GenericNo ( )
Returns
a positive result without additional constraints.

Definition at line 11 of file AnswerNo.cpp.

11  {
12  static const auto instance = std::make_shared<const AnswerNo>();
13  return instance;
14  }

◆ GenericYes()

const std::shared_ptr< const AnswerYes > & knowrob::GenericYes ( )
Returns
a positive result without additional constraints.

Definition at line 161 of file AnswerYes.cpp.

161  {
162  static const auto instance = std::make_shared<const AnswerYes>();
163  return instance;
164  }

◆ getNameOfExecutable()

char * knowrob::getNameOfExecutable ( )
Returns
the name of the executable in which the knowledge base is running.

Definition at line 30 of file knowrob.cpp.

30  {
31  if (NAME_OF_EXECUTABLE) {
33  } else {
34  static char noExec[] = "<no-executable>";
35  return noExec;
36  }
37  }
char * NAME_OF_EXECUTABLE
Definition: knowrob.cpp:28

◆ hashCombine()

void knowrob::hashCombine ( std::size_t &  seed,
const std::size_t &  v 
)

Combine a hash value with another value.

Parameters
seeda hash value.
va value to combine with the seed.

Definition at line 39 of file knowrob.cpp.

39  {
40  static const auto GOLDEN_RATIO_HASH = static_cast<size_t>(0x9e3779b9);
41  seed ^= v + GOLDEN_RATIO_HASH + (seed << 6) + (seed >> 2);
42  }

◆ InitKnowRob() [1/2]

void knowrob::InitKnowRob ( char *  nameOfExecutable,
bool  initPython 
)

Definition at line 66 of file knowrob.cpp.

66  {
67  if (initialized) return;
68  // remember the program name.
69  // it is assumed here that argv stays valid during program execution.
70  knowrob::NAME_OF_EXECUTABLE = nameOfExecutable;
71  // set the locale to classic to avoid problems with number formatting,
72  // especially regarding use of dot or comma as decimal separator.
73  std::cout.imbue(std::locale::classic());
74  // configure the logger
75  Logger::initialize();
76  // Allow Python to load modules KnowRob-related directories.
78  if (initPython) {
79  // Start a Python interpreter if it is not already initialized
80  Py_Initialize();
81  // Release the GIL which is acquired by Py_Initialize.
82  // If we do not release it, then no other thread would be able
83  // to run Python code.
84  // So instead we always need to acquire the GIL in C++ code sections
85  // that interact with Python (except of when the C++ code is launched
86  // within Python in which case it actually already has the GIL).
87  PyEval_SaveThread();
88  }
89  KB_INFO("[KnowRob] static initialization done.");
90  KB_DEBUG("[KnowRob] source directory: {}", KNOWROB_SOURCE_DIR);
91  KB_DEBUG("[KnowRob] install prefix: {}", KNOWROB_INSTALL_PREFIX);
92  KB_DEBUG("[KnowRob] build directory: {}", KNOWROB_BUILD_DIR);
93  initialized = true;
94  }
#define KB_DEBUG
Definition: Logger.h:25
#define KB_INFO
Definition: Logger.h:26
void InitPythonPath()
Definition: knowrob.cpp:51

◆ InitKnowRob() [2/2]

void knowrob::InitKnowRob ( int  argc,
char **  argv,
bool  initPython = true 
)

Static initialization of the knowledge base. Note that it is important that argv[0] holds the name of the executable.

Parameters
argcnumber of arguments in argv.
argvarray of program arguments, argv[0] is the name of the binary.
initPythonwhether to initialize the Python module.

Definition at line 96 of file knowrob.cpp.

96  {
97  if (argc > 0) {
98  InitKnowRob(argv[0], initPython);
99  } else {
100  static std::string nameOfExecutable = KNOWROB_EXECUTABLE_NAME;
101  InitKnowRob(nameOfExecutable.data(), initPython);
102  }
103  }
#define KNOWROB_EXECUTABLE_NAME
Definition: knowrob.cpp:22
TermRule & string()
Definition: terms.cpp:63
void InitKnowRob(char *nameOfExecutable, bool initPython)
Definition: knowrob.cpp:66

◆ InitPythonPath()

void knowrob::InitPythonPath ( )

Definition at line 51 of file knowrob.cpp.

51  {
52  std::stringstream pythonPath;
53  auto oldPath = std::getenv("PYTHONPATH");
54  if (oldPath) {
55  pythonPath << oldPath << ":";
56  }
57  pythonPath <<
58  (std::filesystem::path(KNOWROB_INSTALL_PREFIX) / "knowrob").string() << ":"
59  << KNOWROB_SOURCE_DIR << ":"
60  << KNOWROB_BUILD_DIR;
61  auto pythonPathStr = pythonPath.str();
62  KB_DEBUG("[KnowRob] using python path: {}", pythonPathStr);
63  setenv("PYTHONPATH", pythonPathStr.c_str(), 1);
64  }

◆ insertUnique()

void knowrob::insertUnique ( std::ostream &  os)

Insert a unique identifier into a stream.

Parameters
osthe output stream.

Definition at line 44 of file knowrob.cpp.

44  {
45  static boost::uuids::random_generator generator;
46  std::hash<std::string> str_hash;
47  os << std::setfill('0') << std::setw(8) << std::hex <<
48  str_hash(to_string(generator()));
49  }

◆ inverseFilterType()

FilterType knowrob::inverseFilterType ( FilterType  op)

Compute the inverse of a filter type.

Parameters
opa filter type.
Returns
the inverse of op.

Definition at line 21 of file TriplePattern.cpp.

21  {
22  switch (op) {
23  case FilterType::EQ:
24  return FilterType::NEQ;
25  case FilterType::NEQ:
26  return FilterType::EQ;
27  case FilterType::LT:
28  return FilterType::GEQ;
29  case FilterType::GT:
30  return FilterType::LEQ;
31  case FilterType::LEQ:
32  return FilterType::GT;
33  case FilterType::GEQ:
34  return FilterType::LT;
35  }
36  return FilterType::EQ;
37 }

◆ iri()

IRIAtomPtr knowrob::iri ( std::string_view  ns,
std::string_view  name 
)

Create an IRI atom.

Parameters
nsthe namespace of the IRI
namethe name of the IRI
Returns
the IRI atom

Definition at line 62 of file IRIAtom.cpp.

62  {
63  auto o_iri = PrefixRegistry::createIRI(ns, name);
64  if (o_iri.has_value()) {
65  return IRIAtom::Tabled(o_iri.value());
66  } else {
67  KB_WARN("Failed to create IRI from namespace \"{}\" and name {}.", ns, name);
68  std::string fallback = std::string(ns) + "/" + std::string(name);
69  return IRIAtom::Tabled(fallback);
70  }
71  }
#define KB_WARN
Definition: Logger.h:27

◆ isAnnotationPropertyIRI()

bool knowrob::isAnnotationPropertyIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'Class'

Definition at line 21 of file owl.cpp.

22  { return iri == owl::AnnotationProperty->stringForm(); }
const IRIAtomPtr AnnotationProperty
Definition: owl.h:23
StringRule & iri()
Definition: strings.cpp:49

◆ isClassIRI()

bool knowrob::isClassIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'Class'

Definition at line 9 of file owl.cpp.

10  { return iri == owl::Class->stringForm(); }
const IRIAtomPtr Class
Definition: owl.h:18

◆ isDatatypePropertyIRI()

bool knowrob::isDatatypePropertyIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'AnnotationProperty'

Definition at line 18 of file owl.cpp.

19  { return iri == owl::DatatypeProperty->stringForm(); }
const IRIAtomPtr DatatypeProperty
Definition: owl.h:22

◆ isInverseOfIRI()

bool knowrob::isInverseOfIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'inverseOf'

Definition at line 12 of file owl.cpp.

13  { return iri == owl::inverseOf->stringForm(); }
const IRIAtomPtr inverseOf
Definition: owl.h:17

◆ isObjectPropertyIRI()

bool knowrob::isObjectPropertyIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'ObjectProperty'

Definition at line 15 of file owl.cpp.

16  { return iri == owl::ObjectProperty->stringForm(); }
const IRIAtomPtr ObjectProperty
Definition: owl.h:21

◆ isPropertyIRI()

bool knowrob::isPropertyIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=rdf:'Property'

Definition at line 12 of file rdf.cpp.

13  { return iri == rdf::Property->stringForm(); }
const IRIAtomPtr Property
Definition: rdf.h:16

◆ isReflexivePropertyIRI()

bool knowrob::isReflexivePropertyIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'ReflexiveProperty'

Definition at line 30 of file owl.cpp.

31  { return iri == owl::ReflexiveProperty->stringForm(); }
const IRIAtomPtr ReflexiveProperty
Definition: owl.h:26

◆ isSubClassOfIRI()

bool knowrob::isSubClassOfIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=rdfs:'subClassOf'

Definition at line 9 of file rdfs.cpp.

10  { return iri == rdfs::subClassOf->stringForm(); }
const IRIAtomPtr subClassOf
Definition: rdfs.h:15

◆ isSubPropertyOfIRI()

bool knowrob::isSubPropertyOfIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=rdfs:'subPropertyOf'

Definition at line 12 of file rdfs.cpp.

13  { return iri == rdfs::subPropertyOf->stringForm(); }
const IRIAtomPtr subPropertyOf
Definition: rdfs.h:16

◆ isSymmetricPropertyIRI()

bool knowrob::isSymmetricPropertyIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'SymmetricProperty'

Definition at line 27 of file owl.cpp.

28  { return iri == owl::SymmetricProperty->stringForm(); }
const IRIAtomPtr SymmetricProperty
Definition: owl.h:25

◆ isTransitivePropertyIRI()

bool knowrob::isTransitivePropertyIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=owl:'TransitiveProperty'

Definition at line 24 of file owl.cpp.

25  { return iri == owl::TransitiveProperty->stringForm(); }
const IRIAtomPtr TransitiveProperty
Definition: owl.h:24

◆ isTypeIRI()

bool knowrob::isTypeIRI ( std::string_view  iri)
Parameters
irithe IRI of a RDF resource
Returns
true if iri=rdf:'Type'

Definition at line 9 of file rdf.cpp.

10  { return iri == rdf::type->stringForm(); }
const IRIAtomPtr type
Definition: rdf.h:15

◆ mergeAnswers()

AnswerPtr knowrob::mergeAnswers ( const AnswerPtr a,
const AnswerPtr b,
bool  ignoreInconsistencies 
)

Merge two answers into one.

Parameters
aa answer.
ba answer.
ignoreInconsistenciesif true, inconsistencies are ignored.
Returns
a merged answer.

Definition at line 112 of file Answer.cpp.

112  {
113  // also for the moment we do not combine two negative answers
114  if (a->isNegative()) {
115  if (b->isNegative()) {
116  // both are on
117  auto a_negative = std::static_pointer_cast<const AnswerNo>(a);
118  auto b_negative = std::static_pointer_cast<const AnswerNo>(b);
119  return mergeNegativeAnswers(a_negative, b_negative);
120  } else {
121  // a is "no"
122  return a;
123  }
124  } else if (b->isNegative()) {
125  // b is "no"
126  return b;
127  } else if (a->isPositive()) {
128  if (b->isPositive()) {
129  // both positive -> combine
130  auto a_positive = std::static_pointer_cast<const AnswerYes>(a);
131  auto b_positive = std::static_pointer_cast<const AnswerYes>(b);
132  return mergePositiveAnswers(a_positive, b_positive, ignoreInconsistencies);
133  } else {
134  // b is "don't know"
135  return b;
136  }
137  } else {
138  // b is "don't know"
139  return a;
140  }
141  }
AnswerPtr mergePositiveAnswers(const AnswerYesPtr &a, const AnswerYesPtr &b, bool ignoreInconsistencies)
Definition: AnswerYes.cpp:166
AnswerPtr mergeNegativeAnswers(const AnswerNoPtr &a, const AnswerNoPtr &b)
Definition: AnswerNo.cpp:88

◆ mergeNegativeAnswers()

AnswerPtr knowrob::mergeNegativeAnswers ( const AnswerNoPtr a,
const AnswerNoPtr b 
)

Definition at line 88 of file AnswerNo.cpp.

88  {
89  auto mergedAnswer = std::make_shared<AnswerNo>(*a);
90  if (mergedAnswer->mergeWith(*b)) {
91  return mergedAnswer;
92  } else {
93  // merging failed
94  return {};
95  }
96  }

◆ mergePositiveAnswers()

AnswerPtr knowrob::mergePositiveAnswers ( const AnswerYesPtr a,
const AnswerYesPtr b,
bool  ignoreInconsistencies 
)

Definition at line 166 of file AnswerYes.cpp.

166  {
167  if (!a || a->isGenericYes()) {
168  return b;
169  } else if (!b || b->isGenericYes()) {
170  return a;
171  } else {
172  AnswerYesPtr smaller, larger;
173  if (a->isRicherThan(*b)) {
174  smaller = b;
175  larger = a;
176  } else {
177  smaller = a;
178  larger = b;
179  }
180  auto mergedAnswer = std::make_shared<AnswerYes>(*larger);
181  if (mergedAnswer->mergeWith(*smaller, ignoreInconsistencies)) {
182  return mergedAnswer;
183  } else {
184  // merging failed
185  return {};
186  }
187  }
188  }
std::shared_ptr< const AnswerYes > AnswerYesPtr
Definition: AnswerYes.h:108

◆ OneSolutionContext()

QueryContextPtr knowrob::OneSolutionContext ( )
Returns
same as DefaultQueryContext() but with the QUERY_FLAG_ONE_SOLUTION flag set.

Definition at line 15 of file Query.cpp.

15  {
16  return std::make_shared<QueryContext>(QUERY_FLAG_ONE_SOLUTION);
17  }

◆ operator&() [1/4]

FormulaPtr knowrob::operator& ( const FormulaPtr phi,
const FormulaPtr psi 
)

Construct conjunction of formulae.

Parameters
phia formula
psia formula
Returns
conjunction of phi and psi.

Definition at line 34 of file Conjunction.cpp.

34  {
35  if (phi->isBottom()) return phi;
36  else if (psi->isBottom()) return psi;
37  else if (phi->isTop()) return psi;
38  else if (psi->isTop()) return phi;
39  else if (phi->type() == FormulaType::CONJUNCTION) {
40  auto formulae = ((CompoundFormula *) phi.get())->formulae();
41  if (psi->type() == FormulaType::CONJUNCTION) {
42  auto &psi0 = ((CompoundFormula *) psi.get())->formulae();
43  formulae.insert(formulae.end(), psi0.begin(), psi0.end());
44  } else {
45  formulae.push_back(psi);
46  }
47  return std::make_shared<Conjunction>(formulae);
48  } else if (psi->type() == FormulaType::CONJUNCTION) {
49  auto &psi0 = ((CompoundFormula *) psi.get())->formulae();
50  std::vector<FormulaPtr> formulae = {phi};
51  formulae.insert(formulae.end(), psi0.begin(), psi0.end());
52  return std::make_shared<Conjunction>(formulae);
53  } else {
54  return std::make_shared<Conjunction>(std::vector<FormulaPtr>({phi, psi}));
55  }
56  }

◆ operator&() [2/4]

std::shared_ptr< GraphTerm > knowrob::operator& ( const std::shared_ptr< GraphTerm > &  a,
const std::shared_ptr< GraphTerm > &  b 
)

Definition at line 61 of file GraphTerm.cpp.

61  {
62  if (a->termType() == GraphTermType::Sequence) {
63  auto sequence = std::static_pointer_cast<GraphSequence>(a);
64  auto terms = sequence->terms();
65  terms.push_back(b);
66  return std::make_shared<GraphSequence>(terms);
67  } else {
68  return std::make_shared<GraphSequence>(std::vector<std::shared_ptr<GraphTerm>>{a, b});
69  }
70  }

◆ operator&() [3/4]

bool knowrob::operator& ( SPARQLFlag  a,
SPARQLFlag  b 
)

Compute the bitwise AND of two SPARQL flags.

Parameters
aa flag.
ba flag.
Returns
the bitwise AND of a and b.

Definition at line 391 of file SPARQLQuery.cpp.

391  {
392  return static_cast<std::uint8_t>(a) & static_cast<std::uint8_t>(b);
393 }

◆ operator&() [4/4]

bool knowrob::operator& ( StorageFeature  a,
StorageFeature  b 
)

Compute the bitwise AND of two SPARQL flags.

Parameters
aa flag.
ba flag.
Returns
the bitwise AND of a and b.

Definition at line 12 of file Storage.cpp.

12  {
13  return static_cast<std::uint8_t>(a) & static_cast<std::uint8_t>(b);
14 }

◆ operator<() [1/2]

bool knowrob::operator< ( PrefixProbe  a,
std::string_view  b 
)

Definition at line 8 of file PrefixProbe.cpp.

8 { return a.prefix < b.substr(0, a.prefix.size()); }

◆ operator<() [2/2]

bool knowrob::operator< ( std::string_view  a,
PrefixProbe  b 
)

Definition at line 9 of file PrefixProbe.cpp.

9 { return a.substr(0, b.prefix.size()) < b.prefix; }

◆ operator<<()

std::ostream & knowrob::operator<< ( std::ostream &  os,
const Printable printable 
)
inline

Print a printable object to a stream.

Parameters
osthe stream to print to.
printablethe object to print.
Returns
the stream.

Definition at line 45 of file Printable.h.

45  {
46  printable.write(os);
47  return os;
48  }

◆ operator>>()

void knowrob::operator>> ( const std::shared_ptr< TokenBroadcaster > &  a,
const std::shared_ptr< TokenStream > &  b 
)

Definition at line 51 of file TokenBroadcaster.cpp.

52  {
53  a->addSubscriber(TokenStream::Channel::create(b));
54  }

◆ operator|() [1/4]

FormulaPtr knowrob::operator| ( const FormulaPtr phi,
const FormulaPtr psi 
)

Construct conjunction of formulae.

Parameters
phia formula
psia formula
Returns
conjunction of phi and psi.

Definition at line 55 of file Disjunction.cpp.

55  {
56  if (phi->isBottom()) return psi;
57  else if (psi->isBottom()) return phi;
58  else if (phi->isTop()) return phi;
59  else if (psi->isTop()) return psi;
60  else if (phi->type() == FormulaType::DISJUNCTION) {
61  auto formulae = ((CompoundFormula *) phi.get())->formulae();
62  if (psi->type() == FormulaType::DISJUNCTION) {
63  auto &psi0 = ((CompoundFormula *) psi.get())->formulae();
64  formulae.insert(formulae.end(), psi0.begin(), psi0.end());
65  } else {
66  formulae.push_back(psi);
67  }
68  return std::make_shared<Disjunction>(formulae);
69  } else if (psi->type() == FormulaType::DISJUNCTION) {
70  auto &psi0 = ((CompoundFormula *) psi.get())->formulae();
71  std::vector<FormulaPtr> formulae = {phi};
72  formulae.insert(formulae.end(), psi0.begin(), psi0.end());
73  return std::make_shared<Disjunction>(formulae);
74  } else {
75  return std::make_shared<Disjunction>(std::vector<FormulaPtr>({phi, psi}));
76  }
77  }

◆ operator|() [2/4]

std::shared_ptr< GraphTerm > knowrob::operator| ( const std::shared_ptr< GraphTerm > &  a,
const std::shared_ptr< GraphTerm > &  b 
)

Definition at line 72 of file GraphTerm.cpp.

72  {
73  if (a->termType() == GraphTermType::Union) {
74  auto unionTerm = std::static_pointer_cast<GraphUnion>(a);
75  auto terms = unionTerm->terms();
76  terms.push_back(b);
77  return std::make_shared<GraphUnion>(terms);
78  } else {
79  return std::make_shared<GraphUnion>(std::vector<std::shared_ptr<GraphTerm>>{a, b});
80  }
81  }

◆ operator|() [3/4]

SPARQLFlag knowrob::operator| ( SPARQLFlag  a,
SPARQLFlag  b 
)

Compute the bitwise OR of two SPARQL flags.

Parameters
aa flag.
ba flag.
Returns
the bitwise OR of a and b.

Definition at line 387 of file SPARQLQuery.cpp.

387  {
388  return static_cast<SPARQLFlag>(static_cast<std::uint8_t>(a) | static_cast<std::uint8_t>(b));
389 }

◆ operator|() [4/4]

StorageFeature knowrob::operator| ( StorageFeature  a,
StorageFeature  b 
)

Compute the bitwise OR of two SPARQL flags.

Parameters
aa flag.
ba flag.
Returns
the bitwise OR of a and b.

Definition at line 8 of file Storage.cpp.

8  {
9  return static_cast<StorageFeature>(static_cast<std::uint8_t>(a) | static_cast<std::uint8_t>(b));
10 }
StorageFeature
Definition: Storage.h:24

◆ operator~()

FormulaPtr knowrob::operator~ ( const FormulaPtr phi)

Negate a formula.

Parameters
phia formula
Returns
negation of phi.

Definition at line 24 of file Negation.cpp.

24  {
25  if (phi->type() == FormulaType::NEGATION) {
26  return ((Negation *) phi.get())->negatedFormula();
27  } else if (phi->isBottom()) {
28  return Top::get();
29  } else if (phi->isTop()) {
30  return Bottom::get();
31  } else {
32  return std::make_shared<Negation>(phi);
33  }
34  }

◆ rdfNodeTypeGuess()

RDFNodeType knowrob::rdfNodeTypeGuess ( std::string_view  str)

Guess the type of an RDF node from a string.

Parameters
strthe string to guess the type from
Returns
the guessed type

Definition at line 11 of file RDFNode.cpp.

11  {
12  if (str.empty()) return RDFNodeType::LITERAL;
13  if (str[0] == '_') return RDFNodeType::BLANK;
14  if (str[0] == '<') return RDFNodeType::IRI;
15  if (boost::algorithm::starts_with(str, "http://") ||
16  boost::algorithm::starts_with(str, "https://"))
17  return RDFNodeType::IRI;
18  if (boost::algorithm::starts_with(str, "genid")) return RDFNodeType::BLANK;
19  return RDFNodeType::LITERAL;
20  }

◆ ShutdownKnowRob()

void knowrob::ShutdownKnowRob ( )

Shutdown the knowledge base. This will ensure that all worker threads in the global DefaultThreadPool are joined. It is best to call this before exiting an application to avoid shutdown-crashes due to static resources associated with the main thread being destroyed before the worker threads (this is the case for spdlog).

Definition at line 123 of file knowrob.cpp.

123  {
124  // NOTE: Py_Finalize() should not be called when using boost python according to docs.
125  //Py_Finalize();
126  // stop the thread pool, join all remaining threads
127  DefaultThreadPool()->shutdown();
128  PrologEngine::finalizeProlog();
129  KB_INFO("[KnowRob] shutdown complete.");
130  }
std::shared_ptr< ThreadPool > DefaultThreadPool()
Definition: ThreadPool.cpp:19

◆ Vocabulary::define< semweb::Class >()

template<>
std::shared_ptr<semweb::Class> knowrob::Vocabulary::define< semweb::Class > ( const std::string_view &  iri)

Definition at line 240 of file Vocabulary.cpp.

262 { return defineClass(iri); }

◆ Vocabulary::define< semweb::Property >()

template<>
std::shared_ptr<semweb::Property> knowrob::Vocabulary::define< semweb::Property > ( const std::string_view &  iri)

Definition at line 240 of file Vocabulary.cpp.

266 { return defineProperty(iri); }

◆ xsdTypeFromIRI()

XSDType knowrob::xsdTypeFromIRI ( std::string_view  iri)

Get the XSD type from the IRI

Parameters
irithe IRI of the XSD type
Returns
the XSD type

Definition at line 48 of file XSDAtomic.cpp.

48  {
49  static std::map<std::string_view, XSDType> typeIRIs = {
50  {xsd::IRI_string->stringForm(), XSDType::STRING},
51  {xsd::IRI_anyURI->stringForm(), XSDType::STRING},
52  {xsd::IRI_boolean->stringForm(), XSDType::BOOLEAN},
53  {xsd::IRI_double->stringForm(), XSDType::DOUBLE},
54  {xsd::IRI_float->stringForm(), XSDType::FLOAT},
55  {xsd::IRI_integer->stringForm(), XSDType::INTEGER},
56  {xsd::IRI_int->stringForm(), XSDType::INTEGER},
57  {xsd::IRI_nonNegativeInteger->stringForm(), XSDType::NON_NEGATIVE_INTEGER},
58  {xsd::IRI_long->stringForm(), XSDType::LONG},
59  {xsd::IRI_short->stringForm(), XSDType::SHORT},
60  {xsd::IRI_unsignedLong->stringForm(), XSDType::UNSIGNED_LONG},
61  {xsd::IRI_unsignedInt->stringForm(), XSDType::UNSIGNED_INT},
62  {xsd::IRI_unsignedShort->stringForm(), XSDType::UNSIGNED_SHORT}
63  };
64  auto it = typeIRIs.find(iri);
65  if (it != typeIRIs.end()) return it->second;
66  KB_WARN("Unknown XSD type IRI {} treated as string.", iri);
67  return XSDType::STRING;
68  }
const IRIAtomPtr IRI_integer
Definition: xsd.h:22
const IRIAtomPtr IRI_string
Definition: xsd.h:16
const IRIAtomPtr IRI_short
Definition: xsd.h:30
const IRIAtomPtr IRI_boolean
Definition: xsd.h:34
const IRIAtomPtr IRI_long
Definition: xsd.h:28
const IRIAtomPtr IRI_int
Definition: xsd.h:21
const IRIAtomPtr IRI_unsignedShort
Definition: xsd.h:31
const IRIAtomPtr IRI_unsignedLong
Definition: xsd.h:29
const IRIAtomPtr IRI_unsignedInt
Definition: xsd.h:27
const IRIAtomPtr IRI_float
Definition: xsd.h:38
const IRIAtomPtr IRI_anyURI
Definition: xsd.h:15
const IRIAtomPtr IRI_nonNegativeInteger
Definition: xsd.h:25
const IRIAtomPtr IRI_double
Definition: xsd.h:37

◆ xsdTypeToIRI()

std::string_view knowrob::xsdTypeToIRI ( XSDType  type)

Get the IRI of the XSD type

Parameters
typethe XSD type
Returns
the IRI of the XSD type

Definition at line 70 of file XSDAtomic.cpp.

70  {
71  static std::map<XSDType, std::string_view> typeIRIs = {
72  {XSDType::STRING, xsd::IRI_string->stringForm()},
73  {XSDType::BOOLEAN, xsd::IRI_boolean->stringForm()},
74  {XSDType::DOUBLE, xsd::IRI_double->stringForm()},
75  {XSDType::FLOAT, xsd::IRI_float->stringForm()},
76  {XSDType::INTEGER, xsd::IRI_integer->stringForm()},
77  {XSDType::NON_NEGATIVE_INTEGER, xsd::IRI_nonNegativeInteger->stringForm()},
78  {XSDType::LONG, xsd::IRI_long->stringForm()},
79  {XSDType::SHORT, xsd::IRI_short->stringForm()},
80  {XSDType::UNSIGNED_LONG, xsd::IRI_unsignedLong->stringForm()},
81  {XSDType::UNSIGNED_INT, xsd::IRI_unsignedInt->stringForm()},
82  {XSDType::UNSIGNED_SHORT, xsd::IRI_unsignedShort->stringForm()}
83  };
84  auto it = typeIRIs.find(type);
85  if (it != typeIRIs.end()) return it->second;
86  KB_WARN("Unknown XSD type {} treated as string.", static_cast<int>(type));
87  return xsd::IRI_string->stringForm();
88  }

Variable Documentation

◆ NAME_OF_EXECUTABLE

char* knowrob::NAME_OF_EXECUTABLE = nullptr

Definition at line 28 of file knowrob.cpp.