Top Banner
Datalog DL : Datalog Rules Parameterized by Descri ption Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic Web Working Symposium June 6, 2006 Laval University, Quebec City, Canada
23

Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

Jan 18, 2018

Download

Documents

Alison Fowler

3 Semantic Web Architectures Homogeneous approach Hybrid approach
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

DatalogDL: Datalog Rules Parameterized by Description Logics

Jing Mei, Harold Boley, Jie Li,Virendrakumar C. Bhavsar, Zuoquan Lin

Canadian Semantic Web Working SymposiumJune 6, 2006Laval University, Quebec City, Canada

Page 2: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

2

Contents Semantic Web Architectures Context of DatalogDL

Description Logic (DL) Family Hybrid Knowledge Bases Strategies for Reasoning Services Integration Frameworks Comparison

Proposal of DatalogDL

Syntax Semantics Reasoning Examples

Selected References

Page 3: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

3

Semantic WebArchitectures

Homogeneousapproach Hybrid

approach

Page 4: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

4

Content Semantic Web Architectures Context of DatalogDL

Description Logic (DL) Family Hybrid Knowledge Bases Strategies for Reasoning Services Integration Frameworks Comparison

Proposal of DatalogDL

Syntax Semantics Reasoning Examples

Selected References

Page 5: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

5

The DL Family Bottom-Up ALC: C and D are classes, R is a property S = ALCR+: Transitive properties SI: Inverse properties SHI: Property hierarchies

SHIF: Functional restrictions SHIN: Cardinality (Number) restrictions SHIQ: Qualified number restrictions

Support for datatype predicates (e.g. string, integer) leads to the concrete domain of D

Using nominals O allows to construct classes from singleton sets, with the so-called one-of operator

OWL Lite = SHIQ(D) OWL DL = SHOIN(D) [10]

ALC

Page 6: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

6

Hybrid Knowledge Base Hybrid KB: K = (, )

: A DL KB : A Datalog program with DL-queries to

Hybrid Rules h(X) :- b1(Y1) … bm(Ym) & q1(Z1) … qn(Zn) h(X), bi(Yi) Datalog atoms (1≤i≤m); X, Yi sequences of constants|v

ariables qj (Zj) DL-queries (1≤j≤n); Zj sequence of constants|variables

Safeness Condition Weak safeness condition

Variables appearing in the head of a rule must also appear in the body, but not necessarily in the DL body

That is, a variable occurring in X must occur in one of the Y i|Zj's Strong safeness condition

Each variable appearing in the DL component also appears in the Datalog component, in addition to weak safeness

That is, a variable occurring in X|Zj must occur in one of the Yi's

Page 7: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

7

Strategies for Reasoning Services Beyond classical DL tableaux calculus Based on reduction

Reducing a DL KB to (disjunctive, function-free, negation-free) Datalog rules

Rule engines support for DL reasoning Based on components

SLD-resolution for rules Backward chaining, Top-Down Collecting DL-queries, which are finally evaluated for DL satisfiability

Entailment for DL Forward chaining, Bottom-Up Building DL tableaux, whose inferred assertions are fed into rules

Fixpoint Iteration for both DL and rules Modular reasoning method with separation of reasoning for components Running DL reasoners and rule engines at the same time Exchanging information until a fixpoint is reached

Page 8: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

8

Integration Frameworks Homogeneous approaches

DLP [1]: Description Logic Programs SWRL [2]: Semantic Web Rule Language KAON2 [3]: OWL extended with DL-safe rules

Hybrid approaches AL-log [4]: ALC DL + Datalog CARIN [5]: ALCNR DL + Datalogwhere N means cardinality (number) restrictions

and R means role conjunctions [10] dl-programs [6]: SHIF(D) | SHOIN(D) DL + Answ

er Set Programming r-hybrid KBs [7]: A decidable DL + Datalog

Page 9: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

9

Comparison

Notes:1. DLP: Expressivity restrictions2. SWRL: Undecidable3. KAON2: DL-safe rules

Notes:1. AL-log: Only concept constraints2. CARIN: Recursive CARIN-ALCNR undecidable3. dl-programs: Nonmonotonic semantics4. r-hybrid KBs: Nonmonotonic semantics

SLD-resolutionEntailmentFixpoint iteration–SLD-resolution

XX

XX

X

XX

XX

X

AL-logCARINdl-programsr-hybrid KBsDatalogDL

HybridApproaches

Reduction–Reduction

XXX

XX

X

DLPSWRLKAON2

HomogeneousApproaches

ReasoningStrategy

Information Flowbetween Datalog & DL:Uni-direct. Bi-direct.

Safeness Condition:Strong Weak

SLD-resolutionEntailmentFixpoint iteration–SLD-resolution

