Content deleted Content added
m →Implementations: removed superfluous mention of Protégé in sentence |
|||
(46 intermediate revisions by 36 users not shown) | |||
Line 1:
{{Short description|Language to express rules and logic with semantic web}}
{{Use dmy dates|date=February 2021}}
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 [[Web Ontology Language|OWL DL]] or OWL Lite with a subset of the [[RuleML|Rule Markup Language]] (itself a subset of [[Datalog]]).<ref>{{Cite web|url=https://www.w3.org/Submission/SWRL/|title=SWRL: A Semantic Web Rule Language Combining OWL and RuleML|website=W3C |date=21 May 2004 |first1= Ian |last1=Horrocks|first2=Peter F. |last2=Patel-Schneider|first3=Harold |last3=Boley|first4=Said |last4=Tabet|first5=Benjamin |last5=Grosof|first6=Mike |last6=Dean|language=en-US|access-date=2017-12-21}}</ref>
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.<ref name="Horrocks2004">{{Cite conference
| author = Ian Horrocks
| author2 = Peter F. Patel-Schneider
| title = A Proposal for an OWL Rules Language
| book-title = Proc. of the Thirteenth International World Wide Web Conference (WWW 2004)
| pages = 723–731
| publisher = ACM
| year = 2004
| url = http://www.cs.ox.ac.uk/people/ian.horrocks/Publications/download/2004/HoPa04a.pdf
| access-date = 2014-05-22 }}</ref><ref name="Horrocks2005">{{Cite journal
| author = Ian Horrocks |author2=Peter F. Patel-Schneider |author3=Sean Bechhofer |author4=Dmitry Tsarkov
| title = OWL Rules: A Proposal and Prototype Implementation
| journal = Journal of Web Semantics
| volume = 3
| issue = 1
| pages = 23–40
| publisher = Elsevier
| year = 2005
|doi=10.1016/j.websem.2005.05.003 | url = http://www.cs.ox.ac.uk/people/ian.horrocks/Publications/download/2005/HPBT05.pdf
| access-date = 2014-05-22 }}</ref>
SWRL has the full power of OWL DL, but at the price of decidability and practical implementations.<ref name="Parsia2005">{{Cite journal
| author = Bijan Parsia
| title = Cautiously Approaching SWRL
| year = 2005
| url =
| access-date = 2006-07-29 |display-authors=etal}}</ref>
However, decidability can be regained by restricting the form of admissible rules, typically by imposing a suitable safety condition.<ref name="Motik2005">{{Cite journal
| author = Boris Motik |author2=Ulrike Sattler |author3=Rudi Studer
| title = Query Answering for OWL-DL with Rules
| journal = Journal of Web Semantics
| volume = 3
| issue = 1
| pages = 41–60
| publisher = Elsevier
| year = 2005
|doi=10.1016/j.websem.2005.05.001 | url = http://www.cs.ox.ac.uk/boris.motik/pubs/mss05query-journal.pdf
| access-date = 2014-05-22 }}</ref>
Rules are of the form of an implication between an antecedent (body) and a 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 ==
hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)
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"/>
Line 44 ⟶ 73:
</ruleml:_head>
</ruleml:imp>
</syntaxhighlight>
=== RDF Concrete Syntax ===
It is straightforward to provide such an [[Resource Description Framework|RDF]] concrete syntax for rules, but the presence of variables in rules goes beyond the RDF Semantics.<ref name="mei2006">{{cite journal
| last = Mei
| first = Jing
|
| title = Interpreting SWRL Rules in RDF Graphs
| journal = Electronic Notes in Theoretical Computer Science
| issue =
| pages = 53–69
| publisher = Elsevier
| year = 2006
| volume = 151
| doi = 10.1016/j.entcs.2005.07.036
| s2cid = 14325289
| url = http://www.is.pku.edu.cn/~mayyam/papers/Interpreting%20SWRL%20Rules%20in%20RDF%20Graphs.pdf
| access-date = 2006-07-29 }}</ref> 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). # [[Protege (software)|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. [https://archive.today/20121215054848/http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTab]
# '''[[R2ML]]''' (REWERSE Rule Markup Language) supports SWRL. [http://oxygen.informatik.tu-cottbus.de/rewerse-i1/?q=node/6]
# '''RacerPro''', supports the processing of rules in a SWRL-based syntax by translating them into nRQL rules [https://web.archive.org/web/20060718175210/http://www.racer-systems.com/products/racerpro/index.phtml]
{| class="wikitable" style="font-size: 85%; text-align: center; width: 100%; table-layout: fixed;"
! style="width: 16em" |
!
!
!
|-
! SWRL/OWLX Parser
| {{Yes}}
| {{dunno}}
| {{dunno}}
|-
! SWRL/RDF Parser
| {{Yes}}
| {{dunno}}
| {{Yes}}
|-
! Math Built-Ins
|
| {{dunno}}
| {{Yes}}
|-
! String Built-Ins
|
| {{dunno}}
| {{Yes}}
|-
! Comparison Built-Ins
| {{dunno}}
| {{dunno}}
| {{Yes}}
|-
! Boolean Built-Ins
| {{dunno}}
| {{dunno}}
| {{Yes}}
|-
!
| {{dunno}}
| {{dunno}}
| {{No}}
|-
! URI Built-Ins
| {{dunno}}
| {{dunno}}
| {{Yes}}
|-
! Lists Built-Ins
| {{dunno}}
| {{dunno}}
| {{No}}
|-
! Licensing
|
|
|
|}
== Comparison with Description Logic Programs ==
[[Description Logic Programs]] (DLPs) are another proposal for integrating rules and OWL.<ref name="Grosof2003">
| author = Benjamin N. Grosof |author2=Ian Horrocks |author3=Raphael Volz |author4=Stefan Decker
| title = Description Logic Programs: Combining Logic Programs with Description Logic
| book-title = Proc. of the Twelfth International World Wide Web Conference (WWW 2003)
| pages = 48–57
| publisher = ACM
| year = 2003
| url = http://www.cs.ox.ac.uk/people/ian.horrocks/Publications/download/2003/p117-grosof.pdf
| access-date = 2014-05-22 }}</ref>
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.<ref name="Parsia2005"/> In DLP, the resultant language is a very peculiar looking description logic and rather inexpressive language overall.<ref name="Parsia2005"/>
== Future Directions and Applications of SWRL ==
As the Semantic Web continues to evolve, the role of SWRL in enabling automated reasoning and decision-making processes will likely expand. While current implementations, such as those found in Protégé and Pellet, provide significant capabilities, ongoing advancements in artificial intelligence and knowledge representation may lead to even more sophisticated reasoning engines that better handle the computational complexities introduced by SWRL. Furthermore, as data integration across diverse domains becomes increasingly critical, SWRL could play a pivotal role in enhancing interoperability between systems that utilize OWL ontologies. The combination of rules with ontologies, as facilitated by SWRL, remains a powerful mechanism for drawing inferences and uncovering relationships in large, distributed datasets, offering broad applicability in fields such as healthcare, finance, and semantic data analytics.<ref>{{Cite web |title=OWL - Semantic Web Standards |url=https://www.w3.org/OWL/ |access-date=2024-09-13 |website=www.w3.org}}</ref>
== See also ==
Line 141 ⟶ 185:
* [[Semantic Web]]
* [[Semantic Grid]]
* [[Ontology (
* [[Business Intelligence 2.0]] (BI 2.0)
* [[Semantic wiki]]
Line 154 ⟶ 198:
{{Semantic Web}}
[[Category:Semantic Web]]
[[Category:Knowledge representation languages]]
|