Professional Documents
Culture Documents
Vahid Karimi
June 2008
1 / 37
Outline
1 Introduction
OWL-DL
RuleML
2 SWRL Syntax
3 SWRL Semantics
2 / 37
Introduction Background
SWRL
3 / 37
Introduction Background
4 / 37
Introduction S+H+I+O+N
SHOIN
5 / 37
Introduction RuleML
6 / 37
Introduction RuleML
Implies
head body
Atom Atom
7 / 37
Introduction RuleML
Implies
head body
Atom
And
Atom
Atom
discount customer product 5 percent
Rel Var Var Ind
8 / 37
Introduction Rules
Rules with and-ing multiple atoms in the body are common, e.g.:
The discount for a customer on a product is 5% if the customer is
gold and the product is seasonal.
Rules with and-ing multiple atoms in the consequent:
Lloyd-Topor transformation:
translate the rule into multiple rules
9 / 37
SWRL Syntax
SWRL Syntax
p = Built-in names
10 / 37
SWRL Syntax
a ← b1 , . . . , bn where,
a : head (an atom) bs : body (all atoms)
11 / 37
SWRL Semantics
SWRL Semantics
12 / 37
SWRL Semantics
The following table shows Binding B(I) for the SWRL atoms:
13 / 37
SWRL Semantics
if it is not empty
and it is satisfied
14 / 37
SWRL
A SWRL Example
15 / 37
SWRL Rules in SWRL and DL
16 / 37
SWRL Rules in SWRL and DL
17 / 37
SWRL Rules in SWRL and DL
18 / 37
SWRL Rules in SWRL and DL
19 / 37
SWRL Rules in SWRL and DL
Example (cont’d)
expression of ∃R.Y
• Y is the named class restriction on ?y
∃hasCPU.∃hasSpeed.HighSpeed
20 / 37
SWRL Rules in SWRL and DL
Example (cont’d)
21 / 37
SWRL Rules in SWRL and DL
Some non-trivial rules can be translated from SWRL into DL, but
SWRL can express some rules that DL cannot
Example:
hasUncle(?nephew, ?uncle) ←
hasParent(?nephew, ?parent) ∧ hasBrother (?parent, ?uncle)
22 / 37
SWRL Rules in SWRL and DL
23 / 37
SWRL Safety
24 / 37
SWRL Safety
DL-safety Restrictions:
25 / 37
SWRL Safety
26 / 37
SWRL Role Safety
Role Safety
27 / 37
SWRL Built-ins
Adding Built-ins
>, ≥, ≤, <
for concrete domain (e.g., integers, strings)
to be used in a rule
28 / 37
Implementation and Applications SWRLTab, Pellet, and RacerPro
1 SWRLTab
• SWRL rules in Protege-OWL (open source)
2 Pellet
• An open source OWL DL reasoner in Java
3 RacerPro
• A commercial product
29 / 37
Implementation and Applications Application of Rules
30 / 37
SWRL Examples of Prior Work: 1. AL-Log
32 / 37
SWRL Decidable Combinations
33 / 37
A Related Proposal Description Logic Programs
DLP
Description Logic Programs (DLP) [GHVD03]:
A related suggestion for including rules to an ontology
• reuse criterion
• pragramatic criterion
• not applicable: expressivity
34 / 37
A Related Proposal Comparison between SWRL and DLP
35 / 37
Other Approaches 1. Answer Set Programming with Description Logics
Description Logics:
SHOIN (D) (OWL-DL) or
SHIF(D) (OWL-lite)
36 / 37
Other Approaches 2. SWRL Extension
SWRL Extension
37 / 37
Bibliography
Bijan Parsia, Evren Sirin, Bernardo Cuenca Grau, Edna Ruckhaus, and
Daniel Hewlett. Cautiously approaching SWRL. Preprint submitted to
Elsevier Science, 2005.
37 / 37