Hostname: page-component-586b7cd67f-2brh9 Total loading time: 0 Render date: 2024-11-25T04:01:05.777Z Has data issue: false hasContentIssue false

Debugging Non-ground ASP Programs: Technique and Graphical Tools

Published online by Cambridge University Press:  15 February 2019

CARMINE DODARO
Affiliation:
DIBRIS, University of Genova, Genova, Italy (e-mail: [email protected])
PHILIP GASTEIGER
Affiliation:
Alpen-Adria-Universität Klagenfurt, Klagenfurt, Austria (e-mail: [email protected])
KRISTIAN REALE
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Rende, Italy (e-mails: [email protected], [email protected])
FRANCESCO RICCA
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Rende, Italy (e-mails: [email protected], [email protected])
KONSTANTIN SCHEKOTIHIN
Affiliation:
Alpen-Adria-Universität Klagenfurt, Klagenfurt, Austria (e-mail: [email protected])

Abstract

Answer set programming (ASP) is one of the major declarative programming paradigms in the area of logic programming and non-monotonic reasoning. Despite that ASP features a simple syntax and an intuitive semantics, errors are common during the development of ASP programs. In this paper we propose a novel debugging approach allowing for interactive localization of bugs in non-ground programs. The new approach points the user directly to a set of non-ground rules involved in the bug, which might be refined (up to the point in which the bug is easily identified) by asking the programmer a sequence of questions on an expected answer set. The approach has been implemented on top of the ASP solver wasp. The resulting debugger has been complemented by a user-friendly graphical interface, and integrated in aspide, a rich integrated development environment (IDE) for answer set programs. In addition, an empirical analysis shows that the new debugger is not affected by the grounding blowup limiting the application of previous approaches based on meta-programming.

Type
Original Article
Copyright
Copyright © Cambridge University Press 2019 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Footnotes

This paper includes parts and significantly extends our previous work (Dodaro et al. 2015). The authors are grateful to Marc Deneker and Ingmar Dasseville for the fruitful discussions about debugging for logic programs and FO(ID) theories, and in particular for the useful suggestion improving the handling of bugs caused by atoms missing a supporting rule. The authors are also grateful to Roland Kaminski for providing gringo without simplifications.

References

