Stepwise debugging of answer-set programs
Theory and Practice of Logic Programming
https://doi.org/10.1017/S1471068417000217Abstract
We introduce a stepping methodology for answer-set programming (ASP) that allows for debugging answer-set programs and is based on the stepwise application of rules. Similar to debugging in imperative languages, where the behaviour of a program is observed during a step-by-step execution, stepping for ASP allows for observing the effects that rule applications have in the computation of an answer set. While the approach is inspired from debugging in imperative programming, it is conceptually different to stepping in other paradigms due to non-determinism and declarativity that are inherent to ASP. In particular, unlike statements in an imperative program that are executed following a strict control flow, there is no predetermined order in which to consider rules in ASP during a computation. In our approach, the user is free to decide which rule to consider active in the next step following his or her intuition. This way, one can focus on interesting parts of the debugging search spa...
References (58)
- Alviano, M., Dodaro, C., Leone, N., and Ricca, F. 2015. Advances in WASP. In Logic Programming and Nonmonotonic Reasoning -13th International Conference, LPNMR 2015, Lexington, KY, USA, Sept. 27-30, 2015. Proceedings, F. Calimeri, G. Ianni, and M. Truszczyński, Eds. LNCS, vol. 9345. Springer, 40-54.
- Ben-Eliyahu, R. and Dechter, R. 1994. Propositional semantics for disjunctive logic programs. Annals of Mathematics and Artificial Intelligence 12, 1-2, 53-87.
- Brain, M., Cliffe, O., and De Vos, M. 2009. A pragmatic programmer's guide to answer set programming. In Proceedings of the 2nd International Workshop on Software Engineering for Answer-Set Programming (SEA'09), Potsdam, Germany, M. De Vos and T. Schaub, Eds. 49-63.
- Brain, M. and De Vos, M. 2005. Debugging logic programs under the answer set semantics. In Proceedings of the 3rd International Workshop on Answer Set Program- ming (ASP'05), Advances in Theory and Implementation, Bath, UK, Sept. 27-29, 2005, M. De Vos and A. Provetti, Eds. CEUR Workshop Proceedings, vol. 142. CEUR-WS.org.
- Brain, M., Gebser, M., Puehrer, J., Schaub, T., Tompits, H., and Woltran, S. 2007. That is illogical Captain! The debugging support tool spock for answer-set pro- grams -System description. In Proceeding of the 1st International Workshop on Soft- ware Engineering for Answer Set Programming (SEA'07), Tempe, AZ, USA, May 14, 2007, M. De Vos and T. Schaub, Eds. 71-85.
- Brain, M., Gebser, M., Pührer, J., Schaub, T., Tompits, H., and Woltran, S. 2007. Debugging ASP programs by means of ASP. In Proceedings of the 9th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'07), Tempe, AZ, USA, May 15-17, 2007, C. Baral, G. Brewka, and J. S. Schlipf, Eds. LNCS, vol. 4483. Springer, 31-43.
- Brochenin, R., Lierler, Y., and Maratea, M. 2014. Abstract disjunctive answer set solvers. In Proceedings of the 21st European Conference on Artificial Intelligence (ECAI'14), Prague, Czech Republic, Aug. 18-22, 2014, T. Schaub, G. Friedrich, and B. O'Sullivan, Eds. Frontiers in Artificial Intelligence and Applications, vol. 263. IOS Press, 165-170.
- Busoniu, P.-A., Oetsch, J., Pührer, J., Skočovský, P., and Tompits, H. 2013. Sealion: An eclipse-based IDE for answer-set programming with advanced debugging support. Theory and Practice of Logic Programming 13, 4-5, 657-673.
- Caballero, R., García-Ruiz, Y., and Sáenz-Pérez, F. 2008. A theoretical framework for the declarative debugging of datalog programs. In Revised Selected Papers of the 3rd International Workshop on Semantics in Data and Knowledge Bases (SDKB'08), Nantes, France, Mar. 29, 2008, K.-D. Schewe and B. Thalheim, Eds. LNCS, vol. 4925. Springer, 143-159.
- Cliffe, O., De Vos, M., Brain, M., and Padget, J. A. 2008. ASPVIZ: Declarative visualisation and animation using answer set programming. In Proceedings of the 24th International Conference on Logic Programming (ICLP'08), Udine, Italy, Dec. 9-13, 2008, M. G. de la Banda and E. Pontelli, Eds. LNCS, vol. 5366. Springer, 724-728.
- Denecker, M. 2000. Extending classical logic with inductive definitions. In Proceedings of the 1st International Conference on Computational Logic (CL'10), London, UK, July 24-28, 2000, J. W. Lloyd, V. Dahl, U. Furbach, M. Kerber, K. Lau, C. Palamidessi, L. M. Pereira, Y. Sagiv, and P. J. Stuckey, Eds. LNCS, vol. 1861. Springer, 703-717.
- Denecker, M. and Ternovska, E. 2008. A logic of nonmonotone inductive definitions. ACM Transactions on Computational Logic 9, 2.
- Denecker, M., Vennekens, J., Bond, S., Gebser, M., and Truszczyński, M. 2009. The second answer set programming competition. In Proceedings of the 10th Interna- tional Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'09), Potsdam, Germany, Sept. 14-18, 2009, E. Erdem, F. Lin, and T. Schaub, Eds. LNCS, vol. 5753. Springer, 637-654.
- Dodaro, C., Gasteiger, P., Musitsch, B., Ricca, F., and Shchekotykhin, K. M. 2015. Interactive debugging of non-ground ASP programs. In Logic Programming and Nonmonotonic Reasoning -13th International Conference, LPNMR 2015, Lexington, KY, USA, Sept. 27-30, 2015. Proceedings, F. Calimeri, G. Ianni, and M. Truszczyński, Eds. LNCS, vol. 9345. Springer, 279-293.
- Eiter, T., Ianni, G., Schindlauer, R., and Tompits, H. 2005. A uniform integration of higher-order reasoning and external evaluations in answer-set programming. In Pro- ceedings of the 19th International Joint Conference on Artificial Intelligence (IJCAI'05), Edinburgh, Scotland, UK, July 30-Aug. 5, 2005, L. P. Kaelbling and A. Saffiotti, Eds. Professional Book Center, 90-96.
- Faber, W., Leone, N., and Pfeifer, G. 2004. Recursive aggregates in disjunctive logic programs: Semantics and complexity. In Proceedings of the 9th European Conference on Logics in Artificial Intelligence (JELIA'04). LNCS, vol. 3229. Springer, 200-212.
- Faber, W., Pfeifer, G., and Leone, N. 2011. Semantics and complexity of recursive aggregates in answer set programming. Artificial Intelligence 175, 1, 278-298.
- Ferraris, P. 2011. Logic programs with propositional connectives and aggregates. ACM Transactions on Computational Logic 12, 4, 25.
- Frühstück, M., Pührer, J., and Friedrich, G. 2013. Debugging answer-set programs with Ouroboros -Extending the SeaLion plugin. In Proceedings of the 12th Interna- tional Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'13), Corunna, Spain, Sept. 15-19, 2013, P. Cabalar and T. C. Son, Eds. LNCS, vol. 8148. Springer, 323-328.
- Gebser, M., Kaminski, R., König, A., and Schaub, T. 2011. Advances in gringo series 3. In Proceedings of the 11th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'11), Vancouver, Canada, May 16-19, 2011, J. P. Delgrande and W. Faber, Eds. LNCS, vol. 6645. Springer, 345-351.
- Gebser, M., Kaufmann, B., and Schaub, T. 2012. Conflict-driven answer set solving: From theory to practice. Artificial Intelligence 187-188, 52-89.
- Gebser, M., Lee, J., and Lierler, Y. 2011. On elementary loops of logic programs. Theory and Practice of Logic Programming 11, 6, 953-988.
- Gebser, M., Pührer, J., Schaub, T., and Tompits, H. 2008. A meta-programming technique for debugging answer-set programs. In Proceedings of the 23rd AAAI Con- ference on Artificial Intelligence (AAAI'08), Chicago, IL, USA, July 13-17, 2008, D. Fox and C. P. Gomes, Eds. AAAI Press, 448-453.
- Gebser, M., Pührer, J., Schaub, T., Tompits, H., and Woltran, S. 2009. spock: A debugging support tool for logic programs under the answer-set semantics. In Revised Selected Papers of the 17th International Conference on Applications of Declarative Programming and Knowledge Management (INAP'07) and 21st Workshop on (Con- straint) Logic Programming (WLP'07), D. Seipel, M. Hanus, and A. Wolf, Eds. LNCS, vol. 5437. Springer, 247-252.
- Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunc- tive databases. New Generation Computing 9, 3/4, 365-386.
- Kloimüllner, C., Oetsch, J., Pührer, J., and Tompits, H. 2013. Kara: A system for visualising and visual editing of interpretations for answer-set programs. In Revised Selected Papers of the 19th International Conference on Applications of Declarative Programming and Knowledge Management (INAP'11) and the 25th Workshop on Logic Programming (WLP'11), Vienna, Austria, Sept. 28-30, 2011. LNCS, vol. 7773. Springer, 325-344.
- Lee, J. 2005. A model-theoretic counterpart of loop formulas. In Proceedings of the 19th International Joint Conference on Artificial Intelligence (IJCAI'05), Edinburgh, Scotland, UK, July 30-Aug 5, 2005, L. P. Kaelbling and A. Saffiotti, Eds. Professional Book Center, 503-508.
- Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., and Scar- cello, F. 2006. The DLV system for knowledge representation and reasoning. ACM Transactions on Computational Logic 7, 3, 499-562.
- Li, T., Vos, M. D., Padget, J., Satoh, K., and Balke, T. 2015. Debugging ASP using ILP. In Technical Communications of the 31st International Conference on Logic Programming (ICLP 2015), Cork, Ireland, Aug. 31 -Sept. 4, 2015., M. D. Vos, T. Eiter, Y. Lierler, and F. Toni, Eds. CEUR Workshop Proceedings, vol. 1433. CEUR-WS.org.
- Lierler, Y. 2011. Abstract answer set solvers with backjumping and learning. Theory and Practice of Logic Programming 11, 2-3, 135-169.
- Lierler, Y. and Truszczyński, M. 2016. On abstract modular inference systems and solvers. Artificial Intelligence 236, 65-89.
- Liu, L., Pontelli, E., Son, T. C., and Truszczyński, M. 2010. Logic programs with abstract constraint atoms: The role of computations. Artificial Intelligence 174, 3-4, 295-315.
- Marek, V. W. and Remmel, J. B. 2004. Set constraints in logic programming. In Pro- ceedings of the 7th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'04), Fort Lauderdale, FL, USA, Jan 6-8, 2004, V. Lifschitz and I. Niemelä, Eds. LNCS, vol. 2923. Springer, 167-179.
- Marek, V. W. and Truszczyński, M. 1999. Stable models and an alternative logic pro- gramming paradigm. In In The Logic Programming Paradigm: a 25-Year Perspective, K. R. Apt, V. W. Marek, M. Truszczyński, and D. S. Warren, Eds. Springer, 375-398.
- Marek, V. W. and Truszczyński, M. 2004. Logic programs with abstract constraint atoms. In In Proceedings of the 19th National Conference on Artificial Intelligence (AAAI'04), San Jose, CA, USA, July 25-29, 2004, G. Ferguson and D. McGuinness, Eds. AAAI Press, 86-91.
- Mikitiuk, A., Moseley, E., and Truszczyński, M. 2007. Towards debugging of answer- set programs in the language PSpb. In Proceedings of the 2007 International Conference on Artificial Intelligence (ICAI'07), Volume II, Las Vegas, NV, USA, June 25-28, 2007, H. R. Arabnia, M. Q. Yang, and J. Y. Yang, Eds. CSREA Press, 635-640.
- Niemelä, I. 1999. Logic programs with stable model semantics as a constraint program- ming paradigm. Annals of Mathematics and Artificial Intelligence 25, 3-4, 241-273.
- Nieuwenhuis, R., Oliveras, A., and Tinelli, C. 2006. Solving SAT and SAT mod- ulo theories: From an abstract davis-putnam-logemann-loveland procedure to dpll(T). Journal of the ACM 53, 6, 937-977.
- Oetsch, J., Prischink, M., Pührer, J., Schwengerer, M., and Tompits, H. 2012. On the small-scope hypothesis for testing answer-set programs. In Proceedings of the 13th International Conference on Principles of Knowledge Representation and Reasoning (KR'12), Rome, Italy, June 10-14, 2012, G. Brewka, T. Eiter, and S. A. McIlraith, Eds. AAAI Press.
- Oetsch, J., Pührer, J., and Tompits, H. 2010. Catching the Ouroboros: On debugging non-ground answer-set programs. Theory and Practice of Logic Programming 10, 4-6 (July), 513-529.
- Oetsch, J., Pührer, J., and Tompits, H. 2010. Let's break the rules: Interactive procedural-style debugging of answer-set programs. In Proceedings of the 24th Work- shop on (Constraint) Logic Programming (WLP'10), Cairo, Egypt, Sept. 14-16, 2010, S. Abdennadher, Ed. Technical Report, Faculty of Media Engineering and Technology, German University in Cairo. 77-87.
- Oetsch, J., Pührer, J., and Tompits, H. 2011. Stepping through an answer-set pro- gram. In Proceedings of the 11th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'11), Vancouver, Canada, May 16-19, 2011. LNCS, vol. 6645. Springer, 134-147.
- Oetsch, J., Pührer, J., and Tompits, H. 2012a. An FLP-style answer-set semantics for abstract-constraint programs with disjunctions. In Technical Communications of the 28th International Conference on Logic Programming (ICLP'12), Budapest, Hungary, A. Dovier and V. S. Costa, Eds. LIPIcs, vol. 17. Schloss Dagstuhl -Leibniz-Zentrum fuer Informatik, 222-234.
- Oetsch, J., Pührer, J., and Tompits, H. 2012b. Stepwise debugging of description- logic programs. In Correct Reasoning -Essays on Logic-Based AI in Honour of Vladimir Lifschitz, E. Erdem, J. Lee, Y. Lierler, and D. Pearce, Eds. LNCS, vol. 7265. Springer, 492-508.
- Oetsch, J., Pührer, J., and Tompits, H. 2013. The SeaLion has landed: An IDE for answer-set programming-Preliminary report. In Revised Selected Papers of the 19th International Conference on Applications of Declarative Programming and Knowledge Management (INAP'11) and the 25th Workshop on Logic Programming (WLP'11), Vienna, Austria, Sept. 28-30, 2011. LNCS, vol. 7773. Springer, 305-324.
- Polleres, A., Frühstück, M., Schenner, G., and Friedrich, G. 2013. Debugging non-ground ASP programs with choice rules, cardinality constraints and weight con- straints. In Proceedings of the 12th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'13), Corunna, Spain, Sept. 15-19, 2013, P. Ca- balar and T. C. Son, Eds. LNCS, vol. 8148. Springer, 452-464.
- Pontelli, E., Son, T. C., and El-Khatib, O. 2009. Justifications for logic programs under answer set semantics. Theory and Practice of Logic Programming 9, 1, 1-56.
- Pührer, J. 2007. Master's thesis, Vienna University of Technology, Vienna, Austria.
- Pührer, J. 2014. Stepwise debugging in answer-set programming: Theoretical foun- dations and practical realisation. Ph.D. thesis, Vienna University of Technology, Vi- enna, Austria. http://repositum.tuwien.ac.at/urn:nbn:at:at-ubtuw:1-75281 [On- line; accessed Dec. 14, 2016].
- Redl, C. 2016. The dlvhex system for knowledge representation: recent advances (system description). Theory and Practice of Logic Programming 16, 5-6, 866-883.
- Shapiro, E. Y. 1982. Algorithmic program debugging. Ph.D. thesis, Yale University, New Haven, CT, USA.
- Shchekotykhin, K. M. 2015. Interactive query-based debugging of ASP programs. In Proceedings of the 29th AAAI Conference on Artificial Intelligence (AAAI'15), Austin, TX, USA, Jan. 25-30, 2015, B. Bonet and S. Koenig, Eds. AAAI Press, 1597-1603.
- Simons, P., Niemelä, I., and Soininen, T. 2002. Extending and implementing the stable model semantics. Artificial Intelligence 138, 181-234.
- Smith, A. 2011. Lonsdaleite. https://github.com/rndmcnlly/Lonsdaleite. [Online; accessed Dec. 14, 2016].
- Syrjänen, T. 2006. Debugging inconsistent answer set programs. In Proceedings of the 11th International Workshop on Non-Monotonic Reasoning (NMR'06), Lake District, UK, May 30-June 1, 2006, J. Dix and A. Hunter, Eds. Institut für Informatik, Technische Universität Clausthal, Technical Report, 77-83.
- Truszczyński, M. 2010. Reducts of propositional theories, satisfiability relations, and generalizations of semantics of logic programs. Artificial Intelligence 174, 16-17, 1285- 1306.
- Wittocx, J. 2009. IDPDraw, a tool used for visualizing answer sets. https://dtai.cs. kuleuven.be/software/idpdraw. [Online; accessed Dec. 14, 2016].
- Wittocx, J., Vlaeminck, H., and Denecker, M. 2009. Debugging for model expansion. In Proceedings of the 25th International Conference on Logic Programming (ICLP'09), Pasadena, CA, USA, July 14-17, 2009, P. M. Hill and D. S. Warren, Eds. LNCS, vol. 5649. Springer, 296-311.