• Keine Ergebnisse gefunden

David Carral

N/A
N/A
Protected

Academic year: 2022

Aktie "David Carral"

Copied!
214
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Reasoning over Existential Rules with Acyclicity Notions David Carral 1

Reasoning over Existential Rules with Acyclicity Notions and the

Datalog-first Restricted Chase

David Carral

Slides available at https://iccl.inf.tu-dresden.de/web/Existential-rules-acyclicity

(2)

Preliminaries

(3)

Reasoning over Existential Rules with Acyclicity Notions David Carral /333

x, y, z . ( HasParent (x, y) ∧ HasSister ( y, z) → HasAunt (x, z) )

x . ( Human (x) → ∃ y . ( HasParent (x, y) ∧ Human ( y) ) )

x, y, w . ( P (x, a , y) ∧ R (y, w) ∧ S (w, x) → ∃ v . ( R (w, v) ∧ A (v) ) )

Existential Rules

(4)

Reasoning over Existential Rules with Acyclicity Notions David Carral /333

Existential Rules

HasParent (x, y) ∧ HasSister ( y, z) → HasAunt (x, z) Human (x) → ∃ y . HasParent (x, y) ∧ Human (y)

P (x, a , y) ∧ R (y, w) ∧ S (w, x) → ∃ v . R (w, v) ∧ A (v)

(5)

Reasoning over Existential Rules with Acyclicity Notions David Carral /333

Existential Rules

Facts

HasFriend ( stan , kyle ) P ( a , c , d )

HasParent (x, y) ∧ HasSister ( y, z) → HasAunt (x, z) Human (x) → ∃ y . HasParent (x, y) ∧ Human (y)

P (x, a , y) ∧ R (y, w) ∧ S (w, x) → ∃ v . R (w, v) ∧ A (v)

(6)

Reasoning over Existential Rules with Acyclicity Notions David Carral /333

Existential Rules

Facts

HasFriend ( stan , kyle ) P ( a , c , d )

HasParent (x, y) ∧ HasSister ( y, z) → HasAunt (x, z) Human (x) → ∃ y . HasParent (x, y) ∧ Human (y)

P (x, a , y) ∧ R (y, w) ∧ S (w, x) → ∃ v . R (w, v) ∧ A (v)

BCQs

x, y . HasConflictOfInterest (x, y)

x, y, z, w . P (x, y, z) ∧ R (x, w) ∧ A (w)

(7)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

DirectedBy(ai, spielberg) ActsIn(judeLaw, ai)

Director(spielberg)

The Chase Algorithm

(8)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

DirectedBy(ai, spielberg) ActsIn(judeLaw, ai)

Director(spielberg)

The Chase Algorithm

(9)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

DirectedBy(ai, spielberg) ActsIn(judeLaw, ai)

Director(spielberg)

The Chase Algorithm

ActsIn

DirectedBy

(10)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

Director(spielberg)

The Chase Algorithm

ActsIn

DirectedBy

(11)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

Director(spielberg)

The Chase Algorithm

ActsIn

DirectedBy

: Director

(12)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

The Chase Algorithm

ActsIn

DirectedBy

: Director

(13)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

The Chase Algorithm

Features

ActsIn

DirectedBy

: Director

(14)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

: Actor

The Chase Algorithm

Features

ActsIn

DirectedBy

: Director

(15)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

: Actor

The Chase Algorithm

Features

ActsIn Directs

DirectedBy

: Director

(16)

Reasoning over Existential Rules with Acyclicity Notions David Carral /334

spielberg

ai

judeLaw

Features(x, y) ⟶ Actor(y) ActsIn(x, y) ⟶ Features(y, x)

DirectedBy(x, y) ⟶ Directs(y, x)

Directs(x, y) ⋀ Features(y, z) ⟶ DirectsActor(x, z)

: Actor

The Chase Algorithm

Features ActsIn

DirectsActor

Directs

DirectedBy

: Director

(17)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

/33 5

b : Bicycle

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(18)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, f

v

(x)) ⋀ Wheel(f

v

(x)) Wheel(x) ⟶ IsPartOf(x, f

w

(x)) ⋀ Bicycle(f

w

(x))

