Semantic Web Rule Language

Last updated

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]

Contents

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.

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:_rlabruleml:href="#example1"/><ruleml:_body><swrlx:individualPropertyAtomswrlx:property="hasParent"><ruleml:var>x1</ruleml:var><ruleml:var>x2</ruleml:var></swrlx:individualPropertyAtom><swrlx:individualPropertyAtomswrlx:property="hasBrother"><ruleml:var>x2</ruleml:var><ruleml:var>x3</ruleml:var></swrlx:individualPropertyAtom></ruleml:_body><ruleml:_head><swrlx:individualPropertyAtomswrlx: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:

  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).
BossamHooletPellet
SWRL/OWLX ParserYes??
SWRL/RDF ParserYes?Yes
Math Built-InsPartial?Yes
String Built-InsPartial?Yes
Comparison Built-Ins??Yes
Boolean Built-Ins??Yes
Date, Time and Duration Built-Ins??No
URI Built-Ins??Yes
Lists Built-Ins??No
LicensingFree/closed-sourceFree/open-sourceFree/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 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

Related Research Articles

The Semantic Web, sometimes known as Web 3.0, is an extension of the World Wide Web through standards set by the World Wide Web Consortium (W3C). The goal of the Semantic Web is to make Internet data machine-readable.

The DARPA Agent Markup Language (DAML) was the name of a US funding program at the US Defense Advanced Research Projects Agency (DARPA) started in 1999 by then-Program Manager James Hendler, and later run by Murray Burke, Mark Greaves and Michael Pagels. The program focused on the creation of machine-readable representations for the Web.

The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data. RDF provides a variety of syntax notations and data serialization formats, with Turtle currently being the most widely used notation.

OIL can be regarded as an ontology infrastructure for the Semantic Web. OIL is based on concepts developed in Description Logic (DL) and frame-based systems and is compatible with RDFS.

Description logics (DL) are a family of formal knowledge representation languages. Many DLs are more expressive than propositional logic but less expressive than first-order logic. In contrast to the latter, the core reasoning problems for DLs are (usually) decidable, and efficient decision procedures have been designed and implemented for these problems. There are general, spatial, temporal, spatiotemporal, and fuzzy description logics, and each description logic features a different balance between expressive power and reasoning complexity by supporting different sets of mathematical constructors.

The Web Ontology Language (OWL) is a family of knowledge representation languages for authoring ontologies. Ontologies are a formal way to describe taxonomies and classification networks, essentially defining the structure of knowledge for various domains: the nouns representing classes of objects and the verbs representing relations between the objects.

