Semantic Web Rule Language: Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 7 templates: hyphenate params (8×);
 
(14 intermediate revisions by 12 users not shown)
Line 1:
{{Short description|Language to express rules and logic with semantic web}}
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=www.w3.org|language=en-US|access-date=2017-12-21}}</ref>
{{Use dmy dates|date=JanuaryFebruary 20112021}}
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=wwwW3C |date=21 May 2004 |first1= Ian |last1=Horrocks|first2=Peter F.w3.org |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
Line 10 ⟶ 12:
| year = 2004
| url = http://www.cs.ox.ac.uk/people/ian.horrocks/Publications/download/2004/HoPa04a.pdf
| format = 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
Line 20 ⟶ 21:
| 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
| format = PDF
| access-date = 2014-05-22 }}</ref>
 
Line 29:
| year = 2005
| url = https://cs.uwaterloo.ca/~gweddell/cs848/SWRL_Parsia_et_al.pdf
| format = PDF
| 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
Line 40 ⟶ 39:
| 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
| format = 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 ==
Line 76 ⟶ 74:
</ruleml:imp>
</syntaxhighlight>
 
=== RDF Concrete Syntax ===
 
Line 84 ⟶ 83:
| title = Interpreting SWRL Rules in RDF Graphs
| journal = Electronic Notes in Theoretical Computer Science
| issue = 1512
| pages = 53–69
| publisher = Elsevier
| year = 2006
| formatvolume = PDF151
| url = http://www.is.pku.edu.cn/~mayyam/papers/Interpreting%20SWRL%20Rules%20in%20RDF%20Graphs.pdf
| 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:
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.
{{Expand section|date=January 2007}}
*# For older versions of Protégé, '''SWRLTab''' is an extension that supports editing and execution of SWRL rules. [https://archive.istoday/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]
* [[Protege (software)|Protégé]] 4.2 includes a Rules view in its Ontology Views that supports SWRL rules.
# '''Bossam''', a [[forward chaining]] rule engine supports SWRL. [http://bossam.wordpress.com/]
* For older versions of Protégé, '''SWRLTab''' is an extension that supports editing and execution of SWRL rules. [https://archive.is/20121215054848/http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTab]
*# '''[[R2ML]]Hoolet''', (REWERSEan Ruleimplementation Markupof Language)an OWL-DL reasoner that uses a first order prover supports SWRL. [http://oxygenowl.informatikman.tu-cottbusac.de/rewerse-i1uk/?q=nodehoolet/6]
*# '''BossamPellet''', aan [[forwardopen-source chaining]]Java ruleOWL engineDL supportsreasoner has SWRL-support. [https://web.archive.org/web/20070925082014/http://bossampellet.wordpressowldl.com/]
*# '''HooletKAON2''', is an implementationinfrastructure offor anmanaging OWL-DL, reasonerSWRL, thatand usesF-Logic a first order prover supports SWRLontologies. [http://owlkaon2.mansemanticweb.ac.uk/hooletorg/]
*# '''PelletRacerPro''', ansupports open-sourcethe Javaprocessing OWLof DLrules reasonerin hasa SWRL-support.based syntax by translating them into nRQL rules [https://web.archive.org/web/2007092508201420060718175210/http://pelletwww.owldlracer-systems.com/products/racerpro/index.phtml]
*# '''KAON2Stardog''' is an infrastructureRDF fordatabase managingor OWL-DL,[[triplestore]] SWRL,that andrewrites F-Logicqueries ontologiesto answer questions using SWRL inferences. [http://kaon2.semanticwebstardog.orgcom/]
{| borderclass="1" cellpadding="1" cellspacing="0wikitable" style="font-size: 85%; border: gray solid 1px; border-collapse: collapse; text-align: center; width: 100%; table-layout: fixed;" class="wikitable"
* '''RacerPro''', supports 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]
* '''RDFox''' a main-memory, highly-scalable Datalog reasoning engine that supports SWRL. Developed by Oxford Semantic Technologies. [https://www.oxfordsemantic.tech]
* '''Stardog''' is an RDF database or [[triplestore]] that rewrites queries to answer questions using SWRL inferences. [http://stardog.com/]
 
{| border="1" cellpadding="1" cellspacing="0" style="font-size: 85%; border: gray solid 1px; border-collapse: collapse; text-align: center; width: 100%; table-layout: fixed;" class="wikitable"
|- style="background: #ececec"
! style="width: 16em" |
! '''Bossam'''
! '''Hoolet'''
! '''Pellet'''
|-
! SWRL/OWLX Parser
Line 168 ⟶ 164:
|}
 
== Comparison with Description Logic Programs ==
[[Description Logic Programs]] (DLPs) are another proposal for integrating rules and OWL.<ref name="Grosof2003">{{Cite conference
| author = Benjamin N. Grosof |author2=Ian Horrocks |author3=Raphael Volz |author4=Stefan Decker
Line 177 ⟶ 173:
| year = 2003
| url = http://www.cs.ox.ac.uk/people/ian.horrocks/Publications/download/2003/p117-grosof.pdf
| format = 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 187 ⟶ 185:
* [[Semantic Web]]
* [[Semantic Grid]]
* [[Ontology (computerinformation science)]]
* [[Business Intelligence 2.0]] (BI 2.0)
* [[Semantic wiki]]
Line 200 ⟶ 198:
 
{{Semantic Web}}
 
{{Use dmy dates|date=January 2011}}
 
[[Category:Semantic Web]]