Skip to main content

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

  • Conference paper
Logic Programming and Nonmonotonic Reasoning (LPNMR 2011)

Part of the book series: Lecture Notes in Computer Science ((LNAI,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.

This work was partially supported by the Austrian Science Fund (FWF) under project P21698 and the Academy of Finland under project 122399.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. Hamlet, R.: Random testing. In: Encyclopedia of Software Engineering, pp. 970–978. Wiley, Chichester (1994)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Janhunen, T., Niemelä, I., Oetsch, J., Pührer, J., Tompits, H. (2011). Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison. In: Delgrande, J.P., Faber, W. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2011. Lecture Notes in Computer Science(), vol 6645. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-20895-9_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-20895-9_26

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-20894-2

  • Online ISBN: 978-3-642-20895-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics