Semantic Web Rule Language
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
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.
Example
Human Readable Syntax
hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)
XML Concrete Syntax
The XML Concrete Syntax is a combination of the OWL Web Ontology Language XML Presentation Syntax with the RuleML XML syntax.
<ruleml:imp>
<ruleml:_rlab ruleml:href="#example1"/>
<ruleml:_body>
<swrlx:individualPropertyAtom swrlx:property="hasParent">
<ruleml:var>x1</ruleml:var>
<ruleml:var>x2</ruleml:var>
</swrlx:individualPropertyAtom>
<swrlx:individualPropertyAtom swrlx:property="hasBrother">
<ruleml:var>x2</ruleml:var>
<ruleml:var>x3</ruleml:var>
</swrlx:individualPropertyAtom>
</ruleml:_body>
<ruleml:_head>
<swrlx:individualPropertyAtom swrlx:property="hasUncle">
<ruleml:var>x1</ruleml:var>
<ruleml:var>x3</ruleml:var>
</swrlx:individualPropertyAtom>
</ruleml:_head>
</ruleml:imp>
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.[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.
Implementations
Caveat: Reasoners do not support the full specification because the reasoning becomes undecidable. There can be three types of approach:
- translate SWRL into First Order Logic (Hoolet) and demonstrate reasoning tasks with a theorem prover;
- 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)
- expand an existing OWL-DL reasoner based on the tableaux algorithm (Pellet).
This section needs expansion. You can help by adding to it. (January 2007) |
- Protégé4.2 includes a Rules view in its Ontology Views that supports SWRL rules.
- For older versions of Protégé, SWRLTab is an extension that supports editing and execution of SWRL rules. [1]
- R2ML (REWERSE Rule Markup Language) supports SWRL. [2]
- Bossam, a forward chaining rule engine supports SWRL. [3]
- Hoolet, an implementation of an OWL-DL reasoner that uses a first order prover supports SWRL. [4]
- Pellet, an open-source Java OWL DL reasoner has SWRL-support. [5]
- KAON2 is an infrastructure for managing OWL-DL, SWRL, and F-Logic ontologies. [6]
- RacerPro, supports processing of rules in a SWRL-based syntax by translating them into nRQL rules [7]
- Stardog is an RDF database or triplestore that rewrites queries to answer questions using SWRL inferences. [8]
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
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
See also
- Description Logic
- Web Ontology Language - "OWL"
- Datalog (query and rule language)
- Semantic Web
- Semantic Grid
- Ontology (information science)
- Business Intelligence 2.0 (BI 2.0)
- Semantic wiki
References
- ^ "SWRL: A Semantic Web Rule Language Combining OWL and RuleML". w3.org. Retrieved 21 December 2017.
- ^ 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 22 May 2014.
- . Retrieved 22 May 2014.
- ^ a b c Bijan Parsia; et al. (2005). "Cautiously Approaching SWRL" (PDF). Retrieved 29 July 2006.
{{cite journal}}
: Cite journal requires|journal=
(help) - . Retrieved 22 May 2014.
- S2CID 14325289. Retrieved 29 July 2006.
- ^ 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 22 May 2014.
External links
- SWRL: A Semantic Web Rule Language Combining OWL and RuleML, W3C Member Submission 21 May 2004
- A Proposal for a SWRL Extension towards First-Order Logic, W3C Member Submission 11 April 2005
- OWL Web Ontology Language XML Presentation Syntax, W3C Note 11 June 2003