Motivation Motivation Outline Motivation Answer Set Programming is a well-known declarative problem solving approach. Answer Set Programs with Queries over Subprograms 1 Motivation Christoph Redl The Saturation Technique and its Restrictions 2 redl@kr.tuwien.ac.at Deciding Inconsistency of Normal Programs in Disjunctive ASP 3 4 Query Answering over Subprograms 5 Discussion Conclusion 6 July 4, 2017 Redl C. (TU Vienna) HEX-Programs July 4, 2017 1 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 2 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 3 / 26 Motivation Motivation Motivation Motivation Motivation Motivation Answer Set Programming is a well-known declarative problem solving approach. Answer Set Programming is a well-known declarative problem solving approach. Answer Set Programming is a well-known declarative problem solving approach. Answer Set Programming [Gelfond and Lifschitz, 1991] Answer Set Programming [Gelfond and Lifschitz, 1991] Answer Set Programming [Gelfond and Lifschitz, 1991] An ASP program consists of rules of form An ASP program consists of rules of form An ASP program consists of rules of form a 1 ∨ · · · ∨ a n ← b 1 , . . . , b m , not b m + 1 , . . . , not b n , a 1 ∨ · · · ∨ a n ← b 1 , . . . , b m , not b m + 1 , . . . , not b n , a 1 ∨ · · · ∨ a n ← b 1 , . . . , b m , not b m + 1 , . . . , not b n , An interpretation I is a set of ground atoms; An interpretation I is a set of ground atoms; An interpretation I is a set of ground atoms; it is an answer set of a ground program P , if I is a ⊆ -minimal model of it is an answer set of a ground program P , if I is a ⊆ -minimal model of it is an answer set of a ground program P , if I is a ⊆ -minimal model of the reduct P I = { H ( r ) ← B + ( r ) | r ∈ Π , I � | the reduct P I = { H ( r ) ← B + ( r ) | r ∈ Π , I � | the reduct P I = { H ( r ) ← B + ( r ) | r ∈ Π , I � | = b for all b ∈ B − ( r ) } . = b for all b ∈ B − ( r ) } . = b for all b ∈ B − ( r ) } . Semantics of non-ground programs is de fi ned via a grounding, Semantics of non-ground programs is de fi ned via a grounding, Semantics of non-ground programs is de fi ned via a grounding, i.e., replacement of all variables by all constants in all possible ways. i.e., replacement of all variables by all constants in all possible ways. i.e., replacement of all variables by all constants in all possible ways. Two (Related) Restrictions Two (Related) Restrictions Meta-reasoning about the answer sets of a (sub)program within another Meta-reasoning about the answer sets of a (sub)program within another (meta-)program not inherently supported. (meta-)program not inherently supported. Despite Σ P 2 -completeness of disjunctive ASP , solving problems from the fi rst level of the polynomial hierarchie is sometimes tricky. Redl C. (TU Vienna) HEX-Programs July 4, 2017 3 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 3 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 3 / 26
Motivation Motivation Motivation Motivation Motivation Motivation Two (Related) Restrictions Two (Related) Restrictions Two (Related) Restrictions Meta-reasoning about the answer sets of a (sub)program within another Meta-reasoning about the answer sets of a (sub)program within another Meta-reasoning about the answer sets of a (sub)program within another (meta-)program not inherently supported. (meta-)program not inherently supported. (meta-)program not inherently supported. Despite Σ P Despite Σ P Despite Σ P 2 -completeness of disjunctive ASP , solving problems from the fi rst 2 -completeness of disjunctive ASP , solving problems from the fi rst 2 -completeness of disjunctive ASP , solving problems from the fi rst level of the polynomial hierarchie within a program is dif fi cult. level of the polynomial hierarchie within a program is dif fi cult. level of the polynomial hierarchie within a program is dif fi cult. Contribution Contribution An encoding to decide inconsistency of a normal program within a An encoding to decide inconsistency of a normal program within a (disjunctive) program. (disjunctive) program. An encoding for query answering over a normal program within another program. Redl C. (TU Vienna) HEX-Programs July 4, 2017 4 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 4 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 4 / 26 Motivation The Saturation Technique and its Restrictions The Saturation Technique and its Restrictions Motivation Outline The Saturation Technique Basic idea Two (Related) Restrictions Exploits disjunctions with head-cycles Motivation 1 Meta-reasoning about the answer sets of a (sub)program within another to solve coNP-hard problems within ASP. (meta-)program not inherently supported. 2 The Saturation Technique and its Restrictions Despite Σ P 2 -completeness of disjunctive ASP , solving problems from the fi rst level of the polynomial hierarchie within a program is dif fi cult. 3 Deciding Inconsistency of Normal Programs in Disjunctive ASP Contribution 4 Query Answering over Subprograms An encoding to decide inconsistency of a normal program within a (disjunctive) program. Discussion 5 An encoding for query answering over a normal program within another program. 6 Conclusion A language extension of ASP program with query atoms to be used as a new modeling technique. Redl C. (TU Vienna) HEX-Programs July 4, 2017 4 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 5 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 6 / 26
The Saturation Technique and its Restrictions The Saturation Technique and its Restrictions The Saturation Technique and its Restrictions The Saturation Technique The Saturation Technique The Saturation Technique Basic idea Basic idea Basic idea Exploits disjunctions with head-cycles Exploits disjunctions with head-cycles Exploits disjunctions with head-cycles to solve coNP-hard problems within ASP. to solve coNP-hard problems within ASP. to solve coNP-hard problems within ASP. (Based on the hardness proof of disjunctive ASP [Eiter and Gottlob, 1995].) (Based on the hardness proof of disjunctive ASP [Eiter and Gottlob, 1995].) (Based on the hardness proof of disjunctive ASP [Eiter and Gottlob, 1995].) Typical use case: Typical use case: Check if a certain property holds for all objects in a certain domain. Check if a certain property holds for all objects in a certain domain. Example Check if a graph is not 3-colorable. Redl C. (TU Vienna) HEX-Programs July 4, 2017 6 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 6 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 6 / 26 The Saturation Technique and its Restrictions The Saturation Technique and its Restrictions The Saturation Technique and its Restrictions The Saturation Technique The Saturation Technique The Saturation Technique Basic idea Basic idea Restrictions Exploits disjunctions with head-cycles Exploits disjunctions with head-cycles Although any problem in coNP can be polynomially reduced to brave to solve coNP-hard problems within ASP. to solve coNP-hard problems within ASP. reasoning over disjunctive ASP , the reduction is not always obvious. (Based on the hardness proof of disjunctive ASP [Eiter and Gottlob, 1995].) (Based on the hardness proof of disjunctive ASP [Eiter and Gottlob, 1995].) Typical use case: Typical use case: Check if a certain property holds for all objects in a certain domain. Check if a certain property holds for all objects in a certain domain. Example Example Check if a graph is not 3-colorable. Check if a graph is not 3-colorable. Consider P non3col = F ∪ P guess ∪ P check ∪ P sat where Consider P non3col = F ∪ P guess ∪ P check ∪ P sat where P guess = { r ( X ) ∨ g ( X ) ∨ b ( X ) ← node ( X ) } P guess = { r ( X ) ∨ g ( X ) ∨ b ( X ) ← node ( X ) } P check = { sat ← c ( X ) , c ( Y ) , edge ( X , Y ) | c ∈ { r , g , b }} P check = { sat ← c ( X ) , c ( Y ) , edge ( X , Y ) | c ∈ { r , g , b }} P sat = { c ( X ) ← node ( X ) , sat | c ∈ { r , g , b }} . P sat = { c ( X ) ← node ( X ) , sat | c ∈ { r , g , b }} . Is has the answer set I sat = A ( P non3col ) iff the graph F is not 3-colorable. Otherwise its answer sets are proper subsets of I sat and represent 3-colorings. Redl C. (TU Vienna) HEX-Programs July 4, 2017 6 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 6 / 26 Redl C. (TU Vienna) HEX-Programs July 4, 2017 7 / 26
Recommend
More recommend