/33 5

b : Bicycle

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(19)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(20)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel HasPart

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(21)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle HasPart

IsPartOf

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(22)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle HasPart

IsPartOf

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

IsPartOf

(23)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle HasPart

IsPartOf

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

HasPart

IsPartOf

(24)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle

v(w(v(b))) : Wheel HasPart

IsPartOf

HasPart

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

HasPart

IsPartOf

(25)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle

v(w(v(b))) : Wheel HasPart

IsPartOf

HasPart

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

HasPart

IsPartOf IsPartOf

(26)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle

v(w(v(b))) : Wheel HasPart

IsPartOf

HasPart

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

HasPart

IsPartOf IsPartOf

(27)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle

v(w(v(b))) : Wheel HasPart

IsPartOf

HasPart

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

HasPart

IsPartOf IsPartOf

(28)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle

v(w(v(b))) : Wheel HasPart

IsPartOf

HasPart

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

HasPart

IsPartOf IsPartOf

(29)

Reasoning over Existential Rules with Acyclicity Notions David Carral

Bicycle(x) ⟶ HasPart(x, v(x)) ⋀ Wheel(v(x)) Wheel(x) ⟶ IsPartOf(x, w(x)) ⋀ Bicycle(w(x))

/33 5

b : Bicycle

v(b) : Wheel

w(v(b)) : Bicycle

v(w(v(b))) : Wheel HasPart

IsPartOf

HasPart

The Skolem Chase

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

HasPart

IsPartOf IsPartOf

(30)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

The Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(31)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

The Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(32)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel HasPart

The Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(33)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(34)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(35)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(36)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

(37)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

(38)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1

(39)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1

2

(40)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

3

(41)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

(42)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

1

(43)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

2 1

(44)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

2 1

3

(45)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

2 1

4 3

(46)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

2 1

4 3

1

(47)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

2 1

4 3

2 1

(48)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

2 1

4 3

2 1

3

(49)

Reasoning over Existential Rules with Acyclicity Notions David Carral /336

b : Bicycle

v(b) : Wheel

Bicycle : w(v(b)) HasPart

IsPartOf

The Restricted Chase

HasPart IsPartOf

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

b : Bicycle

1 2

4 3

2 1

4 3

2 1

4 3

(50)

Reasoning over Existential Rules with Acyclicity Notions David Carral /337

b : Bicycle

The Datalog-First Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(51)

Reasoning over Existential Rules with Acyclicity Notions David Carral /337

b : Bicycle

v(b) : Wheel HasPart

The Datalog-First Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(52)

Reasoning over Existential Rules with Acyclicity Notions David Carral /337

b : Bicycle

v(b) : Wheel

IsPartOf HasPart

The Datalog-First Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(53)

Acyclicity Notions

(54)

Acyclicity Notions

Restricted Chase (Non)Termination for Existential Rules with Disjunctions

David Carral, Irina Dragoste, and Markus Krötzsch

[IJCAI 2017]

(55)

Reasoning over Existential Rules with Acyclicity Notions David Carral /339

* Weak Acyclicity (WA) [Theor. Comput. Sci. 2005]

* Joint Acyclicity (JA) [IJCAI 2011]

* Model-Summarising Acyclicity (MSA) and Model-Faithful Acyclicity (MFA) [J. Artif. Intell. Res. 2013]

Acyclicity Notions for Universal Termination

(56)

Reasoning over Existential Rules with Acyclicity Notions David Carral /339

* Weak Acyclicity (WA) [Theor. Comput. Sci. 2005]

* Joint Acyclicity (JA) [IJCAI 2011]

* Model-Summarising Acyclicity (MSA) and Model-Faithful Acyclicity (MFA) [J. Artif. Intell. Res. 2013]

Acyclicity Notions for Universal Termination

WA JA MSA

MFA

