Existential Rules
Existential Rules
Combined approach for EL Micha¨ el Thomazo November 22nd, 2013 Dresden
1 / 30
Existential Rules Combined approach for EL Micha el Thomazo - - PowerPoint PPT Presentation
Existential Rules Existential Rules Combined approach for EL Micha el Thomazo November 22nd, 2013 Dresden 1 / 30 Existential Rules Flow of the course What has been seen until now: forward chaining approach backward chaining
Existential Rules
Combined approach for EL Micha¨ el Thomazo November 22nd, 2013 Dresden
1 / 30
Existential Rules
What has been seen until now:
◮ forward chaining approach ◮ backward chaining approach
Today’s topic: a case where none of the already presented approaches are applicable.
2 / 30
Existential Rules
Conjunctive Query Answering in the Description Logic EL Using a Relational Database System, Lutz, Toman, Wolter, IJCAI 09
3 / 30
Existential Rules
NC and NR disjoint sets of (atomic) concept and role names.
EL concept
An EL concept is built as follows:
◮ an atomic concept C ∈ NC ◮ top concept ⊤ ◮ the intersection of two concepts C1 ⊓ C2 ◮ ∃r.C, where r is a role name and C an EL concept
An ELHdr TBox is a set of concept inclusions C1 ⊑ C2 and of role inclusions r1 ⊑ r2, as well as a set of domain and range restrictions ( dom(r) ⊑ C and ran(r) ⊑ C ′).
4 / 30
Existential Rules
Any EL ontology can be expressed thanks to a set of existential rules. → consider the standard translation into first-order logic
5 / 30
Existential Rules
Let us consider the following EL concept inclusion: C ⊑ ∃r.C, and the following ABox: C(a).
6 / 30
Existential Rules
Let us consider the following EL concept inclusion: ∃r.C ⊑ C and the following query: ∃xC(x) ∧ D(x).
7 / 30
Existential Rules
In the combined approach, both the query and the data are
F, R | = q ⇔ F ′ | = q′.
8 / 30
Existential Rules
It has been applied for
◮ ELHdr ⊥ (today’s course) ◮ DL-Lite ◮ generalizations of guarded rules
Advantages:
◮ allow to deal with more expressive ontologies ◮ avoid some blow up inherent to query rewriting approaches
Main limitation:
◮ the data is modified
9 / 30
Existential Rules
= r ⊑ s and ran(r) ⊑ C, ran(s) ⊑ D are in T , then C ⊑T D
= r ⊑ s and K | = s ⊑ r All these assumptions can be made without loss of generality.
10 / 30
Existential Rules
◮
sub(T ): subconcepts appearing in T
◮
rol(R): roles appearing in T
◮
Ind(A): individuals appearing in A
◮
ranT (r): unique concept C such that ran(r) ∈ T
◮
ran(T ) = { ranT (r) | r ∈ rol(T )}
◮
NIaux = {xC,D | C ∈ ran(T ) and D ∈ sub(T )}
11 / 30
Existential Rules
12 / 30
Existential Rules
◮ ∆IK := Ind(A) ∪ NIaux ◮ aIK := a for all a ∈ Ind(A) ◮ AIK := {a ∈ Ind(A) | K |
= A(a)} ∪ {xC,D ∈ NIaux | C ⊓ D ⊑ A}
◮ r IK = r IK
1
∪ r IK
2
∪ r IK
3
◮ r IK
1
:= {(a, b) ∈ Ind(A) × Ind(A) | s(a, b) ∈ A and K | = s ⊑ r}
◮ r IK
2
:= {(a, xC,D) ∈ Ind(A) × NIaux | K | = ∃s.D(a), ran(s) = C, K | = s ⊑ r}
◮ r IK
3
:= {(xC,D, xC′,D′) ∈ NIaux × NIaux | K | = C ⊓ D ⊑ ∃r.D′, ran(s) = C ′, K | = s ⊑ r}
13 / 30
Existential Rules
Consider K1 = (T1, A1) with T1 = {A ⊑ A}, and A1 = {B(a)}. Let q1 = ∃u(B(v) ∧ A(u)). x⊤,A ∈ AIK1 and IK1 | = q1[a] but a is not a certain answer. Solved by considering only the “connected” part → Ik
R.
14 / 30
Existential Rules
Consider K2 = (T2, A2) with T2 = {A ⊑ ∃r.B ⊓ ∃s.B} and A2 = {A(a)}. Let consider q2 = ∃u(r(v, u) ∧ s(v, u). IK2 | = q2[a], but a is not a certain answer. Question: why does IK2 | = q2[a] hold?
15 / 30
Existential Rules
We define Ind(A)I = {aI | a ∈ Ind(A)}. A path in I is a finite sequence d0r1d1 . . . rndn such that:
◮ d0 ∈ Ind(A)I; ◮ (di, di+1) ∈ rI i+1 for all i < n.
Denoted by pathsA(I).
16 / 30
Existential Rules
Let R be the set of role inclusion in K. The (A, R)-unraveling J
◮ ∆J = pathsA(I) ◮ aJ = aI for all a ∈ Ind(A) ◮ AJ = {p | tail(p) ∈ AI} ◮ rJ = rJ 1 ∪ rJ 2 ◮ rJ 1 = {(d, e) | d, e ∈ Ind(A) ∧ (d, e) ∈ rI} ◮ rJ 2 = {(p, p · se) | p, p · se ∈ ∆J and R |
= s ⊑ r} The unraveling of Ir
K is denoted by UK.
17 / 30
Existential Rules
We want to represent the canonical model thanks to a relational database. We thus need a finite canonical model. The unraveling is infinite in general. We rewrite the query in order to regain soundness.
18 / 30
Existential Rules
19 / 30
Existential Rules
The aim is to exclude some of the answer provided with the canonical model for instance queries. We make use of the following equivalence relation:
The equivalence relation ∼q
∼q is the smallest relation on terms(q) that include identity, is transitive and satisfies the following closure relation: If r1(s, t), r2(s′, t′) ∈ q and t ∼q t′, then s ∼q s′
20 / 30
Existential Rules
For an equivalence class ζ of ∼q, we define the following two sets:
◮
pre(ζ) = {t | r(t, t′) ∈ q for some r ∈ NR and t′ ∈ ζ}
◮
in(ζ) = {r | r(t, t′) ∈ a for some t ∈ term(q) and t′ ∈ ζ}
21 / 30
Existential Rules
For R ⊆ NR and r ∈ NR, r is an implicant of NR if for any s ∈ R, R | = r ⊑ s. It is called a prime implicant if for all implicant r′ of R such that r′ = r, R | = r ⊑ r′,
22 / 30
Existential Rules
We define:
◮
Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;
23 / 30
Existential Rules
We define:
◮
Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;
◮
Fork= is the set of variables v ∈ qvar(q) such that there is no implicant of in([v]);
24 / 30
Existential Rules
We define:
◮
Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;
◮
Fork= is the set of variables v ∈ qvar(q) such that there is no implicant of in([v]);
◮
ForkH is the set of pairs (I, ζ) such that pre(ζ) = ∅, there is a prime implicant of in(ζ) that is not contained in in(ζ) and I is the set of all prime implicants of in(ζ)
25 / 30
Existential Rules
We define:
◮
Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;
◮
Fork= is the set of variables v ∈ qvar(q) such that there is no implicant of in([v]);
◮
ForkH is the set of pairs (I, ζ) such that pre(ζ) = ∅, there is a prime implicant of in(ζ) that is not contained in in(ζ) and I is the set of all prime implicants of in(ζ)
◮
Cyc is the set of variables v ∈ qvar(q) such that there are r0(t0, t′
0), . . . , rm(tm, t′ m), . . . , rn(tn, t′n) ∈ q, n, m ≥ 0 with
v ∼q ti for some i ≤ n, T ′
i ∼q ti+1 for all i < n and t′ n ∼q tm.
26 / 30
Existential Rules
We rewrite q = ∃u(ψ) into ∃u(ψ ∧ ϕ1 ∧ ϕ2 ∧ ϕ3), where:
◮ ϕ1 = v∈ avar(q)∪ Fork=∪ Cyc ¬ Aux(v) ◮ ϕ2 = ({t1,...,tk},ζ)∈ Fork=( Aux(tζ) → 1≤i<k ti = ti+1) ◮ ϕ3 = (I,ζ)∈ ForkH( Aux(tζ) → r∈I r(tpre ζ
, tζ)) where tζ is a representative of ζ and t
pre
ζ
is an arbitrary element of pre(tζ)
27 / 30
Existential Rules
We prove the following equivalence: Ir
K |
= q∗
R[a1, . . . , ak] ⇔ UK |
= a[a1, . . . , ak]
28 / 30
Existential Rules
Let A be an ABox. Let I be a model where AuxI = ∆I \ Ind(A)I.
◮ I is A-connected if every d ∈ ∆I equals tail(p) for some
p ∈ pathsA(I)
◮ I is split if d ∈ AuxI and (d, d′) ∈ rI imply d′ ∈ AuxI, for
all r ∈ NR and d, d′ ∈ ∆I
29 / 30
Existential Rules
Let I be split and A-connected and let I′ be the (A, R)-unraveling of I. Let q be a k-ary conjunctive query. Then the following holds for all a1, . . . , ak ∈ Ind(A): I | = q∗
R[a1, . . . , ak] ⇔ I′ |
= q[a1, . . . , ak]
30 / 30