Tractable Query Answering for Expressive Ontologies and Rules* fileTractable Query Answering for...

Preview:

Citation preview

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

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

Disjunctive Existential Rules

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

Disjunctive Existential Rules

Facts

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

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)

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.

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

The Disjunctive Chase

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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Ensuring Tractability of the Disjunctive Chase

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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(a) Acyclicity

y

zw

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

(a) Acyclicity

y

zwz(c)

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

(a) Acyclicity

y

zwz(c)

w(z(c))

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

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

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

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

………

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.

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)

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

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.

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.

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.

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

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

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

Ensuring Tractability

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

(a) The dependency graph is acyclic.

Ensuring Tractability

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

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

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

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

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

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

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

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

Braids

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

Braids

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

Braids

14/23

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

Braids

14/23

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

(?)

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.

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.

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

Evaluation

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

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.

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.

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.

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.

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.

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.

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

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.

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

Evaluation Results

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

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

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

Conclusions

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

More Results!

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!

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

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

Recommended