`

Skolem

Chase

(57)

Reasoning over Existential Rules with Acyclicity Notions David Carral /339

* Weak Acyclicity (WA) [Theor. Comput. Sci. 2005]

* Joint Acyclicity (JA) [IJCAI 2011]

* Model-Summarising Acyclicity (MSA) and Model-Faithful Acyclicity (MFA) [J. Artif. Intell. Res. 2013]

* Restricted Joint Acyclicity (RJA),

Restricted Model-Summarising Acyclicity (RMSA), and Restricted Model-Faithful Acyclicity (RMFA) [IJCAI 2017]

Acyclicity Notions for Universal Termination

WA JA MSA

MFA

`

Skolem

Chase

(58)

Reasoning over Existential Rules with Acyclicity Notions David Carral /339

* Weak Acyclicity (WA) [Theor. Comput. Sci. 2005]

* Joint Acyclicity (JA) [IJCAI 2011]

* Model-Summarising Acyclicity (MSA) and Model-Faithful Acyclicity (MFA) [J. Artif. Intell. Res. 2013]

* Restricted Joint Acyclicity (RJA),

Restricted Model-Summarising Acyclicity (RMSA), and Restricted Model-Faithful Acyclicity (RMFA) [IJCAI 2017]

Acyclicity Notions for Universal Termination

WA JA MSA

MFA

RJA RMSA RMFA

`

Skolem Chase

Datalog-first

Restricted

Chase

(59)

Reasoning over Existential Rules with Acyclicity Notions David Carral /339

* Weak Acyclicity (WA) [Theor. Comput. Sci. 2005]

* Joint Acyclicity (JA) [IJCAI 2011]

* Model-Summarising Acyclicity (MSA) and Model-Faithful Acyclicity (MFA) [J. Artif. Intell. Res. 2013]

* Restricted Joint Acyclicity (RJA),

Restricted Model-Summarising Acyclicity (RMSA), and Restricted Model-Faithful Acyclicity (RMFA) [IJCAI 2017]

Acyclicity Notions for Universal Termination

WA JA MSA

MFA

RJA RMSA RMFA

`

Skolem Chase

Datalog-first

Restricted

Chase

(60)

Reasoning over Existential Rules with Acyclicity Notions David Carral /339

* Weak Acyclicity (WA) [Theor. Comput. Sci. 2005]

* Joint Acyclicity (JA) [IJCAI 2011]

* Model-Summarising Acyclicity (MSA) and Model-Faithful Acyclicity (MFA) [J. Artif. Intell. Res. 2013]

* Restricted Joint Acyclicity (RJA),

Restricted Model-Summarising Acyclicity (RMSA), and Restricted Model-Faithful Acyclicity (RMFA) [IJCAI 2017]

Acyclicity Notions for Universal Termination

WA JA MSA

MFA

RJA RMSA RMFA

