tractable query answering for expressive ontologies and rules* filetractable query answering for...

94
Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable Query Answering for Expressive Ontologies and Rules* David Carral, Irina Dragoste, Markus Krötzsch Knowledge-Based Systems Group at /23 1 *Published at ISWC 2017

Upload: others

Post on 13-Oct-2019

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

Tractable Query Answering for Expressive Ontologies and Rules*

David Carral, Irina Dragoste, Markus Krötzsch Knowledge-Based Systems Group at

/231

*Published at ISWC 2017

Page 2: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /232

Disjunctive Existential Rules

Page 3: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /233

Disjunctive Existential Rules

Facts

Page 4: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /233

HasParent(x, y) ∧ HasSister(y, z) → HasAunt(x, z)Human(x) → ∃y .HasParent(x, y) ∧ Human(y)Animal(x) → Herbivore(x) ∨ Carnivore(x) ∨ Omnivore(x)P(x, a, y) ∧ R(y, w) ∧ S(w, x) → ∃v . (R(w, v) ∧ A(v)) ∨ D(x)

Disjunctive Existential Rules

Facts

Page 5: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /233

HasParent(x, y) ∧ HasSister(y, z) → HasAunt(x, z)Human(x) → ∃y .HasParent(x, y) ∧ Human(y)Animal(x) → Herbivore(x) ∨ Carnivore(x) ∨ Omnivore(x)P(x, a, y) ∧ R(y, w) ∧ S(w, x) → ∃v . (R(w, v) ∧ A(v)) ∨ D(x)

Disjunctive Existential Rules

FactsHasFriend(stan, kyle)

Dead(kenny)P(a, c,d)

Page 6: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /233

HasParent(x, y) ∧ HasSister(y, z) → HasAunt(x, z)Human(x) → ∃y .HasParent(x, y) ∧ Human(y)Animal(x) → Herbivore(x) ∨ Carnivore(x) ∨ Omnivore(x)P(x, a, y) ∧ R(y, w) ∧ S(w, x) → ∃v . (R(w, v) ∧ A(v)) ∨ D(x)

Disjunctive Existential Rules

FactsHasFriend(stan, kyle)

Dead(kenny)P(a, c,d)

Remark. If normalised, SROIQ ontologies can be translated into equivalent programs of disjunctive existential rules.

Page 7: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /234

The Disjunctive Chase

Page 8: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Director(x) → ∃y .Directs(x, y) ∧ Film(y)

The Disjunctive Chase

Film(x) → ∃z . IsDirectedBy(x, z) ∧ Director(z)Film(ai)

Page 9: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Director(x) → ∃y .Directs(x, y) ∧ Film(y)Film(x) → ∃z . IsDirectedBy(x, z) ∧ Director(z)Film(ai)

The Skolem Disjunctive Chase

Page 10: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Director(x) → Directs(x, fy(x)) ∧ Film( fy(x))Film(x) → IsDirectedBy(x, fz(x)) ∧ Director( fz(x))Film(ai)

The Skolem Disjunctive Chase

Page 11: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Film(ai)

Director(x) → Directs(x, y(x)) ∧ Film(y(x))Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))

The Skolem Disjunctive Chase

Page 12: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Film(ai)

ai : Film

Director(x) → Directs(x, y(x)) ∧ Film(y(x))Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))

The Skolem Disjunctive Chase

Page 13: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Film(ai)

ai : Film

z(ai) : Director

Director(x) → Directs(x, y(x)) ∧ Film(y(x))Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))

DirectedBy

The Skolem Disjunctive Chase

Page 14: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Film(ai)

ai : Film

z(ai) : Director

Director(x) → Directs(x, y(x)) ∧ Film(y(x))Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))

DirectedBy

Directs

z(y(ai)) : Film

The Skolem Disjunctive Chase

Page 15: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Film(ai)

ai : Film

z(ai) : Director

Director(x) → Directs(x, y(x)) ∧ Film(y(x))Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))

DirectedBy DirectedBy

Directs

z(y(ai)) : Film

y(z(y(ai))) : Director

The Skolem Disjunctive Chase

Page 16: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Film(ai)

