Swoop+Rules
Combining
OWL and Rules Languages
The need for integrating Datalog languages within the Semantic Web DL
ontology languages has been the focus of several research initiatives (e.g.,
AL-log, DL-Safe Rules, Description Logic Programs, CARIN, SWRL).
The combination seems to take advantage of the best characteristics of
both formalisms : DLs are appropriate for structuring knowledge in terms
of concepts and relationships, but the subset of Horn rules that can be
expressed in a decidable DL are only those that satisfy the tree-like property.
In Datalog we can express any safe Horn rule where the interaction
between variables is unrestricted.
On the other hand, in DL, an axiom variable may be either existentially
or universally quantified and we can express disjunction and disjointness
of classes; therefore, complex class expressions and relationships required
in many knowledge domains can be expressed. In plain Datalog, disjunction
and disjointness cannot be expressed, and all variables are universally
quantified.
With respect to query languages, OWL-DL in general provides ABox query
languages which support instantiation, realisation and retrieval. Techniques
have been developed that are used to provide a more expressive query language
that involves classes, roles and variables. When combining DL and Rules
languages, Datalog is used as a query language.
We have implemented a hybrid system for combining OWL and rules by extending
our Web ontology browsing and editing tool, SWOOP.
Approaches
There are three main approaches for integrating OWL and rule languages:
- Intersection
This is the approach taken by Description Logic Programs (DLP), which finds the expressive intersection between DL and Logic Programming (LP) without function symbols. Some DL constructors cannot be mapped, and DL queries are reduced to LP queries.
- Hybrid systems
These systems consider a KB with two subsystems: the DL and the Datalog subsystem. They permit the use of "DL atoms" in the heads and bodies of Datalog style rules. All these combinations have the virtue of increasing the expressivity of the combined logics while remaining decidable. AL-Log, for example, involves the weakest combination. The interaction between the subsystems is done through the specification of constraints (classes) in the Datalog rules which "type" variables appearing elsewhere in the body
In CARIN, classes and roles may appear in the antecedent of Horn rules in the Datalog component. In the DL-SafeRules approach classes and roles are allowed to occur in the antecedent and consequent of Horn rules in the Datalog component. Each variable in a rule is required to occur in a non-DL atom in the rule body. DL-safety ensures that each variable is bound to individuals that are explicit in the ABox.
- Supersetting
The final method of combining rules and OWL is to simply extend OWL axioms with fully generalized conditionals with arbitrary combinations of DL-like atoms on both sides of the rule. This is the approach taken by the Semantic Web Rules Language (SWRL) when it includes Datalog safe rules without negation and with built-ins . SWRL has the disadvantage of being undecidable. However, it has been incorporated in other submissions to the W3C, in particular, OWL-S. SWRL is a proper superset of all the hybrid systems discussed above.
Implementation
We attempt to evolve OWL DL toward SWRL, but cautiously. We have implemented a hybrid system for combining OWL and rules by extending our Web ontology browsing and editing tool, SWOOP. The hybrid system, as a decidable fragment of SWRL, provides validation of SWRL's usefulness and implementability. The features of our system are the following:- Rules Expressivity
Different (increasing) "levels" of rules expressivity are considered: syntactic sugar for OWL, AL-log, CARIN, DL Safe and SWRL. For each set of rules, the number of rules in each level and the expressivity of the set is displayed.
- Rules Editing
Following the SWRL proposal, the user can edit and browse rules. While editing, the user may choose class and property atoms, variables and individuals in order to construct a valid SWRL rule. The expressivity of the rule is computed and displayed.
- Query answering for AL-log
We have implemented an AL-log reasoner. It computes answers to queries based on the specification of both the DL and Rules components and is based on the notion of constrained SLD-derivation and constrained SLD-refutation. The system has been implemented in Prolog, coupled to our OWL reasoner Pellet. The key idea of this implementation is to pre-process all of the DL atoms that appear in the Datalog rules, and include them as facts in the relational subsystem covering all the possible models. Once the pre-processing is done, any query can be answered by the relational component using any of the known techniques for Datalog query evaluation.
Presentations
The presentation on the tool Swoop+Rules given at the MIND Lab in July 2005 is available here.The presentation on the combination orf OWL and Rules languages given at the CMSC828W course is available here.
Examples
Some examples to test the Swoop+Rules tool can be found here. These include a few test queries.Download
You can download a prototype version of the Swoop+Rules tool.Members
Edna RuckhausDaniel Hewlett
Bijan Parsia
Aditya Kalyanpur
Bernardo Cuenca
Evren Sirin