`

Skolem Chase

Datalog-first Restricted Chase

Bicycle(x) ⟶ ∃v . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃w . IsPartOf(x, w) ⋀ Bicycle(w) HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(61)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

The MFA Check

(62)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

The MFA Check

(63)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

The MFA Check

(64)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

The MFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(65)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

The MFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(66)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

w( ★ ) : Bicycle IsPartOf

The MFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(67)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ ) HasPart

w( ★ ) : Bicycle IsPartOf

The MFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(68)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ ) HasPart

w( ★ ) : Bicycle IsPartOf IsPartOf

The MFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(69)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ ) HasPart

w( ★ ) : Bicycle DirectedBy v(w( ★ )) IsPartOf

IsPartOf

The MFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(70)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ )

Directs HasPart

w( ★ ) : Bicycle DirectedBy v(w( ★ )) IsPartOf

IsPartOf

The MFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(71)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ )

Directs HasPart

w( ★ ) : Bicycle DirectedBy v(w( ★ )) IsPartOf

IsPartOf

The MFA Check

HasPart

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(72)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3310

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ )

Directs HasPart

w( ★ ) : Bicycle DirectedBy v(w( ★ )) IsPartOf

IsPartOf

MFA

The MFA Check

HasPart

Bicycle(x) ⟶ ∃y . HasPart(x, v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(73)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(74)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(75)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

w( ★ ) : Bicycle IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(76)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ ) HasPart

w( ★ ) : Bicycle IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(77)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ ) HasPart

w( ★ ) : Bicycle IsPartOf

IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(78)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ )

w(v( ★ )) : Bicycle HasPart

IsPartOf

w( ★ ) : Bicycle IsPartOf

IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(79)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ ) HasPart

w(v( ★ )) : Bicycle HasPart

IsPartOf

w( ★ ) : Bicycle IsPartOf

IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(80)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ ) HasPart

w(v( ★ )) : Bicycle HasPart

IsPartOf

w( ★ ) : Bicycle HasPart v(w( ★ )) : Wheel IsPartOf

IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(81)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ )

IsPartOf HasPart

w(v( ★ )) : Bicycle HasPart

IsPartOf

w( ★ ) : Bicycle HasPart v(w( ★ )) : Wheel IsPartOf

IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(82)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ )

IsPartOf HasPart

w(v( ★ )) : Bicycle

v(w(v( ))) : Wheel HasPart

IsPartOf HasPart

w( ★ ) : Bicycle HasPart v(w( ★ )) : Wheel IsPartOf

IsPartOf

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(83)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3311

HasPart, IsPartOf

Bicycle, Wheel : ★

Wheel : v( ★ )

IsPartOf HasPart

w(v( ★ )) : Bicycle

v(w(v( ))) : Wheel HasPart

IsPartOf HasPart

w( ★ ) : Bicycle HasPart v(w( ★ )) : Wheel IsPartOf

IsPartOf

Not MFA!

The MFA Check

* Fact: If the Skolem chase terminates on the critical instance (the set of all possible facts containing a single constant “ ★ ”), then it terminates on all sets of facts.

* MFA Check: Perform chase with the critical instance, check if it stops; give up if a cyclic skolem term (with a repeated function symbol) appears.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(84)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

(85)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

(86)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v)

Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

(87)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(88)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(89)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(90)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Example: Suppose for a contradiction that the fact Wheel(v(w(t))) with t some term is derived during the computation of a chase sequence.

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(91)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Example: Suppose for a contradiction that the fact Wheel(v(w(t))) with t some term is derived during the computation of a chase sequence.

v(w(t)) : Wheel

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(92)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Example: Suppose for a contradiction that the fact Wheel(v(w(t))) with t some term is derived during the computation of a chase sequence.

* Such a fact may only be derived via application of the red rule on Bicycle(w(t)) which in turn may only be derived if the blue rule is applied. Hence, Wheel(t) and IsPartOf(t, w(t)) and are also part of the chase before Wheel(v(w(t))) is derived.

v(w(t)) : Wheel

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(93)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Example: Suppose for a contradiction that the fact Wheel(v(w(t))) with t some term is derived during the computation of a chase sequence.

* Such a fact may only be derived via application of the red rule on Bicycle(w(t)) which in turn may only be derived if the blue rule is applied. Hence, Wheel(t) and IsPartOf(t, w(t)) and are also part of the chase before Wheel(v(w(t))) is derived.

v(w(t)) : Wheel

w(t) : Bicycle

t : Wheel

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

IsPartOf

(94)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Example: Suppose for a contradiction that the fact Wheel(v(w(t))) with t some term is derived during the computation of a chase sequence.

* Such a fact may only be derived via application of the red rule on Bicycle(w(t)) which in turn may only be derived if the blue rule is applied. Hence, Wheel(t) and IsPartOf(t, w(t)) and are also part of the chase before Wheel(v(w(t))) is derived.

* Because the green rule is Datalog, DirectedBy(v(t), t) is also part of the chase.

v(w(t)) : Wheel

w(t) : Bicycle

t : Wheel

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

IsPartOf

(95)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Example: Suppose for a contradiction that the fact Wheel(v(w(t))) with t some term is derived during the computation of a chase sequence.

* Such a fact may only be derived via application of the red rule on Bicycle(w(t)) which in turn may only be derived if the blue rule is applied. Hence, Wheel(t) and IsPartOf(t, w(t)) and are also part of the chase before Wheel(v(w(t))) is derived.

* Because the green rule is Datalog, DirectedBy(v(t), t) is also part of the chase.

v(w(t)) : Wheel

w(t) : Bicycle

t : Wheel

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

IsPartOf

HasPart

(96)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3312

The RMFA Check: Blocked Checks

* Problem: Datalog-first restricted chase termination is not monotone!

* In particular, it always terminates on the critical instance.

* Idea: for each fact that occurs in the chase sequence, we can re-trace a necessary fact set the must have been derived to derive this fact. By checking these facts we can in some cases

determine that the application of the rule and substitution that generates this fact is blocked.

Example: Suppose for a contradiction that the fact Wheel(v(w(t))) with t some term is derived during the computation of a chase sequence.

* Such a fact may only be derived via application of the red rule on Bicycle(w(t)) which in turn may only be derived if the blue rule is applied. Hence, Wheel(t) and IsPartOf(t, w(t)) and are also part of the chase before Wheel(v(w(t))) is derived.

* Because the green rule is Datalog, DirectedBy(v(t), t) is also part of the chase.

* The red rule may not be applied to introduce Director(v(w(t))) since its application with respect to the substitution {x / w(t)} is restricted.

v(w(t)) : Wheel

w(t) : Bicycle

t : Wheel

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x) IsPartOf(x, y) ⟶ HasPart(y, x)

IsPartOf

HasPart

(97)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(98)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(99)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(100)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

* Give up if the procedure does not stop before the occurrence of a cyclic term.

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(101)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

* Give up if the procedure does not stop before the occurrence of a cyclic term.

HasPart, IsPartOf

Bicycle, Wheel : ★

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(102)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

* Give up if the procedure does not stop before the occurrence of a cyclic term.

HasPart, IsPartOf

Bicycle, Wheel : ★

w( ★ ) : Bicycle IsPartOf

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(103)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

* Give up if the procedure does not stop before the occurrence of a cyclic term.

HasPart, IsPartOf

Bicycle, Wheel : ★

w( ★ ) : Bicycle IsPartOf

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(104)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

* Give up if the procedure does not stop before the occurrence of a cyclic term.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ ) : Wheel

HasPart

w( ★ ) : Bicycle IsPartOf

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(105)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

* Give up if the procedure does not stop before the occurrence of a cyclic term.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ ) : Wheel

HasPart

w( ★ ) : Bicycle IsPartOf

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

(106)

Reasoning over Existential Rules with Acyclicity Notions David Carral /3313

* Perform a chase like construction on the critical instance.

* Only apply an existential rule with respect to a substitution if this pair is not blocked.

* Give up if the procedure does not stop before the occurrence of a cyclic term.

HasPart, IsPartOf

Bicycle, Wheel : ★

v( ★ ) : Wheel

DirectedBy HasPart

w( ★ ) : Bicycle IsPartOf

The RMFA Check

Bicycle(x) ⟶ ∃y . HasPart(x, v) ⋀ Wheel(v) Wheel(x) ⟶ ∃y . IsPartOf(x, w) ⋀ Bicycle(w)

HasPart(x, y) ⟶ IsPartOf(y, x)

IsPartOf(x, y) ⟶ HasPart(y, x)

Referenzen

ÄHNLICHE DOKUMENTE

Based on SOQA, we provide SOQA-QL, an SQL-like query language that supports declarative queries against ontological metadata and data, and the SOQA Browser, a tool to

There are steps that can be taken now to improve the effectiveness of casualty recording worldwide States, NGOs, and other institutions and organisations that support or do

Strategy shows potential for improving run times No significant reduction in the number of derived facts Computation reliances is cheap even on larger rule sets Future work:.

In this section, we present equality model-faithful acyclic- ity (EMFA), an acyclicity notion based on model-faithful acyclicity (MFA) (Cuenca Grau et al. 2013) that can be di-

• Rules are a powerful data query paradigm (Datalog!) – applications in data management, program analysis, business analytics, social network

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

Although Sri Lanka has given an assurance to India during Rajapaksa-Manmohan talks in July 2010 and subsequently to UN Secretary General Ban-ki-Moon that the government would

To provide semi-automatic support for this, OntoSelect includes a functionality for selecting ontologies for a given knowledge markup task, based on the following criteria