ai : Film

z(ai) : Director

Director(x) → Directs(x, y(x)) ∧ Film(y(x))Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))

DirectedBy DirectedBy

Directs

z(y(ai)) : Film

y(z(y(ai))) : Director

The Skolem Disjunctive Chase

Page 17: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /235

Film(ai)

ai : Film

z(ai) : Director

Director(x) → Directs(x, y(x)) ∧ Film(y(x))Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))

DirectedBy DirectedBy

Directs

z(y(ai)) : Film

y(z(y(ai))) : Director

The Skolem Disjunctive Chase

Page 18: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /236

Film(ai)Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))Director(x) → Directs(x, y(x)) ∧ Film(y(x))

The Skolem Disjunctive Chase

Page 19: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /236

Film(ai)Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))Director(x) → Directs(x, y(x)) ∧ Film(y(x))

ai : F

The Skolem Disjunctive Chase

Page 20: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /236

Film(ai)Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))Director(x) → Directs(x, y(x)) ∧ Film(y(x))

ai : F ai : F

y(ai) : F

DB

The Skolem Disjunctive Chase

Page 21: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /236

Film(ai)Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))Director(x) → Directs(x, y(x)) ∧ Film(y(x))

ai : F ai : F

y(ai) : F

DB

D

z(y(ai)) : F

ai : F

y(ai) : F

DB

The Skolem Disjunctive Chase

Page 22: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /236

Film(ai)

ai : F

y(ai) : F

DB

DBD

z(y(ai)) : F

y(z(y(ai))) : D

Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))Director(x) → Directs(x, y(x)) ∧ Film(y(x))

ai : F ai : F

y(ai) : F

DB

D

z(y(ai)) : F

ai : F

y(ai) : F

DB

The Skolem Disjunctive Chase

Page 23: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /236

Film(ai)

ai : F

y(ai) : F

DB

DBD

z(y(ai)) : F

y(z(y(ai))) : D

Film(x) → IsDirectedBy(x, z(x)) ∧ Director(z(x))Director(x) → Directs(x, y(x)) ∧ Film(y(x))

ai : F ai : F

y(ai) : F

DB

D

z(y(ai)) : F

ai : F

y(ai) : F

DB

The Skolem Disjunctive Chase

Page 24: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /237

Animal(a) Animal(b)Animal(x) → Vertebrate(x) ∨ Invertebrate(x)

The Skolem Disjunctive Chase

Page 25: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /237

Animal(a) Animal(b)Animal(x) → Vertebrate(x) ∨ Invertebrate(x)

A : a b : A

The Skolem Disjunctive Chase

Page 26: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /237

Animal(a) Animal(b)Animal(x) → Vertebrate(x) ∨ Invertebrate(x)

A : a b : A

V, A : a b : Ab : AI, A : a

The Skolem Disjunctive Chase

Page 27: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /237

Animal(a) Animal(b)Animal(x) → Vertebrate(x) ∨ Invertebrate(x)

A : a b : A

V, A : a b : Ab : AI, A : a

V, A : a b : A, VV, A : a b : A, I

The Skolem Disjunctive Chase

Page 28: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /237

Animal(a) Animal(b)Animal(x) → Vertebrate(x) ∨ Invertebrate(x)

A : a b : A

V, A : a b : Ab : AI, A : a

V, A : a b : A, VV, A : a b : A, I I, A : a b : A, V

I, A : a b : A, I

The Skolem Disjunctive Chase

Page 29: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /238

Ensuring Tractability of the Disjunctive Chase

Page 30: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /239

Existential Dependency Graph

A(x) → ∃y . S(x, y) ∧ B(y)B(x) → ∃z .R(x, z) ∧ D(z)D(x) → E(x)E(x) → ∃w .R(x, w)

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

Page 31: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

Page 32: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

Page 33: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

Page 34: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

A(c)S(c, y(c)), B(y(c))R(y(c), z(y(c))), D(z(y(c)))

Page 35: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

A(c)S(c, y(c)), B(y(c))R(y(c), z(y(c))), D(z(y(c)))

z(y(c))

Page 36: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

Page 37: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

