A Meta-Programming Technique for Debugging Answer-Set Programs

Answer-set programming (ASP) is widely recognised as a viable tool for declarative problem solving. However, there is currently a lack of tools for developing answer-set programs. In particular, providing tools for debugging answer-set programs has recently been identified as a crucial prerequisite for a wider acceptance of ASP. In this paper, we introduce a meta-programming technique for debugging in ASP. The basic question we address is why interpretations expected to be answer sets are not answer sets of the program to debug. We thus deal with finding semantical errors of programs. The explanations provided by our method are based on an intuitive scheme of errors that relies on a recent characterisation of the answer-set semantics. Furthermore, as we are using a meta-programming technique, debugging queries are expressed in terms of answer-set programs themselves, which has several benefits: For one, we can directly use ASP solvers for processing debugging queries. Indeed, our technique can easily be implemented, and we devised a corresponding prototype debugging system. Also, our approach respects the declarative nature of ASP, and the capabilities of the system can easily be extended to incorporate differing debugging features.

[1]  Leon Sterling,et al.  The Art of Prolog - Advanced Programming Techniques , 1986 .

[2]  Raymond Reiter,et al.  A Theory of Diagnosis from First Principles , 1986, Artif. Intell..

[3]  Leon Sterling,et al.  The art of Prolog (2nd ed.): advanced programming techniques , 1994 .

[4]  Jia-Huai You,et al.  A Three-Valued Semantics for Deductive Databases and Logic Programs , 1994, J. Comput. Syst. Sci..

[5]  C. R. Ramakrishnan,et al.  Justifying proofs using memo tables , 2000, PPDP '00.

[6]  Timo Soininen,et al.  Extending and implementing the stable model semantics , 2000, Artif. Intell..

[7]  Chitta Baral,et al.  Knowledge Representation, Reasoning and Declarative Problem Solving , 2003 .

[8]  Joohyung Lee,et al.  A Model-Theoretic Counterpart of Loop Formulas , 2005, IJCAI.

[9]  Marina De Vos,et al.  Debugging Logic Programs under the Answer Set Semantics , 2005, Answer Set Programming.

[10]  Yuliya Lierler,et al.  Elementary Sets of Logic Programs , 2006, AAAI.

[11]  Wolfgang Faber,et al.  The DLV system for knowledge representation and reasoning , 2002, TOCL.

[12]  Thomas Eiter,et al.  Towards automated integration of guess and check programs in answer set programming: a meta-interpreter and applications , 2004, Theory and Practice of Logic Programming.

[13]  Joohyung Lee,et al.  A generalization of the Lin-Zhao theorem , 2006, Annals of Mathematics and Artificial Intelligence.

[14]  T. Syrjänen Debugging Inconsistent Answer Set Programs , 2006 .

[15]  Stefan Woltran,et al.  Debugging ASP Programs by Means of ASP , 2007, LPNMR.

[16]  Miroslaw Truszczynski,et al.  Towards Debugging of Answer-Set Programs in the Language PSpb , 2007, IC-AI.

[17]  Enrico Pontelli,et al.  Under Consideration for Publication in Theory and Practice of Logic Programming Justifications for Logic Programs under Answer Set Semantics , 2022 .

[18]  Michael Gelfond,et al.  Classical negation in logic programs and disjunctive databases , 1991, New Generation Computing.