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
Preliminaries
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
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)
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)
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)
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
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
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
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
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
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
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
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
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
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
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)
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)
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)
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)
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)
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
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
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
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
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
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
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
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
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)
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)
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)
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)
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)
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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)
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)
Acyclicity Notions
Acyclicity Notions
Restricted Chase (Non)Termination for Existential Rules with Disjunctions
David Carral, Irina Dragoste, and Markus Krötzsch
[IJCAI 2017]
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
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
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
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
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
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)
Reasoning over Existential Rules with Acyclicity Notions David Carral /3310
The MFA Check
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
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Reasoning over Existential Rules with Acyclicity Notions David Carral /3312
The RMFA Check: Blocked Checks
Reasoning over Existential Rules with Acyclicity Notions David Carral /3312
The RMFA Check: Blocked Checks
* Problem: Datalog-first restricted chase termination is not monotone!
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)
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)
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)
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)
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)
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)
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)
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
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
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
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
Reasoning over Existential Rules with Acyclicity Notions David Carral /3313