Powered by
Share this page on
Article provided by Wikipedia

The Semantic Web Rule Language (SWRL) 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 (itself a subset of "Datalog).[1]

The specification was submitted in May 2004 to the "W3C by the "National Research Council of Canada, Network Inference (since acquired by "webMethods), 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.[2] [3]

SWRL has the full power of OWL DL, but at the price of decidability and practical implementations.[4] However, decidability can be regained by restricting the form of admissible rules, typically by imposing a suitable safety condition. [5]

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.



Human Readable Syntax[edit]

hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)

XML Concrete Syntax[edit]

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

  <ruleml:_rlab ruleml:href="#example1"/>
    <swrlx:individualPropertyAtom  swrlx:property="hasParent"> 
    <swrlx:individualPropertyAtom  swrlx:property="hasBrother"> 
    <swrlx:individualPropertyAtom  swrlx:property="hasUncle"> 

RDF Concrete Syntax[edit]

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


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 (Hoolet) and demonstrate reasoning tasks with a theorem prover;
  2. translate OWL-DL into rules and give the rules to a forward chaining engine (Bossam) (this approach cannot cover the full expressivity of OWL-DL due to many incompatibilities between Description Logic and Horn Rule formalisms)
  3. expand an existing OWL-DL reasoner based on the tableaux algorithm (Pellet).
Bossam Hoolet Pellet
SWRL/OWLX Parser Yes ? ?
SWRL/RDF Parser Yes ? Yes
Math Built-Ins Partial ? Yes
String Built-Ins Partial ? Yes
Comparison Built-Ins ? ? Yes
Boolean Built-Ins ? ? Yes
Date, Time and Duration Built-Ins ? ? No
URI Built-Ins ? ? Yes
Lists Built-Ins ? ? No
Licensing Free/closed-source Free/open-source Free/open-source

Comparison with Description Logic Programs[edit]

Description Logic Programs (DLPs) are another proposal for integrating rules and OWL.[7] Compared with Description Logic Programs, SWRL takes a diametrically opposed integration approach. DLP is the intersection of "Horn logic and OWL, whereas SWRL is (roughly) the union of them.[4] In DLP, the resultant language is a very peculiar looking description logic and rather inexpressive language overall.[4]

See also[edit]


  1. ^ "SWRL: A Semantic Web Rule Language Combining OWL and RuleML". www.w3.org. Retrieved 2017-12-21. 
  2. ^ Ian Horrocks; Peter F. Patel-Schneider (2004). "A Proposal for an OWL Rules Language" (PDF). Proc. of the Thirteenth International World Wide Web Conference (WWW 2004). ACM. pp. 723–731. Retrieved 2014-05-22. 
  3. ^ Ian Horrocks; Peter F. Patel-Schneider; Sean Bechhofer; Dmitry Tsarkov (2005). "OWL Rules: A Proposal and Prototype Implementation" (PDF). Journal of Web Semantics. Elsevier. 3 (1): 23–40. Retrieved 2014-05-22. 
  4. ^ a b c Bijan Parsia; et al. (2005). "Cautiously Approaching SWRL" (PDF). Retrieved 2006-07-29. 
  5. ^ Boris Motik; Ulrike Sattler; Rudi Studer (2005). "Query Answering for OWL-DL with Rules" (PDF). Journal of Web Semantics. Elsevier. 3 (1): 41–60. Retrieved 2014-05-22. 
  6. ^ Mei, Jing; Harold Boley (2006). "Interpreting SWRL Rules in RDF Graphs" (PDF). Electronic Notes in Theoretical Computer Science. Elsevier (151): 53–69. Retrieved 2006-07-29. 
  7. ^ Benjamin N. Grosof; Ian Horrocks; Raphael Volz; Stefan Decker (2003). "Description Logic Programs: Combining Logic Programs with Description Logic" (PDF). Proc. of the Twelfth International World Wide Web Conference (WWW 2003). ACM. pp. 48–57. Retrieved 2014-05-22. 

External links[edit]

) ) WikipediaAudio is not affiliated with Wikipedia or the WikiMedia Foundation.