Computing Cores for Existential Rules with the Standard Chase and - - PowerPoint PPT Presentation

computing cores for existential rules
SMART_READER_LITE
LIVE PREVIEW

Computing Cores for Existential Rules with the Standard Chase and - - PowerPoint PPT Presentation

Computing Cores for Existential Rules with the Standard Chase and ASP Markus Krtzsch Knowledge-Based Systems, TU Dresden Rules are simple, but what do they mean? R 1 : father ( x y ) male ( y ) R 2 : person ( x ) v father (


slide-1
SLIDE 1

Computing Cores for Existential Rules

with the Standard Chase and ASP

Markus Krötzsch

Knowledge-Based Systems, TU Dresden

slide-2
SLIDE 2

Rules are simple, but what do they mean?

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v) person(ada) father(ada✱ george)

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

slide-3
SLIDE 3

Rules are simple, but what do they mean?

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v) person(ada) father(ada✱ george)

person father

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

slide-4
SLIDE 4

Rules are simple, but what do they mean?

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v) person(ada) father(ada✱ george)

person male father

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

slide-5
SLIDE 5

Rules are simple, but what do they mean?

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v) person(ada) father(ada✱ george)

person male father person father

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

slide-6
SLIDE 6

Rules are simple, but what do they mean?

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v) person(ada) father(ada✱ george)

person male father male person father father

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

slide-7
SLIDE 7

Rules are simple, but what do they mean?

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v) person(ada) father(ada✱ george)

person male father male person male father father

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

slide-8
SLIDE 8

Rules are simple, but what do they mean?

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v) person(ada) father(ada✱ george)

person male father male person male father father

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

slide-9
SLIDE 9

The Core

Simplification: We will only talk about finite chases here.

A core is a finite structure C where every homomor- phism C → C is an isomorphism.

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 3 of 11

slide-10
SLIDE 10

The Core

Simplification: We will only talk about finite chases here.

A core is a finite structure C where every homomor- phism C → C is an isomorphism.

person male

Core

father

× No core

male person male father father h

  • m
  • m
  • r

p h i s m

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 3 of 11

slide-11
SLIDE 11

Cores in Practice The core is the “best among all universal solutions” – Fagin, Kolaitis, and Popa 2005

  • Can be computed effectively
  • Possible during the chase: “core chase”

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 4 of 11

slide-12
SLIDE 12

Cores in Practice The core is the “best among all universal solutions” – Fagin, Kolaitis, and Popa 2005

  • Can be computed effectively
  • Possible during the chase: “core chase”

And yet: No current system implements the core chase! Problem: Computing the core takes exponential time in the size of the chase.

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 4 of 11

slide-13
SLIDE 13

Cores from the Standard Chase Idea: Couldn’t we get cores with the standard chase?

✱ ✱

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 5 of 11

slide-14
SLIDE 14

Cores from the Standard Chase Idea: Couldn’t we get cores with the standard chase? Analysis: What went wrong here?

male person male father father

✱ ✱

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 5 of 11

slide-15
SLIDE 15

Cores from the Standard Chase Idea: Couldn’t we get cores with the standard chase? Analysis: What went wrong here?

male person male father father

  • We applied rule R2 to a match:

person(ada) → father(ada✱ null) ∧ male(null)

  • In the final chase, this instance is satisfied

by an alternative match: person(ada) → father(ada✱ george) ∧ male(george)

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 5 of 11

slide-16
SLIDE 16

Cores from the Standard Chase Idea: Couldn’t we get cores with the standard chase? Analysis: What went wrong here?

male person male father father

  • We applied rule R2 to a match:

person(ada) → father(ada✱ null) ∧ male(null)

  • In the final chase, this instance is satisfied

by an alternative match: person(ada) → father(ada✱ george) ∧ male(george)

Theorem: Every chase without alternative matches yields a core.

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 5 of 11

slide-17
SLIDE 17

A Characterisation in ASP Idea: Characterise alternative-match-free standard chases in ASP .

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 6 of 11

slide-18
SLIDE 18

A Characterisation in ASP Idea: Characterise alternative-match-free standard chases in ASP .

Encoding:

  • Use terms with (skolem) function symbols instead of named nulls
  • Augment rules with precondition that they are “not blocked”
  • Add rules that derive that a rule is “blocked” when an alternative

match is found

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 6 of 11

slide-19
SLIDE 19

A Characterisation in ASP Idea: Characterise alternative-match-free standard chases in ASP .

Encoding:

  • Use terms with (skolem) function symbols instead of named nulls
  • Augment rules with precondition that they are “not blocked”
  • Add rules that derive that a rule is “blocked” when an alternative

match is found

Theorem: Cores from a chase without alternative matches correspond to the stable models of suitable nor- mal logic programs.

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 6 of 11

slide-20
SLIDE 20

Chasing for Cores Can we guide the standard chase to produce a core? Core Stratification:

  • Define R1 ≺ R2 to mean “R1 could produce structures that

enable alternative matches for R2”

  • Stratify the order of rule applications w.r.t. ≺

(together with a more usual positive “dependency” ≺+)

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 7 of 11

slide-21
SLIDE 21

Chasing for Cores Can we guide the standard chase to produce a core? Core Stratification:

  • Define R1 ≺ R2 to mean “R1 could produce structures that

enable alternative matches for R2”

  • Stratify the order of rule applications w.r.t. ≺

(together with a more usual positive “dependency” ≺+)

Results:

  • Core stratification of a rule set can be decided in ΣP

2.

  • If a chase is core stratified, then it has no alternative

matches (and therefore yields a core).

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 7 of 11

slide-22
SLIDE 22

Finite universal model (=finite core) Computed by a standard chase Computed by chase without alternative matches Core stratified chase Polynomial core stratified chase

slide-23
SLIDE 23

Existentials and Negation

A (classically) stratified logic program:

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v)

R3 :

father(x✱ y) → equals(y✱ y)

R4 :

father(x✱ y1) ∧ father(x✱ y2) ∧ not equals(y1✱ y2) → distinct(y1✱ y2)

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 9 of 11

slide-24
SLIDE 24

Existentials and Negation

A (classically) stratified logic program:

R1 :

father(x✱ y) → male(y)

R2 :

person(x) → ∃v✳father(x✱ v) ∧ male(v)

R3 :

father(x✱ y) → equals(y✱ y)

R4 :

father(x✱ y1) ∧ father(x✱ y2) ∧ not equals(y1✱ y2) → distinct(y1✱ y2)

Core

person male father

Core

male person male father father distinct

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 9 of 11

slide-25
SLIDE 25

Perfect Core Models Idea: Combine core stratification & classical stratification.

“Full stratification”

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 10 of 11

slide-26
SLIDE 26

Perfect Core Models Idea: Combine core stratification & classical stratification.

“Full stratification”

Theorem: A finite, fully stratified chase yield a unique stable model that is a core, the perfect core model.

person male father male person male father father distinct

Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 10 of 11

slide-27
SLIDE 27

Main insight: Cores are in reach for practical uses

  • Existing ASP engines can compute them
  • Existing chase implementations can compute them
  • Cores could be key to mix existentials and non-monotonic negation

Next questions:

  • How do practical implementations perform?
  • Is core stratification common in practice?
  • Can we generalise perfect core models?

c CC-By 2.0, Markus Krötzsch (Cyberman image by Paul Hudson, CC-By 2.0; Lovelace, Byron: public domain)