SWRL: A Semantic Web Rule Language
Combining OWL and RuleML

Draft Version 0.7 of 21 December 2004

This version:
http://www.daml.org/rules/proposal/
Latest version:
http://www.daml.org/rules/proposal/
Previous version:
http://www.daml.org/2004/04/swrl/
Authors:
Ian Horrocks, Department of Computer Science, University of Manchester
Peter F. Patel-Schneider, Bell Labs Research, Lucent Technologies
Harold Boley, National Research Council of Canada
Said Tabet, Macgregor, Inc.
Benjamin Grosof, Sloan School of Management, MIT
Mike Dean, BBN Technologies

This document is also available as a single HTML file.


Abstract

This document contains a proposal for a Semantic Web Rule Language (SWRL) based on a combination of the OWL DL and OWL Lite sublanguages of the OWL Web Ontology Language with the Unary/Binary Datalog RuleML sublanguages of the Rule Markup Language. SWRL includes a high-level abstract syntax for Horn-like rules in both the OWL DL and OWL Lite sublanguages of OWL. A model-theoretic semantics is given to provide the formal meaning for OWL ontologies including rules written in this abstract syntax. An XML syntax based on RuleML and the OWL XML Presentation Syntax as well as an RDF concrete syntax based on the OWL RDF/XML exchange syntax are also given, along with several examples.

Status of this document

This is a Draft produced 21 December 2004 as part of the DARPA DAML Program.

Comments on this document are invited. Discussion should take place on www-rdf-rules@w3.org. A repository of issues is being maintained here.


Table of contents


1. Introduction

This document contains a proposal for a Semantic Web Rule Language (SWRL) based on a combination of the OWL DL and OWL Lite sublanguages of the OWL Web Ontology Language with the Unary/Binary Datalog RuleML sublanguages of the Rule Markup Language. The proposal extends the set of OWL axioms to include Horn-like rules. It thus enables Horn-like rules to be combined with an OWL knowledge base. A high-level abstract syntax is provided that extends the OWL abstract syntax described in the OWL Semantics and Abstract Syntax document [OWL S&AS]. An extension of the OWL model-theoretic semantics is also given to provide a formal meaning for OWL ontologies including rules written in this abstract syntax.

The proposed rules are of the form of an implication between an antecedent (body) and consequent (head). The intended meaning can be read as: whenever the conditions specified in the antecedent hold, then the conditions specified in the consequent must also hold.

Both the antecedent (body) and consequent (head) consist of zero or more atoms. An empty antecedent is treated as trivially true (i.e. satisfied by every interpretation), so the consequent must also be satisfied by every interpretation; an empty consequent is treated as trivially false (i.e., not satisfied by any interpretation), so the antecedent must also not be satisfied by any interpretation. Multiple atoms are treated as a conjunction. Note that rules with conjunctive consequents could easily be transformed (via the Lloyd-Topor transformations [Lloyd87]) into multiple rules each with an atomic consequent.

Atoms in these rules can be of the form C(x), P(x,y), sameAs(x,y) or differentFrom(x,y), where C is an OWL description, P is an OWL property, and x,y are either variables, OWL individuals or OWL data values. It is easy to see that OWL DL becomes undecidable when extended in this way as rules can be used to simulate role value maps [Schmidt-Schauß89].

An XML syntax is also given for these rules based on RuleML and the OWL XML presentation syntax. Furthermore, an RDF concrete syntax based on the OWL RDF/XML exchange syntax is presented. The rule syntaxes are illustrated with several running examples. Finally, we give usage suggestions and cautions.


Acknowledgments

This document was produced as part of the DARPA DAML Program, and has benefited from extensive discussion in the Joint US/EU ad hoc Agent Markup Language Committee, with contributions from Sandro Hawke and Pat Hayes being worthy of particular mention. It has also benefited from the close cooperation of the RuleML initiative, and input from the Semantic Web Services Initiative (SWSI).


References

[Grosof et al 2003]
Description Logic Programs: Combining Logic Programs with Description Logic. Benjamin Grosof, Ian Horrocks, Raphael Volz, Stefan Decker. Proc. WWW2003, Budapest, May 2003. http://www2003.org/cdrom/papers/refereed/p117/p117-grosof.html (also http://ebusiness.mit.edu/bgrosof/#DLP).
[Lloyd87]
Foundations of logic programming (second, extended edition). J. W. Lloyd. Springer series in symbolic computation. Springer-Verlag, New York, 1987.
[OWL Reference]
OWL Web Ontology Language Reference. Mike Dean, Guus Schreiber, Sean Bechhofer, Frank van Harmelen, James Hendler, Ian Horrocks, Deborah L. McGuinness, Peter F. Patel-Schneider, and Lynn Andrea Stein. W3C Recommendation 10 February 2004. Latest version is available at http://www.w3.org/TR/owl-ref/.
[OWL S&AS]
OWL Web Ontology Language Semantics and Abstract Syntax. Peter F. Patel-Schneider, Pat Hayes and Ian Horrocks, eds. W3C Recommendation 10 February 2004. Latest version is available at http://www.w3.org/TR/owl-semantics/.
[OWL XML]
OWL Web Ontology Language XML Presentation Syntax. Masahiro Hori, Jérôme Euzenat, Peter F. Patel-Schneider. W3C Note 11 June 2003
[RDF Concepts]
Resource Description Framework (RDF) Concepts and Abstract Syntax. Graham Klyne, Jeremy J. Carroll, and Brian McBride, eds. W3C Recommendation 10 February 2004. Latest version is available at http://www.w3.org/TR/rdf-concepts/.
[RuleML]
Rule Markup Language Initiative.
[Schmidt-Schauß89]
Subsumption in KL-ONE is Undecidable. M. Schmidt-Schauß. Proc. of KR'89, pages 421-431, Morgan Kaufmann.
[XML]
Extensible Markup Language (XML) 1.0 (Second Edition). Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler, eds. W3C Recommendation 6 October 2000. Latest version is available at http://www.w3.org/TR/REC-xml/.