how to decide quer y containment under constraints using a description logic

15
1 How to decide Query Containment under Constraints using a Description Logic Ian Horrocks, Ulrike Sattler, Sergio Tessaris, and Stephan Tobies presented by Axel Polleres http://citeseer.ist.psu.edu/horrocks99how.html

Upload: sanjiv

Post on 31-Jan-2016

20 views

Category:

Documents


0 download

DESCRIPTION

How to decide Quer y Containment under Constraints using a Description Logic. Ian Horrocks, Ulrike Sattler, Sergio Tessaris, and Stephan Tobies presented by Axel Polleres http://citeseer.ist.psu.edu/horrocks99how.html. Overview. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: How to decide Quer y  Containment under Constraints using a Description Logic

1

How to decide Query Containment under Constraints using a

Description LogicIan Horrocks, Ulrike Sattler, Sergio Tessaris, and Stephan

Tobies

presented by Axel Polleres

http://citeseer.ist.psu.edu/horrocks99how.html

Page 2: How to decide Quer y  Containment under Constraints using a Description Logic

2

Overview

• A decision Procedure for deciding conjunctive query containment over DLR (a description logic with n-ary relations) with respect to a given DLR Knowledge base.

• Reduction from Query containment to DLR ABox Satisfiability

• Reduction from DLR satisfiability to SHIQ satisfiability

FaCT shall be used to solve query containment!

Page 3: How to decide Quer y  Containment under Constraints using a Description Logic

3

The Logic DLR

• Given a set of concept names NC and relation names NR where each relation has an associated arity n

• Syntax:

• Semantics (given an interpretation I , domain Δ):

Note that Tn is not necessarily a the set of all tuples of arity n but can only be a subset and the negation of R with arity n is relative to Tn.

Page 4: How to decide Quer y  Containment under Constraints using a Description Logic

4

Queries

ans(x) :- term1(x,y,z), term2(x,y,z), …, termn(x,y,z).where x is a set of distinguished variables,

y is a set of non-distinguished variables and c is a set of constants, and

the termi are atoms of the form C(w) or R(w1, … wn)

with wi from x,y,z

Problem setting:Decide whether a query Q1 is entailed by a query Q2 (with the same x), wrt. to a DLR Schema (i.e. TBox) S

Page 5: How to decide Quer y  Containment under Constraints using a Description Logic

5

DLR Example

Schema S (i.e., TBox): (bus_route ⊓ ($1/3:city_bus)) city_bus_route⊑city_bus_route ⊑ (bus_route ⊓ ($1/3:city_bus))

"city_bus_routes are the bus_routes where the first argument is a city_bus"

Query q1:

Query q2:

Are obviously equivalent, i.e. q1 is contained in q2 and vice versa wrt. Schema S

Page 6: How to decide Quer y  Containment under Constraints using a Description Logic

6

SHIQ

• Description Logic with concepts, only binary relations, qualifying number restrictions, transitive roles, inverse roles and role inclusion…

• Syntax: , R-

• Semantics (wrt. Interpretation I, domain Δ):

Page 7: How to decide Quer y  Containment under Constraints using a Description Logic

7

How to proceed?

• Step: Transforming Query containment into ABox inclusion

• Step 2: Transforming ABox inclusion into ABox Satisfiability

• Step 3: Transforming DLR satisfiability to SHIQ satisfiability

Page 8: How to decide Quer y  Containment under Constraints using a Description Logic

8

Transforming Query containment into ABox inclusion

• Given two DLR ABoxes A, A', and a DLR schema S we write:

"A is included in A' wrt. S"

iff every model of can be extended to A'.

We want to achieve a transformation Q1 A,

Q2 A' such that Query containmaint is reduced to ABox inclusion.

Page 9: How to decide Quer y  Containment under Constraints using a Description Logic

9

Transforming Query containment into ABox inclusion

• canonical ABox and • completed canonical Abox for a query:

• We get (Theorem):

Remark: ensures that different constants in q cannot have the same interpretation (i.e., UNA?)

Page 10: How to decide Quer y  Containment under Constraints using a Description Logic

10

Transforming ABox inclusion into ABox Satisfiability

• If the completed canonical Abox of q2 would only consist of membership assertions of concepts, it would be easy i.e. checking

would amount to checking for all in that:

i.e is unsatisfiable.

However, (remember slide 3) negation is "weakly"

defined by Tn for relations, so we can't do this for the in

Solution: collapse the into concepts!

Page 11: How to decide Quer y  Containment under Constraints using a Description Logic

11

Collapsing into a set of concept assertions:

• Step A: Collapse all w:C, w:D and (w:R, w:S, resp.) such that there is only a single concept per tuple, i.e.

{w:X, w:Y} {w:(X⊓Y)}.

• Step B: Collapse wi:C into (w1,… wi,…, wn):R {wi:C, (w1,… wi,…, wn):R} {(w1,… wi,…, wn) : (R ⊓ $i:C)}

• Step C: Collapse each remaining w:R into a concept:

{(w1,… wi,…, wn):R} {wi: ( [$i](R ⊓ ⊓ ($j/n:Pwj))

• Choose a feasible traversal of the query graph, such that with each wi:C from Step C we can go back to Step B, apply recursively.

• Finally, having collapsed we can decide the containment using KB satisfiability in DLR

1≤j≤n,j≠i

Page 12: How to decide Quer y  Containment under Constraints using a Description Logic

12

Our Example:

Remaining problem: cycles! The placeholders for non-distinguished variables (Pz2 and Pz1) have to be replaced!Why?• If a non-distinguished variable occurs only once, then this can be safely replcaced by T• But: in any other case (occuring from a cycle in the query) any Pw

from A1 has to be tested.

E.g. here, Pz2 can be replaced by T, but for Pz1 unsatisfiability has to be tested for any of Pn, Py1, Py2

Page 13: How to decide Quer y  Containment under Constraints using a Description Logic

13

Transforming DLR Satisfiability into SHIQ Satisfiability

• By reification of each distinct n-ary tuple in the DLR ABox A

• Introduce decicated functional relations f1, f2, … fn which link to the elements of every tuple.

(Skipped the technical details of the translation here, datails to be found in the paper).

Page 14: How to decide Quer y  Containment under Constraints using a Description Logic

14

Conclusions, Open Questions• This is basically conjunctive Query containment plus

DLR.• Decidability has already been shown erlier, by

[Calvanese, DeGiacomo, Lenzerini, 1998]• The paper shows how DL-reasoners (for SHIQ) can

be used for this, solving the problem in EXPTime– cheaper for acyclic queries!– Feasible if number of cycles/number of variables+constants

in Q1 is small.• Due to limited/slow ABox-reasoning in FaCT, FaCT

is not generally usable.• In principle nice, can possibly be similarly

implemented using a prolog system?

Page 15: How to decide Quer y  Containment under Constraints using a Description Logic

15

Usable for WSML

• If we stay within SHIQ, and only allow conjunctive (non-recursive) queries, yes.

• Otherwise, not so easy...