Combining Existential Rules with the Power of CP-Theories
-
Upload
oana-tifrea-marciuska -
Category
Technology
-
view
230 -
download
1
Transcript of Combining Existential Rules with the Power of CP-Theories
Combining Existential Rules with thePower of CP-Theories
Tommaso Di Noia∗ Thomas Lukasiewicz∗∗ Maria Vanina Martinez∗∗∗
Gerardo I. Simari∗∗∗ Oana Tifrea-Marciuska∗∗
Answering Queries for the Web 3.0: Personalized AccessSemantic Data
Precise and rich results with Datalog+/– conjunctive queries (CQs)
Social Data
Answers ordered by ontological CP-theories (OCP-theories)
Expressive preferences
Order the answers by preferences
Answers
Ontology O
hotelid city conn class
t1 h1 rome c et2 h2 rome w lt3 h3 rome c e
reviewid user feedback
t7 h1 b nt8 h2 b p
t9 h3 j p
revieweruser age
t10 b 20t11 j 30
frienduser user
t12 b a
t13 j a
Rules = {review(I, U, F )→ ∃C, T, S hotel(I, C, T, S),review(I, U, F )→ ∃A reviewer(U,A),reviewer(U,A)→ ∃F friend(U, F ),friend(A,B)→ friend(B,A), friend(A,A)→ ⊥}.
CQ q(H,U,C, R) = ∃Y hotel(H, rome,C, Y ) ∧ review(H,U,R)Some answers: a1 = 〈h1, b, c, n〉, a2 = 〈h2, b,w, p〉 a3 = 〈h3, j, c, p〉.ans(q, Γ ,O, o1) = a1, ans(q, Γ ,O, o2) = a2, ans(q, Γ ,O, o3) = a3
Preferences ΓPreferences of the form υ : ξ � ξ′ [W ] - independent of W, given υΓ = {> : hotel(I, C,w, S) � hotel(I ′, C, c, S ′)[{F,R}],> : review(I, U, p) � review(I ′, U, n)[{C,R}],hotel(I, C, c, S) review(I, U, n) : reviewer(j, A)� reviewer(b, A′)[∅]}With the set of variables X = {C, R F} the domainsDom(C) = {hotel(t1), hotel(t2), hotel(t3)},Dom(R) = {reviewer(t10), reviewer(t11)},Dom(F) = {review(t7), review(t8), review(t9)}An outcome o associates with every variable a value from its domain.o1 = hotel(t1) reviewer(t11) review(t7) ,o2 = hotel(t2) reviewer(t10) review(t8) ,o3 = hotel(t3) reviewer(t10) review(t9) with o2 � o1, o2 � o3
Consistency of (O,Γ )
• o is consistent if O ∪ {o(X) | X ∈ X} 6 |= ⊥• o ∼ o′ if O∪{o(X) | X ∈ X} ≡ O∪{o′(X) |X ∈ X} (o,o′ are outcomes)Let π be a total order over the outcomes of (O,Γ ).π |= O if(i) o and o′ are consistent, for all (o, o′) ∈ π(ii) (o, o′) ∈ π for any o ∼ o′
π |= ϕ (with ϕ ∈ Γ ) if πstrict ⊇ ϕ?,π |= Γ if π |= ϕ for all ϕ ∈ Γπ |= (O,Γ ) if π |= O and π |= Γ .
An OCP-theory (O,Γ ) is consistent if there existsa π s.t. π |= (O,Γ ).
Skyline and k-Rank Answers
A skyline answer for a CQ q to a consistent (O,Γ ) is any a ∈ ans(q, Γ ,O, o) forsome consistent outcome o s.t. there does not exist consistent outcome o′ with
(i) o′ � o and(ii)ans(q, Γ ,O, o′) 6= ∅
A k-rank answer for a CQ q to consistent (O,Γ ) outside a set of atoms S is a se-quence 〈a1, . . . , ak〉 s.t. either:(a) a1, . . . , ak are k different existing skyline answers for q, ar /∈ S (∀r ≤ k), or
(b1) a1, . . . , ai are all i different skyline answers for q, ar /∈ S (∀r ≤ i), and(b.2) 〈ai+1, . . . , ak〉 is a (k−i)-rank answer for q to (O,Γ\{o}) outside
S ∪ {a1, . . . , ai}, where o is an undominated outcome relative to �.A k-rank answer for q to (O,Γ ) is a k-rank answer for q to (O,Γ ) outside ∅.a2 is a skyline answer, while {a2, a1} or {a2, a3} are top-2 answers
Complexity of Consistency, Dominance, and CQs Skyline Memb.
Language Data Comb. Bounded Arity-Comb. Fixed Σ-Comb.L, LF, AF in p pspace pspace pspace
G in p 2exp exp pspaceWG exp 2exp exp exp
S, F, GF, SF in p exp pspace pspaceWS, WA in p 2exp 2exp pspace
Languages L: linear, F: full, A: acyclic, G: guarded, W: weakly, S: sticky
Main contributions• Introduced OCP-theory’s syntax and semantics• Defined consistency for OCP-theories• Defined skyline and k-rank answers for CQs• Provided an algorithm for computing k-rank an-swers to CQ over a OCP-theory• Analyzed the computational complexity and pro-vided several tractability results
∗ Politecnico di Bari, Italy ∗∗ University of Oxford, UK ∗∗∗ Univ. Nacional del Sur and CONICET, Argentina
IJCAI 2015, Buenos Aires, Argentina