RDF Schema (Resource Description Framework Schema, variously abbreviated as RDFS, RDF(S), RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation data model, providing basic elements for the description of ontologies. It uses various forms of RDF vocabularies, intended to structure RDF resources. RDF and RDFS can be saved in a triplestore, then one can extract some knowledge from them using a query language, like SPARQL.

In computer science and artificial intelligence, ontology languages are formal languages used to construct ontologies. They allow the encoding of knowledge about specific domains and often include reasoning rules that support the processing of that knowledge. Ontology languages are usually declarative languages, are almost always generalizations of frame languages, and are commonly based on either first-order logic or on description logic.

RDFa or Resource Description Framework in Attributes is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within Web documents. The Resource Description Framework (RDF) data-model mapping enables its use for embedding RDF subject-predicate-object expressions within XHTML documents. It also enables the extraction of RDF model triples by compliant user agents.

<span class="mw-page-title-main">Semantic technology</span>

The ultimate goal of semantic technology is to help machines understand data. To enable the encoding of semantics with the data, well-known technologies are RDF and OWL. These technologies formally represent the meaning involved in information. For example, ontology can describe concepts, relationships between things, and categories of things. These embedded semantics with the data offer significant advantages such as reasoning over data and dealing with heterogeneous data sources.

The REWERSE Rule Markup Language (R2ML) is developed by the REWERSE Working Group I1 for the purpose of rules interchange between different systems and tools.

OMDoc is a semantic markup format for mathematical documents. While MathML only covers mathematical formulae and the related OpenMath standard only supports formulae and “content dictionaries” containing definitions of the symbols used in formulae, OMDoc covers the whole range of written mathematics.

<span class="mw-page-title-main">Ian Horrocks</span>

Ian Robert Horrocks is a professor of computer science at the University of Oxford in the UK and a Fellow of Oriel College, Oxford. His research focuses on knowledge representation and reasoning, particularly ontology languages, description logic and optimised tableaux decision procedures.

The Rule Interchange Format (RIF) is a W3C Recommendation. RIF is part of the infrastructure for the semantic web, along with (principally) SPARQL, RDF and OWL. Although originally envisioned by many as a "rules layer" for the semantic web, in reality the design of RIF is based on the observation that there are many "rules languages" in existence, and what is needed is to exchange rules between them.

A semantic reasoner, reasoning engine, rules engine, or simply a reasoner, is a piece of software able to infer logical consequences from a set of asserted facts or axioms. The notion of a semantic reasoner generalizes that of an inference engine, by providing a richer set of mechanisms to work with. The inference rules are commonly specified by means of an ontology language, and often a description logic language. Many reasoners use first-order predicate logic to perform reasoning; inference commonly proceeds by forward chaining and backward chaining. There are also examples of probabilistic reasoners, including non-axiomatic reasoning systems, and probabilistic logic networks.

The Semantic Web Stack, also known as Semantic Web Cake or Semantic Web Layer Cake, illustrates the architecture of the Semantic Web.

WSML or Web Service Modeling Language is a formal language that provides a syntax and semantics for the Web Service Modeling Ontology (WSMO).

<span class="mw-page-title-main">Ontology engineering</span> Field which studies the methods and methodologies for building ontologies

In computer science, information science and systems engineering, ontology engineering is a field which studies the methods and methodologies for building ontologies, which encompasses a representation, formal naming and definition of the categories, properties and relations between the concepts, data and entities. In a broader sense, this field also includes a knowledge construction of the domain using formal ontology representations such as OWL/RDF. A large-scale representation of abstract concepts such as actions, time, physical objects and beliefs would be an example of ontological engineering. Ontology engineering is one of the areas of applied ontology, and can be seen as an application of philosophical ontology. Core ideas and objectives of ontology engineering are also central in conceptual modeling.

In the Semantic Web and in knowledge representation, a metaclass is a class whose instances are themselves classes. Similar to their role in programming languages, metaclasses in Semantic Web languages can have properties otherwise applicable only to individuals, while retaining the same class's ability to be classified in a concept hierarchy. This enables knowledge about instances of those metaclasses to be inferred by semantic reasoners using statements made in the metaclass. Metaclasses thus enhance the expressivity of knowledge representations in a way that can be intuitive for users. While classes are suitable to represent a population of individuals, metaclasses can, as one of their feature, be used to represent the conceptual dimension of an ontology. Metaclasses are supported in the ontology language OWL and the data-modeling vocabulary RDFS.

References

  1. "SWRL: A Semantic Web Rule Language Combining OWL and RuleML". w3.org. Retrieved 21 December 2017.
  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 22 May 2014.
  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. doi:10.1016/j.websem.2005.05.003 . Retrieved 22 May 2014.
  4. 1 2 3 Bijan Parsia; et al. (2005). "Cautiously Approaching SWRL" (PDF). Retrieved 29 July 2006.{{cite journal}}: Cite journal requires |journal= (help)
  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. doi:10.1016/j.websem.2005.05.001 . Retrieved 22 May 2014.
  6. Mei, Jing; Harold Boley (2006). "Interpreting SWRL Rules in RDF Graphs" (PDF). Electronic Notes in Theoretical Computer Science. Elsevier. 151 (2): 53–69. doi:10.1016/j.entcs.2005.07.036. S2CID   14325289 . Retrieved 29 July 2006.
  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 22 May 2014.