Debugging Non-ground ASP Programs with Choice Rules, Cardinality and Weight Constraints

  • Axel Polleres
  • Melanie Frühstück
  • Gottfried Schenner
  • Gerhard Friedrich
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8148)


When deploying Answer Set Programming (ASP) in an industrial context, for instance for (re-)configuration [5], knowledge engineers need debugging support on non-ground programs. Current approaches to ASP debugging, however, do not cover extended modeling features of ASP, such as choice rules, conditional literals, cardinality and weight constraints [13]. To this end, we encode non-ground ASP programs using extended modeling features into normal logic progams; this encoding extends existing encodings for the case of ground programs [4,10,11] to the non-ground case. We subsequently deploy this translation on top of an existing ASP debugging approach for non-ground normal logic programs [14]. We have implemented and tested the approach and provide evaluation results.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Brain, M., De Vos, M.: Debugging logic programs under the answer set semantics. In: 3rd International Workshop on Answer Set Programming, ASP 2005. CEUR Workshop Proceedings, pp. 141–152 (2005)Google Scholar
  2. 2.
    Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: A theoretical framework for the declarative debugging of datalog programs. In: Schewe, K.-D., Thalheim, B. (eds.) SDKB 2008. LNCS, vol. 4925, pp. 143–159. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  3. 3.
    Denecker, M., Vennekens, J., Bond, S., Gebser, M., Truszczyński, M.: The second answer set programming competition. In: Erdem, E., Lin, F., Schaub, T. (eds.) LPNMR 2009. LNCS, vol. 5753, pp. 637–654. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  4. 4.
    Ferraris, P., Lifschitz, V.: Weight constraints as nested expressions. Theory Pract. Log. Program. 5(1-2), 45–74 (2005)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Friedrich, G., Ryabokon, A., Falkner, A.A., Haselböck, A., Schenner, G., Schreiner, H.: (Re)configuration using Answer Set Programming. In: IJCAI 2011 Workshop on Configuration, pp. 17–25 (2011)Google Scholar
  6. 6.
    Frühstück, M., Pührer, J., Friedrich, G.: Debugging answer-set programs with Ouroboros – extending the SeaLion plugin. In: Cabalar, P., Son, T.C. (eds.) LPNMR 2013. LNCS (LNAI), vol. 8148, pp. 323–328. Springer, Heidelberg (2013)Google Scholar
  7. 7.
    Gebser, M., Kaminski, R., Kaufmann, B., Ostrowski, M., Schaub, T., Thiele, S.: A user’s guide to gringo, clasp, clingo, and iclingo (2010)Google Scholar
  8. 8.
    Gebser, M., Kaufmann, B., Kaminski, R., Ostrowski, M., Schaub, T., Schneider, M.: Potassco: The potsdam answer set solving collection. AI Commun. 24(2), 107–124 (2011)MathSciNetMATHGoogle Scholar
  9. 9.
    Gebser, M., Pührer, J., Schaub, T., Tompits, H.: A meta-programming technique for debugging answer-set programs. In: Proceedings of the 23rd National Conference on Artificial Intelligence, AAAI 2008, vol. 1, pp. 448–453. AAAI Press (2008)Google Scholar
  10. 10.
    Gebser, M., Schaub, T.: Answer set solving in practice (2011), (visited on October 18, 2012)
  11. 11.
    Janhunen, T., Niemelä, I.: Compact translations of non-disjunctive answer set programs to propositional clauses. In: Balduccini, M., Son, T.C. (eds.) Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning. LNCS, vol. 6565, pp. 111–130. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  12. 12.
    Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The dlv system for knowledge representation and reasoning. ACM Trans. Comput. Logic 7(3), 499–562 (2006)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Niemelä, I., Simons, P., Soininen, T.: Stable model semantics of weight constraint rules. In: Gelfond, M., Leone, N., Pfeifer, G. (eds.) LPNMR 1999. LNCS (LNAI), vol. 1730, pp. 317–331. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  14. 14.
    Oetsch, J., Pührer, J., Tompits, H.: Catching the ouroboros: On debugging non-ground answer-set programs. Theory Pract. Log. Program. 10(4-6), 513–529 (2010)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Oetsch, J., Pührer, J., Tompits, H.: The sealion has landed: An IDE for answer-set programming. In: 25th Workshop on Logic Programming, WLP (2011)Google Scholar
  16. 16.
    Pontelli, E., Son, T.C., Elkhatib, O.: Justifications for logic programs under answer set semantics. Theory Pract. Log. Program. 9(1), 1–56 (2009)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Syrjänen, T.: Cardinality constraint programs. In: Alferes, J.J., Leite, J. (eds.) JELIA 2004. LNCS (LNAI), vol. 3229, pp. 187–199. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  18. 18.
    Syrjänen, T.: Debugging inconsistent answer set programs. In: Proc. NMR, vol. 6, pp. 77–83 (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Axel Polleres
    • 1
  • Melanie Frühstück
    • 1
  • Gottfried Schenner
    • 1
  • Gerhard Friedrich
    • 2
  1. 1.Siemens AG ÖsterreichViennaAustria
  2. 2.Alpen-Adria UniversitätKlagenfurtAustria

Personalised recommendations