Debugging ASP Programs by Means of ASP

  • Martin Brain
  • Martin Gebser
  • Jörg Pührer
  • Torsten Schaub
  • Hans Tompits
  • Stefan Woltran
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4483)


Answer-set programming (ASP) has become an important paradigm for declarative problem solving in recent years. However, to further improve the usability of answer-set programs, the development of software-engineering tools is vital. In particular, the area of debugging provides a challenge in both theoretical and practical terms. This is due to the purely declarative nature of ASP that, on the one hand, calls for solver-independent methodologies and, on the other hand, does not directly apply to tracing techniques. In this paper, we propose a novel methodology, which rests within ASP itself, to sort out errors on the conceptual level. Our method makes use of tagging, where the program to be analyzed is rewritten using dedicated control atoms. This provides a flexible way to specify different types of debugging requests and a first step towards a dedicated (meta level) debugging language.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Delgrande, J., Schaub, T., Tompits, H.: A framework for compiling preferences in logic programs. Theory and Practice of Logic Programming 3(2), 129–187 (2003)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
  3. 3.
    Bösel, A., Linke, T., Schaub, T.: Profiling answer set programming: The visualization component of the noMoRe system. In: Alferes, J.J., Leite, J.A. (eds.) JELIA 2004. LNCS (LNAI), vol. 3229, pp. 702–705. Springer, Heidelberg (2004)Google Scholar
  4. 4.
    Brain, M., De Vos, M.: Debugging logic programs under the answer set semantics. In: Proc. ASP’05, pp. 141–152 (2005)Google Scholar
  5. 5.
    Syrjänen, T.: Debugging inconsistent answer set programs. In: Proc. NMR’06, pp. 77–83 (2006)Google Scholar
  6. 6.
    Pontelli, E., Son, T.: Justifications for logic programs under answer set semantics. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 196–210. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  7. 7.
    Simons, P., Niemelä, I., Soininen, T.: Extending and implementing the stable model semantics. Artificial Intelligence 138(1-2), 181–234 (2002)MATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Lin, F., Zhao, Y.: ASSAT: Computing answer sets of a logic program by SAT solvers. Artificial Intelligence 157(1-2), 115–137 (2004)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Clark, K.: Negation as failure. In: Logic and Data Bases, pp. 293–322. Plenum, New York (1978)Google Scholar
  10. 10.
    Fages, F.: Consistency of Clark’s completion and the existence of stable models. Journal of Methods of Logic in Computer Science 1, 51–60 (1994)Google Scholar
  11. 11.
    Leone, N., et al.: The DLV system for knowledge representation and reasoning. ACM Transactions on Computational Logic 7(3), 499–562 (2006)CrossRefMathSciNetGoogle Scholar
  12. 12.
    Reiter, R.: A theory of diagnosis from first principles. Artificial Intelligence 32(1), 57–95 (1987)MATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Roychoudhury, A., Ramakrishnan, C., Ramakrishnan, I.: Justifying proofs using memo tables. In: Proc. PPDP ’00, pp. 178–189 (2000)Google Scholar
  14. 14.
    Pemmasani, G., et al.: Online justification for tabled logic programs. In: Kameyama, Y., Stuckey, P.J. (eds.) FLOPS 2004. LNCS, vol. 2998, pp. 24–38. Springer, Heidelberg (2004)Google Scholar
  15. 15.
    Specht, G.: Generating explanation trees even for negations in deductive database systems. In: Proc. LPE’93, pp. 8–13 (1993)Google Scholar
  16. 16.
    Balduccini, M., Gelfond, M.: Logic programs with consistency-restoring rules. In: Proc. Commonsense’03, pp. 9–18 (2003)Google Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Martin Brain
    • 1
  • Martin Gebser
    • 2
  • Jörg Pührer
    • 3
  • Torsten Schaub
    • 2
  • Hans Tompits
    • 3
  • Stefan Woltran
    • 3
  1. 1.Department of Computer Science, University of Bath, Bath, BA2 7AYUnited Kingdom
  2. 2.Institut für Informatik, Universität Potsdam, August-Bebel-Straße 89, D-14482 PotsdamGermany
  3. 3.Institut für Informationssysteme, Technische Universität Wien, Favoritenstraße 9–11, A–1040 ViennaAustria

Personalised recommendations