150 likes | 231 Views
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.
E N D
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
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!
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.
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
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
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 Δ):
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
Transforming Query containment into ABox inclusion Given two DLR ABoxes A, A', and a DLR schema S we write: "Ais 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.
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?)
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!
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
Our Example: • 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 Remaining problem: cycles! The placeholders for non-distinguished variables (Pz2and Pz1) have to be replaced! Why?
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).
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?
Usable for WSML • If we stay within SHIQ, and only allow conjunctive (non-recursive) queries, yes. • Otherwise, not so easy...