Provides a selection of simple rule engines for Jena inference models. Currently this includes a simple forward chaining engine (BasicForwardRuleReasoner). This is currently a pure interpreter (no RETE network) with an extensible set of Builtin actions (see Builtin).
We include two example reasoners built using this rule engine. The first is an alternative RDFS implementation (RDFSRuleReasonerFactory) which implements the full RDFS rule set forward style.
The second is an implementation of the OWL-lite subset of OWL-full (OWLRuleReasonerFactory). This omits some of the RDFS entailments (everything is a Resource, every Class is a subclass of Resource) because those conclusions are general not that useful and lead to rather a lot of pointless deductions in forward chaining mode.
Interface Summary Interface Description BackwardRuleInfGraphIThis interface collects together those operations that the backchaining engine needs to invoke in the parent InfGraph. BindingEnvironmentInterface through which the current bound values of variables can be found. BuiltinRules employ builtins to do all tests and actions other than simple triple matches and triple creation. ClauseEntryCommon interface for all objects that can go into rules. ForwardRuleInfGraphIThis interface collects together the operations on the InfGraph which are needed to support the forward rule engine. RuleContextInterface used to convey context information from a rule engine to the stack of procedural builtins. RulePreprocessHookImplementors of this interface can be used as preprocessing passes during intialization of (hybrid) rule systems. RuleReasonerRuleReasoner - an interface to capture the idea of a Reasoner that relies on Rules; motivated primarily by the testing for ModelSpecs which specify Rules for Reasoners. RuleReasonerFactoryRuleReasonerFactory - a ReasonerFactory interface which allows rules to be set up to be installed into each reasoner this factory produces. SilentAddIInterface supported by each of the rule system interpreters that allow triples to added directly to the deductions cache, by-passing any processing machinery.
Class Summary Class Description BasicForwardRuleInfGraphAn inference graph interface that runs a set of forward chaining rules to conclusion on each added triple and stores the entire result set. BasicForwardRuleReasonerReasoner implementation which augments or transforms an RDF graph according to a set of rules. BuiltinRegistry FBRuleInfGraphAn inference graph that uses a mixture of forward and backward chaining rules. FBRuleInfGraph.RuleStoreStructure used to wrap up pre-processed/compiled rule sets. FBRuleReasonerRule-based reasoner interface. FunctorA functor comprises a functor name and a list of arguments. FunctorDatatypeDatatype definition for functor-valued literals. GenericRuleReasonerA reasoner interface that is able to invoke any of the useful rule engine combinations. GenericRuleReasoner.RuleModeClass used as an enum for describing rule modes. GenericRuleReasonerFactoryFactory object for creating general rule reasoner instances. LPBackwardRuleInfGraphInference graph for accessing the LP version of the backward chaining rule engine. LPBackwardRuleReasonerReasoner implementation which augments or transforms an RDF graph according to a set of rules. MapBuiltinRegistryA registry for mapping functor names on java objects (instances of subclasses of Builtin) which implement their behaviour. Node_RuleVariableA variation on the normal Node_Variable which support for value bindings. OverrideBuiltinRegistry OWLFBRuleReasonerA hybrid forward/backward implementation of the OWL closure rules. OWLFBRuleReasonerFactoryFactory class for creating blank instances of the OWL Reasoner. OWLMicroReasonerReasoner configuration for the OWL micro reasoner. OWLMicroReasonerFactoryReasoner factory for the OWL micro configuration. OWLMiniReasonerReasoner configuration for the OWL mini reasoner. OWLMiniReasonerFactoryReasoner factory for the OWL mini configuration. RDFSFBRuleReasonerA backward chaining implementation of the RDFS closure rules based upon the basic backward rule interpreter. RDFSFBRuleReasonerFactoryFactory class for creating blank instances of the hybrid rule RDFS reasoner. RDFSForwardRuleReasonerA pure forward chaining implementation of the RDFS closure rules based upon the basic forward rule interpreter. RDFSRuleInfGraphCustomization of the generic rule inference graph for RDFS inference. RDFSRuleReasonerA full implementation of RDFS reasoning using a hybrid rule system, together with optimized subclass/subproperty closure using the transitive graph caches. RDFSRuleReasonerFactoryFactory class for creating blank instances of the hybrid rule RDFS reasoner with TGC support. RETERuleInfGraphRETE implementation of the forward rule inference graph. RuleRepresentation of a generic inference rule. Rule.ParserInner class which provides minimalist parsing support based on tokenisation with depth 1 lookahead. RuleDerivationDerivation records are used to determine how an inferred triple was derived from a set of source triples and a reasoner. UtilA small random collection of utility functions used by the rule systems.
Exception Summary Exception Description BuiltinExceptionExceptions thrown by runtime errors in executing rule system builtin operations. Rule.ParserExceptionInner class.