Abseher, M., Gebser, M., Musliu, N., Schaub, T. and Woltran, S. 2016. Shift design with answer set programming. Fundamenta Informaticae 147, 1, 125.CrossRefGoogle Scholar
Alviano, M. and Dodaro, C. 2016. Anytime answer set optimization via unsatisfiable core shrinking. TPLP 16, 5–6, 533551.Google Scholar
Alviano, M., Dodaro, C., Leone, N. and Ricca, F. 2015. Advances in WASP. In LPNMR. Lecture Notes in Computer Science, vol. 9345. Springer, Berlin, 4054.Google Scholar
Alviano, M., Dodaro, C. and Maratea, M. 2017. An advanced answer set programming encoding for nurse scheduling. In AI*IA. Lecture Notes in Computer Science, vol. 10640. Springer, Berlin, 468482.Google Scholar
Aschinger, M., Drescher, C., Friedrich, G., Gottlob, G., Jeavons, P., Ryabokon, A. and Thorstensen, E. 2011. Optimization methods for the partner units problem. In CPAIOR. Lecture Notes in Computer Science, vol. 6697. Springer, Berlin, 419.Google Scholar
Balduccini, M. and Gelfond, M. 2003. Logic programs with consistency-restoring rules. In AAAI Spring Symposium, AAAI, 918.Google Scholar
Balduccini, M., Gelfond, M., Watson, R. and Nogueira, M. 2001. The USA-advisor: A case study in answer set planning. In LPNMR. Lecture Notes in Computer Science, vol. 2173. Springer, Berlin, 439442.Google Scholar
Baral, C. 2010. Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge, UK.Google Scholar
Brain, M. and De Vos, M. 2005. Debugging logic programs under the answer set semantics. In Answer Set Programming. CEUR Workshop Proceedings, vol. 142. CEUR-WS.org.Google Scholar
Brain, M., Gebser, M., Schaub, T., Tompits, H. andWoltran, S. 2007. “That is Illogical Captain!” – The debugging support tool spock for answer-set programs: System description. In SEA, 7185.Google Scholar
Brewka, G., Eiter, T. and Truszczynski, M. 2011. Answer set programming at a glance. Communications of the ACM 54, 12, 92103.CrossRefGoogle Scholar
Busoniu, P., Oetsch, J., Pührer, J., Skocovsky, P. and Tompits, H. 2013. SeaLion: An eclipse-based IDE for answer-set programming with advanced debugging support. TPLP 13, 4–5, 657673.Google Scholar
Calimeri, F., Gebser, M., Maratea, M. and Ricca, F. 2016. Design and results of the fifth answer set programming competition. Artificial Intelligence 231, 151181.CrossRefGoogle Scholar
Calimeri, F., Ianni, G. and Ricca, F. 2014. The third open answer set programming competition. TPLP 14, 1, 117135.Google Scholar
Dasseville, I. and Janssens, G. 2015. A web-based IDE for IDP. CoRR abs/1511.00920.Google Scholar
Dodaro, C., Gasteiger, P., Leone, N., Musitsch, B., Ricca, F. and Schekotihin, K. 2016. Combining answer set programming and domain heuristics for solving hard industrial problems (application paper). TPLP 16, 5–6, 653669.Google Scholar
Dodaro, C., Gasteiger, P., Musitsch, B., Ricca, F. and Shchekotykhin, K. M. 2015. Interactive debugging of non-ground ASP programs. In LPNMR. Lecture Notes in Computer Science, vol. 9345. Springer, Berlin, 279293.Google Scholar
Dodaro, C., Leone, N., Nardi, B. and Ricca, F. 2015. Allotment problem in travel industry: A solution based on ASP. In RR. Lecture Notes in Computer Science, vol. 9209. Springer, Berlin, 7792.Google Scholar
Eiter, T., Gottlob, G. and Mannila, H. 1997. Disjunctive datalog. ACM Transactions on Database Systems 22, 3, 364418.CrossRefGoogle Scholar
Erdem, E., Gelfond, M. and Leone, N. 2016. Applications of answer set programming. AI Magazine 37, 3, 5368.CrossRefGoogle Scholar
Erdem, E. and Öztok, U. 2015. Generating explanations for biomedical queries. TPLP 15, 1, 3578.Google Scholar
Febbraro, O., Leone, N., Reale, K. and Ricca, F. 2011. Unit testing in ASPIDE. In INAP/WLP. Lecture Notes in Computer Science, vol. 7773. Springer, Berlin, 345364.Google Scholar
Febbraro, O., Reale, K. and Ricca, F. 2011. ASPIDE: Integrated development environment for answer set programming. In LPNMR. Lecture Notes in Computer Science, vol. 6645. Springer, Berlin, 317330.Google Scholar
Fraser, S., Beck, K. L., Caputo, B., Mackinnon, T., Newkirk, J. and Poole, C. 2003. Test driven development (TDD). In XP. Lecture Notes in Computer Science, vol. 2675. Springer, Berlin, 459462.Google Scholar
Gavanelli, M., Nonato, M. and Peano, A. 2015. An ASP approach for the valves positioning optimization in a water distribution system. Journal of Logic and Computation 25, 6, 13511369.CrossRefGoogle Scholar
Gebser, M., Kaminski, R., Kaufmann, B. and Schaub, T. 2012. Answer Set Solving in Practice. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers, San Rafael.Google Scholar
Gebser, M., Kaminski, R., König, A. and Schaub, T. 2011. Advances in gringo series 3. In LPNMR. Lecture Notes in Computer Science, vol. 6645. Springer, Berlin, 345351.Google Scholar
Gebser, M., Maratea, M. and Ricca, F. 2015. The design of the sixth answer set programming competition – Report. In LPNMR. Lecture Notes in Computer Science, vol. 9345. Springer, Berlin, 531544.Google Scholar
Gebser, M., Maratea, M. and Ricca, F. 2016. What’s hot in the answer set programming competition. In AAAI. AAAI Press, Palo Alto, CA, USA, 43274329.Google Scholar
Gebser, M., Pührer, J., Schaub, T. and Tompits, H. 2008. A meta-programming technique for debugging answer-set programs. In AAAI. AAAI Press, Palo Alto, PA, USA, 448453.Google Scholar
Gebser, M., Schaub, T., Thiele, S. and Veber, P. 2011. Detecting inconsistencies in large biological networks with answer set programming. TPLP 11, 2–3, 323360.Google Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 3/4, 365386.CrossRefGoogle Scholar
Grasso, G., Iiritano, S., Leone, N. and Ricca, F. 2009. Some DLV applications for knowledge management. In LPNMR. Lecture Notes in Computer Science, vol. 5753. Springer, Berlin, 591597.Google Scholar
Grasso, G., Leone, N., Manna, M. and Ricca, F. 2011. ASP at work: Spin-off and applications of the DLV system. In Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning. Lecture Notes in Computer Science, vol. 6565. Springer, Berlin, 432451.CrossRefGoogle Scholar
Junker, U. 2004. QUICKXPLAIN: Preferred explanations and relaxations for over-constrained problems. In AAAI. AAAI Press, Palo Alto, CA, 167172.Google Scholar
Koponen, L., Oikarinen, E., Janhunen, T. and Säilä, L. 2015. Optimizing phylogenetic supertrees using answer set programming. TPLP 15, 4–5, 604619.Google Scholar
Li, T., De Vos, M., Padget, J., Satoh, K. and Balke, T. 2015. Debugging ASP using ILP. In ICLP (Technical Communications). CEUR Workshop Proceedings, vol. 1433. CEUR-WS.org.Google Scholar
Lierler, Y., Maratea, M. and Ricca, F. 2016. Systems, engineering environments, and competitions. AI Magazine 37, 3, 4552.CrossRefGoogle Scholar
Mikitiuk, A., Moseley, E. and Truszczynski, M. 2007. Towards debugging of answer-set programs in the language PSpb. In IC-AI. CSREA Press, Athens, GA, USA, 635640.Google Scholar
Nielsen, J. and Landauer, T. K. 1993. A mathematical model of the finding of usability problems. In INTERCHI. ACM, New York, NY, USA, 206213.Google Scholar
Oetsch, J., Pührer, J. and Tompits, H. 2010. Catching the ouroboros: On debugging nonground answer-set programs. TPLP 10, 4–6, 513529.Google Scholar
Oetsch, J., Pührer, J. and Tompits, H. 2011. Stepping through an answer-set program. In LPNMR. Lecture Notes in Computer Science, vol. 6645. Springer, Berlin, 134147.Google Scholar
Polleres, A., Frühstück, M., Schenner, G. and Friedrich, G. 2013. Debugging nonground ASP programs with choice rules, cardinality and weight constraints. In LPNMR. Lecture Notes in Computer Science, vol. 8148. Springer, Berlin, 452464.Google Scholar
Pontelli, E., Son, T. C. and El-Khatib, O. 2009. Justifications for logic programs under answer set semantics. TPLP 9, 1, 156.Google Scholar
Schulz, C., Satoh, K. and Toni, F. 2015. Characterising and explaining inconsistency in logic programs. In LPNMR. Lecture Notes in Computer Science, vol. 9345. Springer, Berlin, 467479.Google Scholar
Schulz, C. and Toni, F. 2016. Justifying answer sets using argumentation. TPLP 16, 1, 59110.Google Scholar
Shchekotykhin, K. M. 2015. Interactive query-based debugging of ASP programs. In AAAI. AAAI Press, Palo Alto, CA, USA, 15971603.Google Scholar
Silva, J. P. M. and Sakallah, K. A. 1999. GRASP: A search algorithm for propositional satisfiability. IEEE Transactions on Computers 48, 5, 506521.CrossRefGoogle Scholar
Simons, P., Niemelä, I. and Soininen, T. 2002. Extending and implementing the stable model semantics. Artificial Intelligence 138, 1–2, 181234.CrossRefGoogle Scholar
Syrjänen, T. 2006. Debugging inconsistent Answer Set Programs. In NMR, 7784.Google Scholar