computing cores for existential rules
play

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 (


  1. Computing Cores for Existential Rules with the Standard Chase and ASP Markus Krötzsch Knowledge-Based Systems, TU Dresden

  2. Rules are simple, but what do they mean? R 1 : father ( x ✱ y ) → male ( y ) R 2 : 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

  3. Rules are simple, but what do they mean? R 1 : father ( x ✱ y ) → male ( y ) R 2 : 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

  4. Rules are simple, but what do they mean? R 1 : father ( x ✱ y ) → male ( y ) R 2 : person ( x ) → ∃ v ✳ father ( x ✱ v ) ∧ male ( v ) person ( ada ) father ( ada ✱ george ) person father male Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

  5. Rules are simple, but what do they mean? R 1 : father ( x ✱ y ) → male ( y ) R 2 : person ( x ) → ∃ v ✳ father ( x ✱ v ) ∧ male ( v ) person ( ada ) father ( ada ✱ george ) person person father father male Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

  6. Rules are simple, but what do they mean? R 1 : father ( x ✱ y ) → male ( y ) R 2 : person ( x ) → ∃ v ✳ father ( x ✱ v ) ∧ male ( v ) person ( ada ) father ( ada ✱ george ) person person father father father male male Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

  7. Rules are simple, but what do they mean? R 1 : father ( x ✱ y ) → male ( y ) R 2 : person ( x ) → ∃ v ✳ father ( x ✱ v ) ∧ male ( v ) person ( ada ) father ( ada ✱ george ) person person father father father male male male Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

  8. Rules are simple, but what do they mean? R 1 : father ( x ✱ y ) → male ( y ) R 2 : person ( x ) → ∃ v ✳ father ( x ✱ v ) ∧ male ( v ) person ( ada ) father ( ada ✱ george ) person person father father father male male male Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 2 of 11

  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

  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 person � Core × No core father father father male male male h o m m s o h i m o r p Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 3 of 11

  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

  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

  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

  14. ✱ ✱ Cores from the Standard Chase Idea: Couldn’t we get cores with the standard chase? Analysis: What went wrong here? person father father male male Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 5 of 11

  15. Cores from the Standard Chase Idea: Couldn’t we get cores with the standard chase? Analysis: What went wrong here? • We applied rule R 2 to a match : person person ( ada ) → father ( ada ✱ null ) ∧ male ( null ) father father • In the final chase, this instance is satisfied male male 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

  16. Cores from the Standard Chase Idea: Couldn’t we get cores with the standard chase? Analysis: What went wrong here? • We applied rule R 2 to a match : person person ( ada ) → father ( ada ✱ null ) ∧ male ( null ) father father • In the final chase, this instance is satisfied male male 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

  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

  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

  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

  20. Chasing for Cores Can we guide the standard chase to produce a core? Core Stratification: • Define R 1 ≺ � R 2 to mean “ R 1 could produce structures that enable alternative matches for R 2 ” • 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

  21. Chasing for Cores Can we guide the standard chase to produce a core? Core Stratification: • Define R 1 ≺ � R 2 to mean “ R 1 could produce structures that enable alternative matches for R 2 ” • 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

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

  23. Existentials and Negation A (classically) stratified logic program: father ( x ✱ y ) → male ( y ) R 1 : person ( x ) → ∃ v ✳ father ( x ✱ v ) ∧ male ( v ) R 2 : father ( x ✱ y ) → equals ( y ✱ y ) R 3 : R 4 : father ( x ✱ y 1 ) ∧ father ( x ✱ y 2 ) ∧ not equals ( y 1 ✱ y 2 ) → distinct ( y 1 ✱ y 2 ) Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 9 of 11

  24. Existentials and Negation A (classically) stratified logic program: father ( x ✱ y ) → male ( y ) R 1 : person ( x ) → ∃ v ✳ father ( x ✱ v ) ∧ male ( v ) R 2 : father ( x ✱ y ) → equals ( y ✱ y ) R 3 : R 4 : father ( x ✱ y 1 ) ∧ father ( x ✱ y 2 ) ∧ not equals ( y 1 ✱ y 2 ) → distinct ( y 1 ✱ y 2 ) person person � Core � Core father father father male male male distinct Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 9 of 11

  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

  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 person father father father male male male distinct Markus Krötzsch, TU Dresden Computing Cores for Existential Rules with the Standard Chase and ASP slide 10 of 11

Recommend


More recommend