Page 38: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))B(c)R(c, z(c)), D(z(c)),E(z(c)),R(z(c), w(z(c)))

Page 39: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

w(z(c))

B(c)R(c, z(c)), D(z(c)),E(z(c)),R(z(c), w(z(c)))

Page 40: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

w(z(c))

Page 41: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

w(z(c))

Page 42: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

w(z(c))

A(c)S(c, y(c)),B(y(c)),C(y(c)),E(y(c)),R(y(c), w(y(c)))

Page 43: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

w(z(c))

A(c)S(c, y(c)),B(y(c)),C(y(c)),E(y(c)),R(y(c), w(y(c)))

w(y(c))

Page 44: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

z(y(c))

w(z(c))

w(y(c))

Page 45: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

A(x) → S(x, y(x)) ∧ B(y(x))B(x) → R(x, z(x)) ∧ D(z(x))D(x) → E(x)E(x) → R(x, w(x))

B(x) ∧ C(x) → E(x)S(x, y) → C(x)

/239

Existential Dependency Graph

y

z

w

Page 46: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zw

Page 47: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zwz(c)

Page 48: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zwz(c)

w(z(c))

Page 49: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zw y(w(z(c)))z(c)

w(z(c))

Page 50: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zw

z(y(w(z(c))))

y(w(z(c)))z(c)

w(z(c))

Page 51: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zw

z(y(w(z(c))))

y(w(z(c)))z(c)

w(z(c)) w(z(y(w(z(c)))))

Page 52: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zw

z(y(w(z(c))))

y(w(z(c)))z(c)

w(z(c)) w(z(y(w(z(c)))))

………

Page 53: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2310

(a) Acyclicity

y

zw Remark. If the existential dependency graph of a given set of rules is acyclic, then the set of terms introduced during the computation of the chase is finite.

Page 54: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2311

(f) Arity at Most 1Film(x) → ∃y . IsFilmDirectedBy(x, y) ∧ Director(y)

A(x) ∧ B(x, w) ∧ C(x, z) → ∃z .R(x, w, z)

Page 55: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2311

(f) Arity at Most 1Film(x) → ∃y . IsFilmDirectedBy(x, y) ∧ Director(y)Film(x) → IsFilmDirectedBy(x, y(x)) ∧ Director(y(x))

A(x) ∧ B(x, y) ∧ C(x, z) → ∃z .R(x, y, z)A(x) ∧ B(x, w) ∧ C(x, z) → R(x, w, z(x, w))

Page 56: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2311

(f) Arity at Most 1Film(x) → ∃y . IsFilmDirectedBy(x, y) ∧ Director(y)Film(x) → IsFilmDirectedBy(x, y(x)) ∧ Director(y(x))

A(x) ∧ B(x, y) ∧ C(x, z) → ∃z .R(x, y, z)A(x) ∧ B(x, w) ∧ C(x, z) → R(x, w, z(x, w))

Remark. If the arity of every function symbol in the skolemisation of a program is at most 1, then every term in the chase is of the form x1(…xn(c)…) with c constant.

Page 57: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2312

(f) Arity at Most 1

Remark. If the arity of every function symbol in the skolemisation of a program is at most 1, then every term in the chase is of the form x1(…xn(c)…) with c constant.

Page 58: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2312

(f) Arity at Most 1

Remark. If the arity of every function symbol in the skolemisation of a program is at most 1, then every term in the chase is of the form x1(…xn(c)…) with c constant.

Corollary. Every term occurring in the chase corresponds to a path in the dependency graph and a constant.

Page 59: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2312

(f) Arity at Most 1

Remark. If the arity of every function symbol in the skolemisation of a program is at most 1, then every term in the chase is of the form x1(…xn(c)…) with c constant.

Corollary. Every term occurring in the chase corresponds to a path in the dependency graph and a constant.

y

z

w

v

Page 60: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2312

(f) Arity at Most 1

Remark. If the arity of every function symbol in the skolemisation of a program is at most 1, then every term in the chase is of the form x1(…xn(c)…) with c constant.

Corollary. Every term occurring in the chase corresponds to a path in the dependency graph and a constant.

