Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison

  • Tomi Janhunen
  • Ilkka Niemelä
  • Johannes Oetsch
  • Jörg Pührer
  • Hans Tompits
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6645)

Abstract

Answer-set programming (ASP) is an established paradigm for declarative problem solving, yet comparably little work on testing of answer-set programs has been done so far. In a recent paper, foundations for structure-based testing of answer-set programs building on a number of coverage notions have been proposed. In this paper, we develop a framework for testing answer-set programs based on this work and study how good the structure-based approach to test input generation is compared to random test input generation. The results indicate that random testing is quite ineffective for some benchmarks, while structure-based techniques catch faults with a high rate more consistently also in these cases.

Keywords

answer-set programming structure-based testing random testing 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Janhunen, T., Niemelä, I., Oetsch, J., Pührer, J., Tompits, H.: On testing answer-set programs. In: Proc. ECAI 2010, pp. 951–956. IOS Press, Amsterdam (2010)Google Scholar
  2. 2.
    Hamlet, R.: Random testing. In: Encyclopedia of Software Engineering, pp. 970–978. Wiley, Chichester (1994)Google Scholar
  3. 3.
    Denecker, M., Vennekens, J., Bond, S., Gebser, M., Truszczynski, 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.
    DeMillo, R.A., Lipton, R.J., Sayward, F.G.: Hints on test data selection help for the practicing programmer. IEEE Computer 11(4), 34–41 (1978)CrossRefGoogle Scholar
  5. 5.
    Gebser, M., Schaub, T., Thiele, S.: Gringo: A new grounder for answer set programming. In: Baral, C., Brewka, G., Schlipf, J. (eds.) LPNMR 2007. LNCS (LNAI), vol. 4483, pp. 266–271. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Gebser, M., Kaminski, R., Ostrowski, M., Schaub, T., Thiele, S.: On the input language of ASP grounder gringo. In: Erdem, E., Lin, F., Schaub, T. (eds.) LPNMR 2009. LNCS, vol. 5753, pp. 502–508. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  7. 7.
    Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: Proc. 5th Logic Programming Symposium, pp. 1070–1080. MIT Press, Cambridge (1988)Google Scholar
  8. 8.
    Janhunen, T., Oikarinen, E.: LPEQ and DLPEQ – translators for automated equivalence testing of logic programs. In: Lifschitz, V., Niemelä, I. (eds.) LPNMR 2004. LNCS (LNAI), vol. 2923, pp. 336–340. Springer, Heidelberg (2003)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Tomi Janhunen
    • 1
  • Ilkka Niemelä
    • 1
  • Johannes Oetsch
    • 2
  • Jörg Pührer
    • 2
  • Hans Tompits
    • 2
  1. 1.Department of Information and Computer ScienceAalto UniversityAaltoFinland
  2. 2.Institut für Informationssysteme 184/3Technische Universität WienViennaAustria

Personalised recommendations