Skip to main content

Measuring Coverage of Prolog Programs Using Mutation Testing

  • Conference paper
  • First Online:
Functional and Constraint Logic Programming (WFLP 2018)

Abstract

Testing is an important aspect in professional software development, both to avoid and identify bugs as well as to increase maintainability. However, increasing the number of tests beyond a reasonable amount hinders development progress. To decide on the completeness of a test suite, many approaches to assert test coverage have been suggested. Yet, frameworks for logic programs remain scarce.

In this paper, we introduce a framework for Prolog programs measuring test coverage using mutations. We elaborate on the main ideas of mutation testing and transfer them to logic programs.To do so, we discuss the usefulness of different mutations in the context of Prolog and empirically evaluate them in a new mutation testing framework on different examples.

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 EPUB and 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

Notes

  1. 1.

    https://github.com/hhu-stups/prolog-mutation-testing.

  2. 2.

    http://www.swi-prolog.org/pldoc/man?section=cover.

  3. 3.

    https://sicstus.sics.se/sicstus/docs/4.3.2/html/sicstus/Coverage-Analysis.html.

  4. 4.

    Initially named algorithmic debugging by Shapiro [21].

References

  1. Ammann, P., Delamaro, M.E., Offutt, J., et al.: Establishing theoretical minimal sets of mutants. In: IEEE International Conference on Software Testing, Verification, and Validation, vol. 7. IEEE Computer Society (2014)

    Google Scholar 

  2. Clark, K.L.: Negation as failure. In: Gallaire, H., Minker, J. (eds.) Logic and Data Bases, pp. 293–322. Springer, Boston (1978). https://doi.org/10.1007/978-1-4684-3384-5_11

    Chapter  Google Scholar 

  3. Coles, H., Laurent, T., Henard, C., Papadakis, M., Ventresque, A.: PIT: a practical mutation testing tool for Java (Demo). In: International Symposium on Software Testing and Analysis, ISSTA 2016, pp. 449–452. ACM (2016)

    Google Scholar 

  4. Denisov, A., Pankevich, S.: Mull it over: mutation testing based on LLVM. In: 2018 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 25–31, April 2018

    Google Scholar 

  5. Deursen, A.V., Moonen, L., Bergh, A., Kok, G.: Refactoring test code. In: International Conference on Extreme Programming and Flexible Processes in Software Engineering, pp. 92–95 (2001)

    Google Scholar 

  6. Grün, B.J., Schuler, D., Zeller, A.: The impact of equivalent mutants. In: IEEE International Workshop on Mutation Analysis, pp. 192–199. IEEE (2009)

    Google Scholar 

  7. Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. Softw. Eng. 37(5), 649–678 (2011)

    Article  Google Scholar 

  8. Krings, S.: Code coverage analysis for prolog. Bachelor’s thesis, Heinrich-Heine-University, Duesseldorf, Germany (2010)

    Google Scholar 

  9. Krings, S., Schmidt, J., Brings, C., Frappier, M., Leuschel, M.: A translation from alloy to B. In: Butler, M., Raschke, A., Hoang, T.S., Reichl, K. (eds.) ABZ 2018. LNCS, vol. 10817, pp. 71–86. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-91271-4_6

    Chapter  Google Scholar 

  10. Körner, P., Krings, S.: plspec - A specification language for prolog data. In: Seipel, D., Hanus, M., Abreu, S. (eds.) Declare 2017, vol. 499, Technical report. University of Würzburg (2017)

    Google Scholar 

  11. Körner, P., Schneider, D., Leuschel, M.: Evaluating interpreter design in prolog. In: Kolloquium Programmiersprachen und Grundlagen der Programmierung KPS, Schriftenreihe des Instituts für Computersprachen (2015)

    Google Scholar 

  12. Le, D., Alipour, M., Gopinath, R., Groce, A.: MuCheck: an extensible tool for mutation testing of haskell programs. In: International Symposium on Software Testing and Analysis, ISSTA (2014)

    Google Scholar 

  13. Le, D., Alipour, M.A., Gopinath, R., Groce, A.: Mutation testing of functional programming languages. Technical report. Oregon State University, School of Software Engineering and Computer Science (2014)

    Google Scholar 

  14. Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1984). https://doi.org/10.1007/978-3-642-96826-6

    Book  MATH  Google Scholar 

  15. Naish, L.: A declarative debugging scheme. J. Funct. Logic Program. 1997(3) (1997). http://danae.uni-muenster.de/lehre/kuchen/JFLP/articles/1997/A97-03/A97-03.html

  16. Offutt, A.J., Pan, J.: Automatically detecting equivalent mutants and infeasible paths. Softw. Testing Verif. Reliab. 7(3), 165–192 (1997)

    Article  Google Scholar 

  17. Offutt, A.J., Rothermel, G., Zapf, C.: An experimental evaluation of selective mutation. In: International Conference on Software Engineering, pp. 100–107. IEEE Computer Society Press (1993)

    Google Scholar 

  18. Papadimitriou, C.H.: A note the expressive power of prolog. Bull. EATCS 26(21–23), 61 (1985)

    Google Scholar 

  19. Sangwan, R.S., LaPlante, P.A.L.: Test-driven development in large projects. IT Prof. 8(5), 25–29 (2006)

    Article  Google Scholar 

  20. Schuler, D., Zeller, A.: Javalanche: efficient mutation testing for Java. In: Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2009, pp. 297–298. ACM (2009)

    Google Scholar 

  21. Shapiro, E.Y.: Algorithmic Program Debugging. MIT Press, Cambridge (1983)

    MATH  Google Scholar 

  22. SICS, Kista, Sweden. SICStus Prolog User’s Manual. http://www.sics.se/isl/sicstuswww/site/documentation.html

  23. Toaldo, J.R., Vergilio, S.R.: Applying mutation testing in prolog programs. In: VII Workshop de Testes e Tolerância a Falhas. Biblioteca Digital Brasileira de Computação (2006)

    Google Scholar 

  24. Wielemaker, J., Schrijvers, T., Triska, M., Lager, T.: SWI-prolog. Theory Pract. Logic Program. 12(1–2), 67–96 (2012)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Joshua Schmidt .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Efremidis, A., Schmidt, J., Krings, S., Körner, P. (2019). Measuring Coverage of Prolog Programs Using Mutation Testing. In: Silva, J. (eds) Functional and Constraint Logic Programming. WFLP 2018. Lecture Notes in Computer Science(), vol 11285. Springer, Cham. https://doi.org/10.1007/978-3-030-16202-3_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-16202-3_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-16201-6

  • Online ISBN: 978-3-030-16202-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics