query answering with description logic ontologies Meghyn Bienvenu ( CNRS & Université de Montpellier ) Magdalena Ortiz ( Vienna University of Technology )
queries with negation or other forms of recursion
t 2 ( t 1 t 2 vars or individuals) hasDessert y 1 z 1 hasDessert y 2 z 2 Note : can define UCQ s s and UCQ s in the obvious way queries with negation Menu y 1 ∙ example: find menus with at least three courses z 2 z 1 Menu y 2 offers x y 2 y 1 y 2 z 1 z 2 offers x y 1 dessert courses ∙ example: find restaurant offering two menus having different ∙ like a CQ, but can also have atoms t 1 Conjunctive query with inequalities ( CQ ) ∙ example: find menus whose main course is not spicy ∙ safety condition : every variable occurs in some positive atom ∙ like a CQ, but can also have negated atoms 3/8 Conjunctive query with safe negation ( CQ ¬ s ): ∃ y Menu ( x ) ∧ hasMain ( x , y ) ∧ ¬ Spicy ( y )
Note : can define UCQ s s and UCQ s in the obvious way queries with negation ∙ like a CQ, but can also have negated atoms ∙ safety condition : every variable occurs in some positive atom ∙ example: find menus whose main course is not spicy ∙ example: find restaurant offering two menus having different dessert courses ∙ example: find menus with at least three courses 3/8 Conjunctive query with safe negation ( CQ ¬ s ): ∃ y Menu ( x ) ∧ hasMain ( x , y ) ∧ ¬ Spicy ( y ) Conjunctive query with inequalities ( CQ ̸ = ) ∙ like a CQ, but can also have atoms t 1 ̸ = t 2 ( t 1 , t 2 vars or individuals) ∃ y 1 y 2 z 1 z 2 offers ( x , y 1 ) ∧ Menu ( y 1 ) ∧ hasDessert ( y 1 , z 1 ) ∧ offers ( x , y 2 ) ∧ Menu ( y 2 ) ∧ hasDessert ( y 2 , z 2 ) ∧ z 1 ̸ = z 2
queries with negation ∙ like a CQ, but can also have negated atoms ∙ safety condition : every variable occurs in some positive atom ∙ example: find menus whose main course is not spicy ∙ example: find restaurant offering two menus having different dessert courses ∙ example: find menus with at least three courses 3/8 Conjunctive query with safe negation ( CQ ¬ s ): ∃ y Menu ( x ) ∧ hasMain ( x , y ) ∧ ¬ Spicy ( y ) Conjunctive query with inequalities ( CQ ̸ = ) ∙ like a CQ, but can also have atoms t 1 ̸ = t 2 ( t 1 , t 2 vars or individuals) ∃ y 1 y 2 z 1 z 2 offers ( x , y 1 ) ∧ Menu ( y 1 ) ∧ hasDessert ( y 1 , z 1 ) ∧ offers ( x , y 2 ) ∧ Menu ( y 2 ) ∧ hasDessert ( y 2 , z 2 ) ∧ z 1 ̸ = z 2 Note : can define UCQ ¬ s s and UCQ ̸ = s in the obvious way
undecidability results for queries with negation Adding negation leads to undecidability even in very restricted settings Theorem The following problems are undecidable : 4/8 ∙ CQ ¬ s answering in DL-Lite R ∙ UCQ ¬ s answering in EL ∙ CQ ̸ = answering in DL-Lite R ∙ CQ ̸ = answering in EL
an undecidable tiling problem ∙ T is a set of tile types compatibility relations ∙ Neighboring tiles must respect V and H An unbounded tiling simulates a (non-det. ) Turing Machine 5/8 Unbounded tiling problem: ( T , H , V , T 0 ) ∙ V ⊆ T × T and H ⊆ T × T are the vertical and horizontal ∙ T 0 ∈ T is the initial tile type We want to tile an N × N corridor ∙ T 0 must be placed in bottom-left corner
undecidability of cqs with safe negation for lightweight dls We only need the folowing TBox , to generate points of the grid: 6/8 Check for errors in the grid or tiling, using UCQ q with disjuncts: T = { Point ⊑ ∃ h , Point ⊑ ∃ v , ∃ h − ⊑ Point , ∃ v − ⊑ Point } ∃ x . Point ( x ) ∧ ¬ T 1 ( x ) · · · ∧ ¬ T n ( x ) ∃ x . T i ( x ) ∧ T j ( x ) i ̸ = j , i , j ∈ { 1 , · · · , n } ∧ ∃ x , y . T i ( x ) ∧ h ( x , y ) ∧ ¬ T j ( y ) i ∈ { 1 , · · · , n } ( T i , T j ) ̸∈ H ∧ ∃ x , y . T i ( x ) ∧ v ( x , y ) ∧ ¬ T j ( y ) i ∈ { 1 , · · · , n } ( T i , T j ) ̸∈ V ∃ x 1 , x 2 , y 1 , y 2 . h ( x 1 , x 2 ) ∧ v ( x 1 , y 1 ) ∧ h ( y 1 , y 2 ) ∧ ¬ v ( x 2 , y 2 ) T , { A ( c ) } ̸| = q iff ( T , H , V , t 0 ) has a solution
undecidability results for queries with negation Adding negation leads to undecidability even in very restricted settings Theorem The following problems are undecidable : Possible solution : adopt alternative semantics (epistemic negation) 7/8 ∙ CQ ¬ s answering in DL-Lite R ∙ UCQ ¬ s answering in EL ∙ CQ ̸ = answering in DL-Lite R ∙ CQ ̸ = answering in EL
undecidability results for queries with negation Adding negation leads to undecidability even in very restricted settings Theorem The following problems are undecidable : Possible solution : adopt alternative semantics (epistemic negation) 7/8 ∙ CQ ¬ s answering in DL-Lite R ∙ UCQ ¬ s answering in EL ∙ CQ ̸ = answering in DL-Lite R ∙ CQ ̸ = answering in EL
undecidability results for recursive datalog queries Significant interest in combining DLs with Datalog rules , already in the late 90s Theorem Datalog query answering is undecidable in every DL that Possible solutions : ∙ use restricted classes of Datalog queries (e.g. path queries) ∙ DL-safe rules: can only apply rules to (named) individuals 8/8 Unfortunately, this almost always leads to undecidability : can express (directly or indirectly) A ⊑ ∃ r . A In particular: undecidable in both DL-Lite and EL
undecidability results for recursive datalog queries Significant interest in combining DLs with Datalog rules , already in the late 90s Theorem Datalog query answering is undecidable in every DL that Possible solutions : ∙ use restricted classes of Datalog queries (e.g. path queries) ∙ DL-safe rules: can only apply rules to (named) individuals 8/8 Unfortunately, this almost always leads to undecidability : can express (directly or indirectly) A ⊑ ∃ r . A In particular: undecidable in both DL-Lite and EL
Recommend
More recommend