The OWL 2 W3C Recommendation is described in a series of documents, which contain both a high level overview of the OWL 2 DL language and it formal specification. One of these documents contains a description of several so-called language profiles. These profiles are restricted subsets of OWL DL that trade some expressivity to provide more desirable computational guarantees. These profiles restrict the types of OWL axioms that can be used in an ontology and place syntactic restrictions on how axioms can be used. Many real world ontologies do not use the full set of features provides by OWL 2 DL and often fall into one or more of these profiles. (CJD)
Three profiles are provided. These are: OWL 2 EL, which is designed for ontologies that contain a large number of classes or properties; OWL 2 QL, which is aimed primarily at query answering; and OWL 2 RL, which is aimed at application that require quite a bit of the expressivity provided by OWL 2 DL but also require scalable reasoning. (CJF)
A notable feature of the OWL 2 RL is that the profile is designed to be implementable using a rule-based reasoner. The specification document contains a set of first order implication rules of rules that can be used to implement such a reasoner. The rules are described in terms of an RDF serialization of an OWL ontology. In the document, the rules are divided into seven tables and each rule is given a unique name. For example, a rule called eq-sym that describes the symmetric property of the owl:sameAs axiom is written: (CJH)
T(?x, owl:sameAs, ?y) -> T(?y, owl:sameAs, ?x) (CJI)
Based on their functionality, rules are subdivided into eight groups. Each group is presented as a table in the specification (numbered 3 to 9). For example, table 5 contains rules relating to reasoning with OWL object and data properties. (CJO)
Reasoning with the OWL 2 RL profile is polynomial with respect to the size of the ontology. (CK2)
OWL 2 RL in the Protege-OWL SWRLTab (CJE)
As of release 3.5, Protege-OWL's SWRLTab supports two OWL 2 RL-based reasoners - one for the existing Jess tab, which is implemented using the Jess rule engine, and one for the new Drools tab, which is written using the Drools rule engine. These reasoners are also used for SQWRL query execution. Users of SQWRL can select one these reasoners to execute their queries. (CK1)
As mentioned above, reasoning in OWL 2 RL can be implemented using a set of implication rules. These rules are divided into seven tables (numbered 3 to 9) in the specification document and each rule is given a unique name. (CK0)
Controlling OWL 2 RL Rules via the Graphical Interface (CKD)
The SWRLTab provides a graphical interface that allow control of these reasoners. This interface is accessible in the SWRLJessTab, the SWRLDroolsTab, and the SQWRLQueryTab. Each provides a subtab that allows control of the OWL 2 RL inference process by allowing the selective enabling and disabling of the rules or tables of rules. This interface also provides a control tab to indicate if rule tables are active or inactive. The following is an example of this interface as displayed in the SWRLJessTab. (CJ9)
The interface contains subtabs for tables 4 to 9, which represent six of the seven OWL 2 RL rule tables. Table 3 is omitted because it contains unnamed low-level list processing that can not meaningfully be disabled. All rules in table 7, which relate to literal reasoning, are also permanently on. These subtabs list these rule names, indicate their support status, and allow supported rules to be enabled or disabled. A check next to each rule indicates whether that rule is enabled or disabled. Greyed-out rules are either permanently enabled or currently unsupported and cannot be toggled. (CK3)
Controlling OWL 2 RL Rules via the API (CKE)
Control of OWL 2 RL rules is also provided at the Java API level via the SWRL Rule Engine API or the SQWRL Query Engine API. (CKF)
Each provides the method getOWL2RLController, which returns a controller. This controller provides an API for switching on and off rules or tables of rules. (CKG)
SWRLRuleEngine ruleEngine = P3SWRLRuleEngineFactory.create(owlModel); OWL2RLController controller = ruleEngine.getOWL2RLController(); controller.enableTables(OWL2RLNames.Table.Table4); controller.enableRules(OWL2RLNames.Rule.PRP_AP); (CKL)
The method reset must be called on the rule engine after these settings are changed so that the rule engine reflects the updates. (CKI)
Saving the OWL 2 RL Rule Selections (CKJ)
Protege-OWL can also save the OWL 2 RL rule settings for a particular ontology. These settings are saved as annotation properties in that ontology. (CKM)
If you wish to save these settings, the SWRL Annotations Ontology must be imported by the ontology. This ontology is imported by default if the SWRLTab is enabled for an ontology (see here). Otherwise, a copy of this ontology can be found the standard Protege-OWL repositories and can be imported through the 'Import Ontology' option in Protege-OWL's Metadata tab. (CKN)