Semantic Web Rule Language


The Semantic Web Rule Language is a proposed language for the Semantic Web that can be used to express rules as well as logic, combining OWL DL or OWL Lite with a subset of the Rule Markup Language.
The specification was submitted in May 2004 to the W3C by the National Research Council of Canada, Network Inference, and Stanford University in association with the Joint US/EU ad hoc Agent Markup Language Committee. The specification was based on an earlier proposal for an OWL rules language.
SWRL has the full power of OWL DL, but at the price of decidability and practical implementations.
However, decidability can be regained by restricting the form of admissible rules, typically by imposing a suitable safety condition.
Rules are of the form of an implication between an antecedent and consequent. 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.

Example

Human Readable Syntax

hasParent ∧ hasBrother ⇒ hasUncle

XML Concrete Syntax

The XML Concrete Syntax is a combination of the OWL Web Ontology Language XML Presentation Syntax with the RuleML XML syntax.





x1
x2


x2
x3




x1
x3



RDF Concrete Syntax

It is straightforward to provide such an RDF concrete syntax for rules, but the presence of variables in rules goes beyond the RDF Semantics. Translation from the XML Concrete Syntax to RDF/XML could be easily accomplished by extending the XSLT transformation for the OWL XML Presentation syntax.

Implementations

Caveat: Reasoners do not support the full specification because the reasoning becomes undecidable.
There can be three types of approach:
  1. translate SWRL into First Order Logic and demonstrate reasoning tasks with a theorem prover;
  2. translate OWL-DL into rules and give the rules to a forward chaining engine
  3. expand an existing OWL-DL reasoner based on the tableaux algorithm.
are another proposal for integrating rules and OWL.
Compared with Description Logic Programs, SWRL takes a diametrically opposed integration approach. DLP is the intersection of Horn logic and OWL, whereas SWRL is the union of them. In DLP, the resultant language is a very peculiar looking description logic and rather inexpressive language overall.