ArticleslgStudy

science

Semantic Web Rule Language

Semantic Web Rule Language is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Semantic Web Rule Language rather than just read about it. In short: 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). 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 associat…

Key takeaways

  • Semantic Web Rule Language belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Semantic Web Rule Language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Semantic Web Rule Language from memory before moving on to harder problems.

Reference excerpt

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). 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. SWRL has the full power of OWL DL, but at the price of decidability and practical implementations. However, decidability can be regained by restricting the form of admissible rules, typically by imposing a suitable safety condition. 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. Both the antecedent and the consequent are composed of conjunctions of atoms. The basic atom forms are:

C(x) — a class description atom, asserting that individual x belongs to class C P(x, y) — a property atom, asserting that individual x is related to individual y (or a data value) by property P sameAs(x, y) and differentFrom(x, y) — identity atoms The specification notes that the sameAs and differentFrom atoms do not increase the expressivity of the language, since OWL together with rules (without these atoms) is already capable of the same expressions.

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.

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.

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). 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. [link removed] R2ML (REWERSE Rule Markup Language) supports SWRL. [1] Bossam, a forward chaining rule engine supports SWRL. [2] Hoolet, an implementation of an OWL-DL reasoner that uses a first order prover supports SWRL. [3] Pellet, an open-source Java OWL DL reasoner has SWRL-support. [4] KAON2 is an infrastructure for managing OWL-DL, SWRL, and F-Logic ontologies. [5] Archived 6 January 2006 at the Wayback Machine RacerPro, supports the processing of rules in a SWRL-based syntax by translating them into nRQL rules [6] Stardog is an RDF database or triplestore that rewrites queries to answer questions using SWRL inferences. [7]

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 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

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

Worked examples

Example 1 — a first encounter with Semantic Web Rule Language

Start with the simplest possible case. Write down what Semantic Web Rule Language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Semantic Web Rule Language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Semantic Web Rule Language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Semantic Web Rule Language

In research
Semantic Web Rule Language appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Semantic Web Rule Language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Semantic Web Rule Language is common in secondary-school and first-year university syllabi. It links to neighbouring topics Knowledge representation languages, Semantic Web, so understanding it makes those chapters shorter.
In everyday life
Look for Semantic Web Rule Language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Semantic Web Rule Language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Semantic Web Rule Language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Semantic Web Rule Language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Semantic Web Rule Language in simple terms?

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). The specification was submitted in May 2004 to the W3C by the Na…

Why does Semantic Web Rule Language matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Semantic Web Rule Language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Semantic Web Rule Language.

Tags

  • Knowledge representation languages
  • Semantic Web

Keep exploring