SWRL
Encyclopedia
SWRL is a proposal for a Semantic Web
rules-language, combining sublanguages of the OWL Web Ontology Language
(OWL DL and Lite) with those of the Rule Markup Language
(Unary/Binary Datalog
).
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.
SWRL has the full power of OWL DL, but at the price of decidability and practical implementations.
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.
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.
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.
Semantic Web
The Semantic Web is a collaborative movement led by the World Wide Web Consortium that promotes common formats for data on the World Wide Web. By encouraging the inclusion of semantic content in web pages, the Semantic Web aims at converting the current web of unstructured documents into a "web of...
rules-language, combining sublanguages of the OWL Web Ontology Language
Web Ontology Language
The Web Ontology Language is a family of knowledge representation languages for authoring ontologies.The languages are characterised by formal semantics and RDF/XML-based serializations for the Semantic Web...
(OWL DL and Lite) with those of the Rule Markup Language
RuleML
The Rule Markup Language is a markup language developed to express both forward and backward rules in XML for deduction, rewriting, and further inferential-transformational tasks...
(Unary/Binary Datalog
Datalog
Datalog is a query and rule language for deductive databases that syntactically is a subset of Prolog. Its origins date back to the beginning of logic programming, but it became prominent as a separate area around 1977 when Hervé Gallaire and Jack Minker organized a workshop on logic and databases...
).
The specification was submitted in May 2004 to the W3C by the National Research Council of Canada
National Research Council of Canada
The National Research Council is an agency of the Government of Canada which conducts scientific research and development.- History :...
, Network Inference (since acquired by webMethods
WebMethods
webMethods is an enterprise software company, acquired by Software AG, focused on application integration, business process integration and B2B partner integration. Founded in 1996, the company pioneered the use of web services to connect software applications together within a single organization...
), and Stanford University
Stanford University
The Leland Stanford Junior University, commonly referred to as Stanford University or Stanford, is a private research university on an campus located near Palo Alto, California. It is situated in the northwestern Santa Clara Valley on the San Francisco Peninsula, approximately northwest of San...
in association with the Joint US/EU ad hoc Agent Markup Language Committee.
SWRL has the full power of OWL DL, but at the price of decidability and practical implementations.
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 SyntaxhasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)
XML Concrete Syntax
The XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
Concrete Syntax is a combination of the OWL Web Ontology Language XML Presentation Syntax with the RuleML XML syntax.
RDF Concrete Syntax
It is straightforward to provide such an RDF
Resource Description Framework
The Resource Description Framework is a family of World Wide Web Consortium specifications originally designed as a metadata data model...
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
RDF/XML
RDF/XML is a syntax, defined by the W3C, to express an RDF graph as an XML document. According to the W3C, "RDF/XML is the normative syntax for writing RDF"....
could be easily accomplished by extending the XSLT
XSLT
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...
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).- SWRLTab is an extension to ProtegeProtege (software)Protégé is a free, open source ontology editor and a knowledge acquisition system. Like Eclipse, Protégé is a framework for which various other projects suggest plugins. This application is written in Java and heavily uses Swing to create the rather complex user interface...
that supports editing and execution of SWRL rules. http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTab - R2MLR2MLThe REWERSE Rule Markup Language is developed by the for the purpose of rules interchange between different systems and tools.-Scope:* An XML based rule language;...
(REWERSE Rule Markup Language) supports SWRL. http://oxygen.informatik.tu-cottbus.de/rewerse-i1/?q=node/6 - Bossam, a forward chainingForward chainingForward chaining is one of the two main methods of reasoning when using inference rules and can be described logically as repeated application of modus ponens. Forward chaining is a popular implementation strategy for expert systems, business and production rule systems...
rule engine supports SWRL. http://bossam.wordpress.com/ - Hoolet, an implementation of an OWL-DL reasoner that uses a first order prover supports SWRL. http://owl.man.ac.uk/hoolet/
- Pellet, an open-source Java OWL DL reasoner has SWRL-support. http://pellet.owldl.com/
- KAON2 is an infrastructure for managing OWL-DL, SWRL, and F-Logic ontologies. http://kaon2.semanticweb.org/
- RacerPro, supports processing of rules in a SWRL-based syntax by translating them into nRQL rules http://www.racer-systems.com/products/racerpro/index.phtml
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 | ? | ? | ? |
URI Built-Ins | ? | ? | Yes |
Lists Built-Ins | ? | ? | No |
Licencing | 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. 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. In DLP, the resultant language is a very peculiar looking description logic and rather inexpressive language overall.See also
- Description LogicDescription logicDescription logic is a family of formal knowledge representation languages. It is more expressive than propositional logic but has more efficient decision problems than first-order predicate logic....
- Web Ontology LanguageWeb Ontology LanguageThe Web Ontology Language is a family of knowledge representation languages for authoring ontologies.The languages are characterised by formal semantics and RDF/XML-based serializations for the Semantic Web...
- "OWL" - DatalogDatalogDatalog is a query and rule language for deductive databases that syntactically is a subset of Prolog. Its origins date back to the beginning of logic programming, but it became prominent as a separate area around 1977 when Hervé Gallaire and Jack Minker organized a workshop on logic and databases...
(query and rule language) - Semantic WebSemantic WebThe Semantic Web is a collaborative movement led by the World Wide Web Consortium that promotes common formats for data on the World Wide Web. By encouraging the inclusion of semantic content in web pages, the Semantic Web aims at converting the current web of unstructured documents into a "web of...
- Semantic GridSemantic GridThe Semantic Grid refers to an approach to Grid computing in which information, computing resources and services are described using the semantic data model. In this model the data and metadata are expressed through facts . Therefore it becomes directly understandable for humans...
- Ontology (computer science)Ontology (computer science)In computer science and information science, an ontology formally represents knowledge as a set of concepts within a domain, and the relationships between those concepts. It can be used to reason about the entities within that domain and may be used to describe the domain.In theory, an ontology is...
- Business Intelligence 2.0Business Intelligence 2.0Business Intelligence 2.0 is a term that refers to new tools and software for business intelligence, beginning in the mid-2000s, that enable, among other things, dynamic querying of real-time corporate data by employees, and a more web- and browser-based approached to such data, as opposed to the...
(BI 2.0) - Semantic wikiSemantic WikiA semantic wiki is a wiki that has an underlying model of the knowledge described in its pages. Regular, or syntactic, wikis have structured text and untyped hyperlinks...
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