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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
- 4.
Initially named algorithmic debugging by Shapiro [21].
References
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)
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
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)
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
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)
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)
Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. Softw. Eng. 37(5), 649–678 (2011)
Krings, S.: Code coverage analysis for prolog. Bachelor’s thesis, Heinrich-Heine-University, Duesseldorf, Germany (2010)
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
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)
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)
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)
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)
Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1984). https://doi.org/10.1007/978-3-642-96826-6
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
Offutt, A.J., Pan, J.: Automatically detecting equivalent mutants and infeasible paths. Softw. Testing Verif. Reliab. 7(3), 165–192 (1997)
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)
Papadimitriou, C.H.: A note the expressive power of prolog. Bull. EATCS 26(21–23), 61 (1985)
Sangwan, R.S., LaPlante, P.A.L.: Test-driven development in large projects. IT Prof. 8(5), 25–29 (2006)
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)
Shapiro, E.Y.: Algorithmic Program Debugging. MIT Press, Cambridge (1983)
SICS, Kista, Sweden. SICStus Prolog User’s Manual. http://www.sics.se/isl/sicstuswww/site/documentation.html
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)
Wielemaker, J., Schrijvers, T., Triska, M., Lager, T.: SWI-prolog. Theory Pract. Logic Program. 12(1–2), 67–96 (2012)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
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)