Interactive Debugging of Non-ground ASP Programs

  • Carmine DodaroEmail author
  • Philip Gasteiger
  • Benjamin Musitsch
  • Francesco Ricca
  • Kostyantyn Shchekotykhin
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9345)


Answer Set Programming (ASP) is an expressive paradigm for problem solving. Although the basic syntax of ASP is not particularly difficult, the identification of (even trivial) mistakes may be painful and absorb a lot of time. The development of programs can be made faster and comfortable by resorting to an effective program debugger. In this paper we present a new interactive debugging method for ASP. The method points to a buggy non-ground rule identified by asking the programmer a sequence of questions on an expected answer set. The method has been implemented on top of the WASP solver. The tight integration with the solver allows to avoid efficiency problems due to the grounding blowup induced by modern reification-based debuggers.


Supporting Rule Disjunctive Logic Program Fail Test Case Unsatisfiable Core Debug Program 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Alviano, M., Dodaro, C., Leone, N., Ricca, F.: Advances in wasp. In: Calimeri, F., Ianni, G., Truszczynski, M. (eds.) LPNMR. LNCS, vol. 9345, pp. 40–54. Springer, Heidelberg (2015)Google Scholar
  2. 2.
    Aschinger, M., Drescher, C., Friedrich, G., Gottlob, G., Jeavons, P., Ryabokon, A., Thorstensen, E.: Optimization methods for the partner units problem. In: Achterberg, T., Beck, J.C. (eds.) CPAIOR 2011. LNCS, vol. 6697, pp. 4–19. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  3. 3.
    Balduccini, M., Gelfond, M.: Logic programs with consistency-restoring rules. In: AAAI Spring Symposiumm, pp. 9–18 (2003)Google Scholar
  4. 4.
    Brain, M., Vos, M.D.: Debugging logic programs under the answer set semantics. In: Workshop on ASP, pp. 141–152 (2005)Google Scholar
  5. 5.
    Brewka, G., Eiter, T., Truszczynski, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011)CrossRefGoogle Scholar
  6. 6.
    Calimeri, F., Ianni, G., Ricca, F.: The third open answer set programming competition. TPLP 14(1), 117–135 (2014)zbMATHGoogle Scholar
  7. 7.
    Eiter, T., Gottlob, G., Mannila, H.: Disjunctive datalog. ACM TODS 22(3), 364–418 (1997)CrossRefGoogle Scholar
  8. 8.
    Febbraro, O., Leone, N., Reale, K., Ricca, F.: Unit testing in ASPIDE. In: INAP/WLP, pp. 345–364 (2011)Google Scholar
  9. 9.
    Febbraro, O., Reale, K., Ricca, F.: ASPIDE: integrated development environment for answer set programming. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 317–330. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  10. 10.
    Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Answer Set Solving in Practice. Morgan & Claypool Publishers, California (2012) Google Scholar
  11. 11.
    Gebser, M., Pührer, J., Schaub, T., Tompits, H.: A meta-programming technique for debugging answer-set programs. In: AAAI, pp. 448–453 (2008)Google Scholar
  12. 12.
    Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9(3–4), 365–386 (1991)CrossRefGoogle Scholar
  13. 13.
    Grasso, G., Leone, N., Manna, M., Ricca, F.: ASP at work: spin-off and applications of the DLV system. In: Balduccini, M., Son, T.C. (eds.) Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning. LNCS, vol. 6565, pp. 432–451. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  14. 14.
    Janhunen, T., Niemelä, I., Oetsch, J., Pührer, J., Tompits, H.: Random vs. structure-based testing of answer-set programs: an experimental comparison. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 242–247. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  15. 15.
    Junker, U.: QuickXplain: Preferred explanations and relaxations for over-constrained problems. In: AAAI, pp. 167–172 (2004)Google Scholar
  16. 16.
    de Kleer, J., Williams, B.C.: Diagnosing multiple faults. Artif. Intell. 32(1), 97–130 (1987)zbMATHCrossRefGoogle Scholar
  17. 17.
    Mikitiuk, A., Moseley, E., Truszczynski, M.: Towards debugging of answer-set programs in the language PSpb. In: IC-AI, pp. 635–640 (2007)Google Scholar
  18. 18.
    Oetsch, J., Pührer, J., Tompits, H.: Stepping through an answer-set program. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 134–147. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  19. 19.
    Oetsch, J., Pührer, J., Tompits, H.: Catching the Ouroboros: on debugging non-ground answer-set programs. TPLP 10(4–6), 2010 (2010)Google Scholar
  20. 20.
    Perri, S., Ricca, F., Terracina, G., Cianni, D., Veltri, P.: An integrated graphic tool for developing and testing dlv programs. In: SEA Workshop, pp. 86–100 (2007)Google Scholar
  21. 21.
    Polleres, A., Frühstück, M., Schenner, G., Friedrich, G.: Debugging non-ground ASP programs with choice rules, cardinality and weight constraints. In: Cabalar, P., Son, T.C. (eds.) LPNMR 2013. LNCS, vol. 8148, pp. 452–464. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  22. 22.
    Pontelli, E., Son, T.C., El-Khatib, O.: Justifications for logic programs under answer set semantics. TPLP 9(1), 1–56 (2009)zbMATHMathSciNetGoogle Scholar
  23. 23.
    Reiter, R.: A theory of diagnosis from first principles. Artif. Intell. 32(1), 57–95 (1987)zbMATHMathSciNetCrossRefGoogle Scholar
  24. 24.
    Shchekotykhin, K.: Interactive query-based debugging of ASP programs. In: AAAI, pp. 1597–1603 (2015)Google Scholar
  25. 25.
    Shchekotykhin, K., Friedrich, G., Fleiss, P., Rodler, P.: Interactive ontology debugging: two query strategies for efficient fault localization. J. Web Semant. 12–13, 88–103 (2012)CrossRefGoogle Scholar
  26. 26.
    Shchekotykhin, K., Friedrich, G., Rodler, P., Fleiss, P.: Sequential diagnosis of high cardinality faults in knowledge-bases by direct diagnosis generation. In: ECAI, pp. 813–818 (2014)Google Scholar
  27. 27.
    Syrjänen, T.: Debugging inconsistent answer set programs. In: NMR, pp. 77–84 (2006)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Carmine Dodaro
    • 1
    Email author
  • Philip Gasteiger
    • 2
  • Benjamin Musitsch
    • 2
  • Francesco Ricca
    • 1
  • Kostyantyn Shchekotykhin
    • 2
  1. 1.Department of Mathematics and Computer ScienceUniversity of CalabriaRende (CS)Italy
  2. 2.Alpen-Adria-Universität KlagenfurtKlagenfurtAustria

Personalised recommendations