y

z

w

v

v(w(z(y(c))) y(v(c))

Page 61: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

Ensuring Tractability

Page 62: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

Ensuring Tractability

Page 63: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

Ensuring Tractability

Page 64: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

All skolem terms correspond to some path in the dependency graph and some constant

Ensuring Tractability

Page 65: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

All skolem terms correspond to some path in the dependency graph and some constant

Ensuring Tractability

Page 66: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

Rules can be applied in polynomial time

The number of facts is polynomial in the number of terms

All skolem terms correspond to some path in the dependency graph and some constant

Ensuring Tractability

Page 67: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

Rules can be applied in polynomial time

The number of facts is polynomial in the number of terms

All skolem terms correspond to some path in the dependency graph and some constant

The number of paths in the dependency graph is polynomial

Ensuring Tractability

Page 68: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

Rules can be applied in polynomial time

The number of facts is polynomial in the number of terms

All skolem terms correspond to some path in the dependency graph and some constant

The number of paths in the dependency graph is polynomial

Polynomiality

Ensuring Tractability

Page 69: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2313

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

Rules can be applied in polynomial time

The number of facts is polynomial in the number of terms

All skolem terms correspond to some path in the dependency graph and some constant

The number of paths in the dependency graph is polynomial

(?)

Polynomiality

Ensuring Tractability

Page 70: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch /2314

Braids

Page 71: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 14/23

Braids

Page 72: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

Braids

14/23

Page 73: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

Braids

14/23

Page 74: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 15/23

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

Rules can be applied in polynomial time

The number of facts is polynomial in the number of terms

All skolem terms correspond to some path in the dependency graph and some constant

The number of paths in the dependency graph is polynomial

Polynomiality

Ensuring Tractability

(?)

Page 75: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 15/23

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

Rules can be applied in polynomial time

The number of facts is polynomial in the number of terms

All skolem terms correspond to some path in the dependency graph and some constant

The number of paths in the dependency graph is polynomial

Polynomiality

Ensuring Tractability

(b) The length of the braids in the dependency graph is bounded.

Page 76: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 15/23

(a) The dependency graph is acyclic.

(f) The arity of all function symbols in the skolemisation of the program is at most 1.

(w) The number of variables per rule is bounded.

Rules can be applied in polynomial time

The number of facts is polynomial in the number of terms

All skolem terms correspond to some path in the dependency graph and some constant

The number of paths in the dependency graph is polynomial

Polynomiality

Ensuring Tractability

(b) The length of the braids in the dependency graph is bounded.

Caveats.1. Fixed query size. 2. Horn rule set.

Page 77: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 16/23

Evaluation

Page 78: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 17/23

A1 ⊓ … ⊓ An ⊑ B ↦ A1(x) ∧ … ∧ An(x) → B(x)A ⊑ B1 ⊔ … ⊔ Bn ↦ A(x) → B1(x) ∨ … ∨ Bn(x)

A ⊑ ∀R . B ↦ A(y) ∧ R(x, y) → B(x)A ⊑ ∃R . B ↦ A(x) → ∃y . R(x, y) ∧ B(y)

R ⊑ S ↦ R(x, y) → S(x, y)R ∘ S ⊑ V ↦ R(x, y) ∧ S(y, z) → S(x, z)

R1 ⊓ … ⊓ Rn ⊑ S ↦ R1(x, y) ∧ … ∧ Rn(x, y) → S(x, y)A(a) ↦ A(a)

R(a, b) ↦ R(a, b)

SRI Axioms

Page 79: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 17/23

A1 ⊓ … ⊓ An ⊑ B ↦ A1(x) ∧ … ∧ An(x) → B(x)A ⊑ B1 ⊔ … ⊔ Bn ↦ A(x) → B1(x) ∨ … ∨ Bn(x)

A ⊑ ∀R . B ↦ A(y) ∧ R(x, y) → B(x)A ⊑ ∃R . B ↦ A(x) → ∃y . R(x, y) ∧ B(y)

R ⊑ S ↦ R(x, y) → S(x, y)R ∘ S ⊑ V ↦ R(x, y) ∧ S(y, z) → S(x, z)

R1 ⊓ … ⊓ Rn ⊑ S ↦ R1(x, y) ∧ … ∧ Rn(x, y) → S(x, y)A(a) ↦ A(a)

R(a, b) ↦ R(a, b)

SRI Axioms

Remark 1. Deciding CQ entailment for SRI ontologies is 2ExpTime-Hard and in 3ExpTime.

Page 80: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 17/23

A1 ⊓ … ⊓ An ⊑ B ↦ A1(x) ∧ … ∧ An(x) → B(x)A ⊑ B1 ⊔ … ⊔ Bn ↦ A(x) → B1(x) ∨ … ∨ Bn(x)

A ⊑ ∀R . B ↦ A(y) ∧ R(x, y) → B(x)A ⊑ ∃R . B ↦ A(x) → ∃y . R(x, y) ∧ B(y)

R ⊑ S ↦ R(x, y) → S(x, y)R ∘ S ⊑ V ↦ R(x, y) ∧ S(y, z) → S(x, z)

R1 ⊓ … ⊓ Rn ⊑ S ↦ R1(x, y) ∧ … ∧ Rn(x, y) → S(x, y)A(a) ↦ A(a)

R(a, b) ↦ R(a, b)

SRI Axioms

Remarks. 1. Every rule in a SRI ontology has at most 3 variables. 2. Every function symbol in the skolemisation of a SRI ontology is of arity one.

Remark 1. Deciding CQ entailment for SRI ontologies is 2ExpTime-Hard and in 3ExpTime.

Page 81: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 17/23

A1 ⊓ … ⊓ An ⊑ B ↦ A1(x) ∧ … ∧ An(x) → B(x)A ⊑ B1 ⊔ … ⊔ Bn ↦ A(x) → B1(x) ∨ … ∨ Bn(x)

A ⊑ ∀R . B ↦ A(y) ∧ R(x, y) → B(x)A ⊑ ∃R . B ↦ A(x) → ∃y . R(x, y) ∧ B(y)

R ⊑ S ↦ R(x, y) → S(x, y)R ∘ S ⊑ V ↦ R(x, y) ∧ S(y, z) → S(x, z)

R1 ⊓ … ⊓ Rn ⊑ S ↦ R1(x, y) ∧ … ∧ Rn(x, y) → S(x, y)A(a) ↦ A(a)

R(a, b) ↦ R(a, b)

SRI Axioms

Remarks. 1. Every rule in a SRI ontology has at most 3 variables. 2. Every function symbol in the skolemisation of a SRI ontology is of arity one.

Remark 1. Deciding CQ entailment for SRI ontologies is 2ExpTime-Hard and in 3ExpTime.

Page 82: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 17/23

A1 ⊓ … ⊓ An ⊑ B ↦ A1(x) ∧ … ∧ An(x) → B(x)A ⊑ B1 ⊔ … ⊔ Bn ↦ A(x) → B1(x) ∨ … ∨ Bn(x)

A ⊑ ∀R . B ↦ A(y) ∧ R(x, y) → B(x)A ⊑ ∃R . B ↦ A(x) → ∃y . R(x, y) ∧ B(y)

R ⊑ S ↦ R(x, y) → S(x, y)R ∘ S ⊑ V ↦ R(x, y) ∧ S(y, z) → S(x, z)

R1 ⊓ … ⊓ Rn ⊑ S ↦ R1(x, y) ∧ … ∧ Rn(x, y) → S(x, y)A(a) ↦ A(a)

R(a, b) ↦ R(a, b)

SRI Axioms

Remarks. 1. Every rule in a SRI ontology has at most 3 variables. 2. Every function symbol in the skolemisation of a SRI ontology is of arity one.

Remark 1. Deciding CQ entailment for SRI ontologies is 2ExpTime-Hard and in 3ExpTime.

Page 83: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 17/23

A1 ⊓ … ⊓ An ⊑ B ↦ A1(x) ∧ … ∧ An(x) → B(x)A ⊑ B1 ⊔ … ⊔ Bn ↦ A(x) → B1(x) ∨ … ∨ Bn(x)

A ⊑ ∀R . B ↦ A(y) ∧ R(x, y) → B(x)A ⊑ ∃R . B ↦ A(x) → ∃y . R(x, y) ∧ B(y)

R ⊑ S ↦ R(x, y) → S(x, y)R ∘ S ⊑ V ↦ R(x, y) ∧ S(y, z) → S(x, z)

R1 ⊓ … ⊓ Rn ⊑ S ↦ R1(x, y) ∧ … ∧ Rn(x, y) → S(x, y)A(a) ↦ A(a)

R(a, b) ↦ R(a, b)

SRI Axioms

Remarks. 1. Every rule in a SRI ontology has at most 3 variables. 2. Every function symbol in the skolemisation of a SRI ontology is of arity one.

Remark 1. Deciding CQ entailment for SRI ontologies is 2ExpTime-Hard and in 3ExpTime.

Page 84: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 17/23

A1 ⊓ … ⊓ An ⊑ B ↦ A1(x) ∧ … ∧ An(x) → B(x)A ⊑ B1 ⊔ … ⊔ Bn ↦ A(x) → B1(x) ∨ … ∨ Bn(x)

A ⊑ ∀R . B ↦ A(y) ∧ R(x, y) → B(x)A ⊑ ∃R . B ↦ A(x) → ∃y . R(x, y) ∧ B(y)

R ⊑ S ↦ R(x, y) → S(x, y)R ∘ S ⊑ V ↦ R(x, y) ∧ S(y, z) → S(x, z)

R1 ⊓ … ⊓ Rn ⊑ S ↦ R1(x, y) ∧ … ∧ Rn(x, y) → S(x, y)A(a) ↦ A(a)

R(a, b) ↦ R(a, b)

SRI Axioms

Remarks. 1. Every rule in a SRI ontology has at most 3 variables. 2. Every function symbol in the skolemisation of a SRI ontology is of arity one.

Remark 1. Deciding CQ entailment for SRI ontologies is 2ExpTime-Hard and in 3ExpTime.

Page 85: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 18/23

SRI Axioms

Remarks. 1. Every rule in an OWL ontology has at most 3 variables. 2. Every function symbol in the skolemisation of a SRI ontology has arity one

Page 86: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 18/23

SRI Axioms

Remarks. 1. Every rule in an OWL ontology has at most 3 variables. 2. Every function symbol in the skolemisation of a SRI ontology has arity one

Corollary. To guarantee that tractable reasoning over a SRI ontology is possible we only need to verify the following: 1. Acyclicity. 2. Braid length in the dependency graph is bounded.

Page 87: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 19/23

Evaluation Results

Page 88: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 19/23

Evaluation Results

Ontologies 1576 225Acyclic 974 (61.8%) 170 (75.6%)

AcyclicityMOWL Corpus Oxford Ontology Repo

Page 89: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 19/23

Evaluation Results

Ontologies 1576 225Acyclic 974 (61.8%) 170 (75.6%)

Acyclicity

Braid Length

1 2 3 4 5 6 11 22 23 25 Total851 153 56 61 11 1 1 2 7 1 114474 88 93 98 99 99 99 99.1 99.3 99.9 100

MOWL Corpus + Oxford(max. length

of a braid)(count)

(%)

MOWL Corpus Oxford Ontology Repo

Page 90: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 20/23

Conclusions

Page 91: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 21/23

More Results!

Page 92: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 22/23

Conclusions

Efficient CQ Answering over a large subset of OWL 2 real-world ontologies is possible!

Page 93: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch 22/23

Conclusions

Efficient CQ Answering over a large subset of OWL 2 real-world ontologies is possible!Future work: - Implementation of a chase based reasoner for these ontologies - Refine conditions

Page 94: Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch Tractable

Tractable Query Answering for Expressive Ontologies and Rules David Carral, Irina Dragoste, Markus Krötzsch

Tractable Query Answering for Expressive Ontologies and Rules*

David Carral, Irina Dragoste, Markus Krötzsch Knowledge-Based Systems Group at

23/23

*Published at ISWC 2017