Systematic generation of glass-box test cases for functional logic programs

We employ the narrowing-based execution mechanism of the functional logic programming language Curry in order to automatically generate a system of test cases for glass-box testing of Curry programs. The test cases for a given function are computed by narrowing a call to that function with initially uninstantiated arguments. The generated test cases are produced w.r.t. a selected code-coverage criterion such as control-flow coverage. Besides an adaption of the notion of control-flow coverage to functional (logic) programming, we present a novel coverage criterion for this programming paradigm. A particular difficulty of the adaption is the handling of laziness.

[1]  Koen Claessen,et al.  QuickCheck: a lightweight tool for random testing of Haskell programs , 2000, ICFP.

[2]  Bernd Brassel,et al.  Translating curry to haskell system demo , 2005, WCFLP '05.

[3]  Colin Runciman,et al.  Freja, Hat and Hood - A Comparative Evaluation of Three Systems for Tracing and Debugging Lazy Functional Programs , 2000, IFL.

[4]  John Hughes,et al.  Why Functional Programming Matters , 1989, Comput. J..

[5]  Rafael Caballero,et al.  DDT: a Declarative Debugging Tool for Functional-Logic Languages , 2004, FLOPS.

[6]  Herbert Kuchen,et al.  A symbolic Java virtual machine for test case generation , 2004, IASTED Conf. on Software Engineering.

[7]  Michael Hanus,et al.  Curry: an integrated functional logic language (version 0 , 2003 .

[8]  Rachid Echahed,et al.  A needed narrowing strategy , 2000, JACM.

[9]  Michael Hanus,et al.  Observing Functional Logic Computations , 2004, PADL.

[10]  Michael Hanus,et al.  Overlapping Rules and Logic Variables in Functional Logic Programs , 2006, ICLP.

[11]  Roger S. Pressman,et al.  Software Engineering: A Practitioner's Approach , 1982 .

[12]  Herbert Kuchen,et al.  Constraint Solving for Generating Glass-Box Test Cases , 2004 .

[13]  Wim Vanhoof,et al.  Automatic Generation of Test Inputs for Mercury , 2008, LOPSTR.

[14]  M. Hanus,et al.  Curry: An Integrated Functional Logic Language , 2003 .

[15]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[16]  Germán Vidal,et al.  A semantics for tracing declarative multi-paradigm programs , 2004, PPDP '04.

[17]  Marinus J. Plasmeijer,et al.  Gast: Generic Automated Software Testing , 2002, IFL.

[18]  Roger S. Pressman,et al.  Software engineering (3rd ed.): a practitioner's approach , 1992 .

[19]  Elvira Albert,et al.  Verification of Java Bytecode Using Analysis and Transformation of Logic Programs , 2007, PADL.

[20]  Michael Hanus,et al.  Encapsulating Non-Determinism in Functional Logic Computations , 2004, J. Funct. Log. Program..

[21]  Sebastian Fischer,et al.  A Program Transformation for Tracing Functional Logic Computations , 2006, LOPSTR.