XXX

XX

XX

X

AL-logCARINdl-programsr-hybrid KBsDatalogDL

HybridApproaches

Reduction–Reduction

XXX

XX

DLPSWRLKAON2

HomogeneousApproaches

ReasoningStrategy

Information Flowbetween Datalog & DL:Uni-direct. Bi-direct.

Safeness Condition:Strong Weak

Page 10: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

10

Content Semantic Web Architectures Context of DatalogDL

Description Logic (DL) Family Hybrid Knowledge Bases Strategies for Reasoning Services Integration Frameworks Comparison

Proposal of DatalogDL

Syntax Semantics Reasoning Examples

Selected References

Page 11: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

11

A Hybrid Approach: DatalogDL

DatalogDL: Combining (sublanguage of) SHIQ DL and Datalog rules The rule component: (Disjunctive, Function-free, Negation-fre

e) Datalog with terms consisting of variables and constants The DL Component: Any specific decidable DL language ran

ging from ALC to SHIQ Safeness: Weak safeness condition Requirement: Independent properties Reasoning Strategy

SLD-resolution for rules: Extending a rule engine (OO jDREW) to incorporate hybrid rules

Tableaux algorithm for DL queries: Using an external DL reasoner (Racer) to check ALC to SHIQ satisfiability

Page 12: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

12

Syntax An alphabet of predicates A = AT AP with AT AP = A DatalogL KB: K = (, )

: An L-based DL KB with predicates in AT where L ranges from ALC to SHIQ : A Datalog program with DL-queries to , s.t. each hybrid rule r is[r] h(X) :- b1(Y1) … bm(Ym) & q1(Z1) … qn(Zn) where

X, Y1, ..., Ym are n-ary sequences of terms (constants|variables) Z1, ..., Zn are unary/binary sequences of terms h(X), bi(Yi) (1≤i≤m) are Datalog atoms with predicates in AP Each qj(Zj) (1≤j≤n) is a DL-query with predicate in AT

Notes:1. “DL body” means: “q1(Z1) … qn(Zn)” 2. “Datalog body” means: “b1(Y1) … bm(Ym)” 3. “Datalog rule” means: hybrid rule after deletion of “& DL body”

Page 13: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

13

Decidability Issues It has been pointed out in CARIN

Recursive Datalog rules + cyclic TBox with only DL constructor P.C Reducing the halting problem of a Turing machine (known to be undecidable)

to the entailment problem of a KB containing DL ABox: integer(1) DL TBox: integer succ.integer rule-primitive: lessThan(x, y) :- & succ(x, y). rule-recursive: lessThan(x, y) :- lessThan(z, y) & succ(x, z).

Remark: Strong safeness condition would demand that “x” occur in “lessThan(z, y)” in the above KB example

Re-obtaining decidability AL-log: Disallowing DL property queries like “succ(x, y)“ CARIN: A (maximal) decidable sublanguage namely CARIN-MARC DLP: Disallowing the existential DL constructor P.C to occur on the right ha

nd side of “” subsumptions DatalogDL: By means of constrained SLD-resolution, provided by hybrid rules

with independent properties

Page 14: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

14

Features of DatalogDL

Pure-DL Variables A pure-DL variable in a rule r is a variable that only occurs in one

of the Zj's Pure-DL variables lead to the violation of the strong safeness cond

ition in cases where the weak safeness condition is obeyed According to the classical SLD-resolution with rules, non-pure-DL v

ariables will be bound to ground values, still leaving pure-DL variables free

Folding Classical DL algorithms: Reducing DL queries to KB unsatisfiability, e.g. b

y transforming the query into a negated assertion, but the negation of properties is not supported by most DLs

DL-query of C(x) is reduced to checking whether C is non-empty, where x is a pure-DL variable

DL-query of P(u, x)∧C(x) becomes folding result P.C(u), where x is a pure-DL variable

DL-query of P(x, u)∧C(x) becomes folding result P-.C(u), where x is a pure-DL variable and P- is the inverse of P

Page 15: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

15

Features of DatalogDL (cont’d) Independent Properties

Folding cannot be applied to query parts that contain cycles (e.g. P(x, y)∧Q(y, z) R∧ (z, x)), or where more than one property arc enters a node that corresponds to a variable (e.g. P(u, x)∧Q(y, x))

Tree-shaped DL queries: Adding rules to DLs, in a unrestricted manner, causes the loss of any form of tree model property

A property P is independent in a rule r, if no P occurrence shares any pure-DL variables with other property occurrences (including other P occurrences)

Correspondence: For hybrid rules with independent properties, the folding results are equivalent to the original DL-queries

Page 16: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

16

Two Other Transformations Making weakly safe rules strongly safe

