combining existential rules with the power of cp-theories

16
C OMBINING E XISTENTIAL RULES WITH THE P OWER OF CP-T HEORIES Tommaso Di Noia * Thomas Lukasiewicz ** Maria Vanina Martinez *** Gerardo I. Simari *** Oana Tifrea-Marciuska ** * Dip. di Elettrotecnica ed Elettronica Politecnico di Bari, Italy, [email protected] ** Department of Computer Science University of Oxford, UK, {thomas.lukasiewicz,oana.tifrea}@cs.ox.ac.uk *** Dept. of Computer Science and Engineering Univ. Nacional del Sur and CONICET, Argentina, {mvm,gis}@cs.uns.edu.ar July 29, 2015 OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 1

Upload: oana-tifrea-marciuska

Post on 08-Apr-2017

289 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Combining Existential Rules with the Power of CP-Theories

COMBINING EXISTENTIAL RULES WITH THE

POWER OF CP-THEORIES

Tommaso Di Noia∗

Thomas Lukasiewicz∗∗

Maria Vanina Martinez∗∗∗

Gerardo I. Simari∗∗∗

Oana Tifrea-Marciuska∗∗

∗Dip. di Elettrotecnica ed Elettronica Politecnico di Bari, Italy, [email protected]∗∗ Department of Computer Science University of Oxford, UK,

{thomas.lukasiewicz,oana.tifrea}@cs.ox.ac.uk∗∗∗Dept. of Computer Science and Engineering Univ. Nacional del Sur and CONICET,

Argentina, {mvm,gis}@cs.uns.edu.ar

July 29, 2015

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 1

Page 2: Combining Existential Rules with the Power of CP-Theories

WEB 3.0

Social Data Semantic data

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 2

Page 3: Combining Existential Rules with the Power of CP-Theories

WEB 3.0 SEARCH

Social Data

Personalized access

Semantic data

Precise and rich results

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 2

Page 4: Combining Existential Rules with the Power of CP-Theories

PERSONALIZED ONTOLOGY DATA ACCESS

QUERY

ORDER BY user’s preferences

LIMIT k

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 3

Page 5: Combining Existential Rules with the Power of CP-Theories

PERSONALIZED ONTOLOGY DATA ACCESS

QUERY Datalog+/– Queries

ORDER BY user’s preferences Ontological CP-theories

LIMIT k Top k

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 3

Page 6: Combining Existential Rules with the Power of CP-Theories

DATALOG+/–

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 pt9 h3 j p

revieweruser age

t10 b 20t11 j 30

frienduser user

t12 b at13 j a

FIGURE : Database D.

ConstraintsDatalog like ∀X∀YΦ(X,Y) → Ψ(X)

friend(A,B) → friend(B,A)With existential in the head ∀X∀YΦ(X,Y) → ∃ZΨ(X,Z)

reviewer(U,A) → ∃Ffriend(U,F )

Negative constraints ∀XΦ(X) → ⊥friend(D,D) → ⊥

Equality constraints ∀XΦ(X) → Ai = Aj

review(A,U,F1) ∧ review(A,U,F2) → F1 = F2

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 4

Page 7: Combining Existential Rules with the Power of CP-Theories

PERSONALIZED ONOTLOGY DATA ACCESS

QUERY Datalog+/– Queries

ORDER BY user’s preferences Ontological CP-theories

LIMIT k Top k

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 5

Page 8: Combining Existential Rules with the Power of CP-Theories

ONTOLOGICAL CP-THEORIES

> : review(I,U,p) � review(I′,U,n)[∅]

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 6

Page 9: Combining Existential Rules with the Power of CP-Theories

ONTOLOGICAL CP-THEORIES

> : hotel(I,C,w,S) � hotel(I′,C, c,S′)[{R,F}]

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 7

Page 10: Combining Existential Rules with the Power of CP-Theories

ONTOLOGICAL CP-THEORIES

hotel(I,C, c,S) review(I,U,n) : reviewer(j ,A)� reviewer(beate,A′)[∅]

:

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 8

Page 11: Combining Existential Rules with the Power of CP-Theories

ONTOLOGICAL CP-THEORIESA Datalog+/– ontology O and a set of α : p � p′ [W ]

Γ = {> : hotel(I,C,w,S) � hotel(I′,C′, c,S)[{F ,R}],> : review(I,U,p) � review(I′,U,n)[∅],review(I,U,p) : reviewer(b,A) � reviewer(j ,A′)[∅]}

X = {C, R, F}dom(C)={hotel(t1), hotel(t2), hotel(t3)},dom(F) = {review(t7), review(t8), review(t9)}dom(R)={reviewer(t10), reviewer(t11)}An outcome o associates with every X ∈ X value from Dom(X).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

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 pt9 h3 j p

revieweruser age

t10 b 20t11 j 30

frienduser user

t12 b at13 j a

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 9

Page 12: Combining Existential Rules with the Power of CP-Theories

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′ areoutcomes)

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 exists a π s.t. π |= (O, Γ).

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 10

Page 13: Combining Existential Rules with the Power of CP-Theories

SKYLINE AND K-RANK ANSWERSA skyline answer for a CQ q to a consistent (O, Γ) is anya ∈ ans(q, Γ,O,o) for some consistent outcome o s.t. there does notexist 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 sequence 〈a1, . . . ,ak〉 s.t. either:(a) a1, . . . ,ak are k different existing skyline answers for q,

ar /∈ S (∀r 6 k ), or(b1) a1, . . . ,ai are all i different skyline answers for q, ar /∈ S

(∀r 6 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 anundominated 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

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 11

Page 14: Combining Existential Rules with the Power of CP-Theories

COMPLEXITY OF CONSISTENCY, DOMINANCE, AND CQS

SKYLINE MEMBERSHIP

Language Data Comb. ba-Comb. Fixed Σ-Comb.L, LF, AF in P PSPACE PSPACE PSPACE

G in P 2EXP EXP PSPACE

WG EXP 2EXP EXP EXP

S, F, GF, SF in P EXP PSPACE PSPACE

WS, WA in P 2EXP 2EXP PSPACE

L: linearF: fullA: acyclicG: guardedW: weaklyS: stickyba: bounded arity

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 12

Page 15: Combining Existential Rules with the Power of CP-Theories

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 answers to CQ over aOCP-theory• Analyzed the computational complexity and provided severaltractability results

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 13

Page 16: Combining Existential Rules with the Power of CP-Theories

THANK YOU

Questions? [email protected]

OANA TIFREA-MARCIUSKA COMBINING EXISTENTIAL RULES WITH THE POWER OF CP-THEORIES SLIDE 14