Applying Mutation Testing in Prolog Programs

  • Juliano R. Toaldo UFPR
  • Silvia R. Vergilio UFPR

Resumo


Several testing criteria and tools have been proposed lately, with the goal of selecting and evaluating test data sets. However, most works focus only procedural and object-oriented programs and little has been said about logic programming languages, such as Prolog. Some works address the test of Prolog programs however, do not introduce a testing criterion and not offer coverage testing metrics. This work investigates the application of the Mutation Analysis criterion for testing Prolog programs. In experiments of literature, this criterion has been considered one of the most efficacious. A set of mutation operators for this language is proposed, based on common mistakes made by the programmers using this paradigm. A tool, named MutProlog, is described. This tool supports the proposed operators and eases the development of Prolog programs. Results from an experiment, using MutProlog, show the applicability of the proposed operators and allow comparison with structural criteria.

Referências

Baldwin, D. and Sayward, F. (1979). Heuristics for Determining Equivalence of Program Mutations. CT, Res.Rep. 276, Department of Computer Science - Yale University, New Haven.

Bergadano, F. and Gunetti, D. (1996). Inductive Logic Programming: From Machine Learning to Software Engineering. The MIT Press.

Boeck, P. and Charlier, B. (1990). Static type analysis of prolog procedures for ensuring correctness. In International Workshop PLILP, pages 223–237. Spring-Verlag, Lectures Notes in Computer Science, 456.

Choquet, N. (1986). Test data generation using a prolog with constraints. In Proc. of the Workshop on Software Testing, pages 132–141. Computer Science Press, Banff - Canada.

Craft, W. (1989). Detecting Equivalents Mutants Using Compiler Optimization. Master Thesis, Department of Computer Science, Clemson University, Clemson-SC.

De Millo, R., Gwind, D., and King, K. (1988). An extented overview of the mothra software testing environment. In Proc. of the Second Workshop on Software Testing, Verification and Analysis, pages 142–151. Computer Science Press, Banff - Canada.

De Millo, R., Lipton, R., and Sayward, F. (1978). Hints on test data selection: Help for the practicing programmer. IEEE Computer, Vol. C-11:34–41.

Delamaro, M. E. and et al (1996). Integration testing using interface mutation. In VII International Symposium of Software Reliability Engineering (ISSRE), pages 112–121. IEEE Computer Society Press, New York, NY.

Delamaro, M. E. and Maldonado, J. (1996). A tool for the assesment fo test adequacy for c programs. In Proceedings of the Conference on Performability in Computing Systems, pages 79–95. East Brunswick, New Jersey, USA.

Denney, R. (1991). Test case generation form prolog-based specifications. IEEE Software, pages 49–57.

Emer, M. and Vergilio, S. (2003). Selection and evaluation of test data sets based on genetic programming. Software Quality Journal, pages 167–186.

Frankl, F. and Weyuker, E. (1986). Data flow testing in the presence of unexecutable paths. In Proceedings of the Workshop on Software Testing, pages 4–13. Computer Science Press, Banff - Canada.

Gorlick, M., Kesselman, C., Marotta, D., and Parker, S. (1990). Mockingbird: A logical methodology for testing. Journal of Logic Programming, (8):95–119.

Hoffman, D. and Strooper, P. (1991). Automated module testing in prolog. iEEE Transactions on Software Engineering, 17(9):934–943.

Luo, G., Sarikaya, B., and Boyer, M. (1992). Control-flow based testing of prolog programs. pages 104–113.

Mathur, A. and Wong, W. (1994). An empirical comparison of data flow and mutation based test adequacy criteria. The Journal of Software Testing, Verification an Reliability, Vol. 4(1):9–31.

Moura, R. S. T. and Vergilio, S. R. (2000). Definição de operadores de mutação para o teste de programas prolog. II Workshop de Testes e Tolerância a Falhas, 1:58–63.

Pereira, L. (1986). Rational debugging in logic programming. In Third International Conference on Logic Programming, pages 203–210. Lectures Notes on Computer Science.

Plumer, L. (1990). Termination proofs for logic programs. In Lectures Notes in Artificial Intelligence. Spring-Verlag.

Rapps, S. and Weyuker, E. (1985). Selecting software test data using data flow information. IEEE Transactions on Software Engineering, SE-11(4):367–375.

Wong, W. (1993). On Mutation and Data Flow. PhD Thesis, Department of Computer Science, Purdue University, West Lafayette-IN, USA.
Publicado
29/05/2006
TOALDO, Juliano R.; VERGILIO, Silvia R.. Applying Mutation Testing in Prolog Programs. In: WORKSHOP DE TESTES E TOLERÂNCIA A FALHAS (WTF), 7. , 2006, Curitiba/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2006 . p. 1-12. ISSN 2595-2684. DOI: https://doi.org/10.5753/wtf.2006.23347.