Referring to DL-safe rules in KAON2 [3] A special predicate symbol OAP For each pure variable w in a rule r, add an atom O(w) to the Datalog

body of r For each constant c occurring in K = (, ), add a fact O(c) to

Rolling-up to eliminate DL property queries Referring to a conjunctive query language for DL ABox [8] Similar to folding in our setting Exploiting the DL tree model feature for queries containing cycles Simulating the one-of operator by substituting each individual a with a

representative concept Pa of the individual a

Page 17: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

17

Semantics A first-order interpretation I = (△, I) of DatalogL

△: The non-empty domain of I I: The interpretation function of I

A model of the DatalogL KB K=(, ) The interpretation I is a model of The interpretation I satisfies each hybrid rule r in , i.e.[r] h(X) :- b1(Y1) … bm(Ym) & q1(Z1) … qn(Zn) s.t.

If Tr(Yi) biI and Tr(Zj) qj

I (1≤i≤m, 1≤j≤n) for every atom in the body of r, then Tr(X) hI for the head of r, where Tr is a term assignment w.r.t I for constants and variables in r.

Notes:1. The interpretation of constants is according to the standard names assumption

and to the unique name assumption2. Without negation-as-failure, this first-order semantics gives a platform for

DL-and-Datalog combination, both of which are first-order fragments

Page 18: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

18

Reasoning

A kind of constrained SLD-resolutionGrounding variables in hybrid rules, but pure-DL

variables still left freeFolding (independent) properties, to eliminate p

ure-DL variables DL satisfiability

DL queries without variablesBuilding a disjunctive DL class for the collection

of DL queries from hybrid rules sharing the same head

Page 19: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

19

Example of AL-log

Referring to AL-log [4], a query to mayDoThesis(paul, mary):The final ground queries after constrained SLD-resolution without folding expert(mary, lp), exam(paul, ai), subject(ai, lp) & St(paul), Tp(lp), AC(ai),

Page 20: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

20

Example of CARIN

Referring CARIN [5], a query to price(a, usa high):The final ground queries after constrained SLD-resolution plus folding made-by(a, b), monopoly(b, a, usa) &

Page 21: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

21

Use Case of RuleML FOAF

Referring to RuleML FOAF [9], a query to possiblyKnows(Laura, Ben):The final ground queries after constrained SLD-resolution plus folding &

Page 22: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

22

[1] Benjamin N. Grosof, Ian Horrocks, Raphael Volz, and Stefan Decker.Description Logic Programs: Combining Logic Programs with Description Logic.In WWW 2003, pages 48–57, 2003.[2] Ian Horrocks, Peter F. Patel-Schneider, Harold Boley, Said Tabet, Benjamin Grosof, and Mike Dean.Semantic Web Rule Language (SWRL). W3C Member Submission.http://www.w3.org/Submission/2004/SUBM-SWRL-20040521/, May 2004.[3] Boris Motik, Ulrike Sattler, and Rudi Studer.Query Answering for OWL-DL with Rules. Journal of Web Semantics, 3(1):41–60, 2005.[4] Francesco M. Donini, Maurizio Lenzerini, Daniele Nardi, and Andrea Schaerf.AL-log: Integrating Datalog and Description Logics.Journal of Intelligent Information Systems (JIIS), 10(3):227–252, 1998.[5] Alon Y. Levy and Marie-Christine Rousset.CARIN: A Representation Language Combining Horn Rules and Description Logics.In ECAI-96, pages 323–327, 1996.[6] Thomas Eiter, Thomas Lukasiewicz, Roman Schindlauer, and Hans Tompits.Combining Answer Set Programming with Description Logics for the Semantic Web.In KR 2004, pages 141–151, 2004.[7] Riccardo Rosati.On the decidability and complexity of integrating ontologies and rules.Journal of Web Semantics, 3(1):61–73, 2005.[8] Ian Horrocks and Sergio Tessaris.Querying the Semantic Web: a Formal Approach.In Workshop on Principles and Practice of Semantic Web Reasoning, pages 177—191, 2005.[9] Jie Li, Harold Boley, Virendrakumar C. Bhavsar, and Jing Mei.Expert Finding for eCollaboration Using FOAF with RuleML Rules. In: The Montreal Conference on eTechnologies, May 2006.[10] Franz Baader, Diego Calvanese, Deborah McGuinness, Daniele Nardi, and Peter F. Patel-Schneider.The Description Logic Handbook: Theory, Implementation and Applications.Cambridge University Press, 2003.

Selected References

Page 23: Datalog DL : Datalog Rules Parameterized by Description Logics Jing Mei, Harold Boley, Jie Li, Virendrakumar C. Bhavsar, Zuoquan Lin Canadian Semantic.

23