Test Data Generation of Bytecode by CLP Partial Evaluation

We employ existing partial evaluation (PE) techniques developed for Constraint Logic Programming (CLP) in order to automatically generate test-case generators for glass-box testing of bytecode. Our approach consists of two independent CLP PE phases. (1) First, the bytecode is transformed into an equivalent (decompiled) CLP program. This is already a well studied transformation which can be done either by using an ad-hoc decompiler or by specialising a bytecode interpreter by means of existing PE techniques. (2) A second PE is performed in order to supervise the generation of test-cases by execution of the CLP decompiled program. Interestingly, we employ control strategies previously defined in the context of CLP PE in order to capture coverage criteria for glass-box testing of bytecode. A unique feature of our approach is that, this second PE phase allows generating not only test-cases but also test-case generators . To the best of our knowledge, this is the first time that (CLP) PE techniques are applied for test-case generation as well as to generate test-case generators.

[1]  Bernard Botella,et al.  A CLP Framework for Computing Structural Test Data , 2000, Computational Logic.

[2]  Herbert Kuchen,et al.  Systematic generation of glass-box test cases for functional logic programs , 2007, PPDP '07.

[3]  Elvira Albert,et al.  Modular Decompilation of Low-Level Code by Partial Evaluation , 2008, 2008 Eighth IEEE International Working Conference on Source Code Analysis and Manipulation.

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

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

[6]  Hong Zhu,et al.  Software unit test coverage and adequacy , 1997, ACM Comput. Surv..

[7]  Elvira Albert,et al.  Cost Analysis of Java Bytecode , 2007, ESOP.

[8]  Yoshihiko Futamura,et al.  Partial Evaluation of Computation Process--An Approach to a Compiler-Compiler , 1999, High. Order Symb. Comput..

[9]  Maurice Bruynooghe,et al.  A general criterion for avoiding infinite unfolding during partial deduction , 2009, New Generation Computing.

[10]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[11]  Bogdan Korel,et al.  The chaining approach for software test data generation , 1996, TSEM.

[12]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

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

[14]  Bernhard Beckert,et al.  Verification of Object-Oriented Software. The KeY Approach - Foreword by K. Rustan M. Leino , 2007, The KeY Approach.

[15]  Jorge A. Navas,et al.  A Flexible, (C)LP-Based Approach to the Analysis of Object-Oriented Programs , 2008, LOPSTR.

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

[17]  Christophe Meudec ATGen: automatic test data generation using constraint logic programming and symbolic execution † , 2001, Softw. Test. Verification Reliab..

[18]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[19]  William E. Howden,et al.  Symbolic Testing and the DISSECT Symbolic Evaluation System , 1977, IEEE Transactions on Software Engineering.

[20]  Peter J. Stuckey,et al.  Programming with Constraints: An Introduction , 1998 .

[21]  Michael Leuschel,et al.  A Compiler Generator for Constraint Logic Programs , 2003, Ershov Memorial Conference.

[22]  Mary Lou Soffa,et al.  Generating test data for branch coverage , 2000, Proceedings ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering.

[23]  Lori A. Clarke,et al.  A System to Generate Test Data and Symbolically Execute Programs , 1976, IEEE Transactions on Software Engineering.

[24]  Manuel V. Hermenegildo,et al.  Efficient Local Unfolding with Ancestor Stacks for Full Prolog , 2004, LOPSTR.

[25]  John P. Gallagher,et al.  Abstract Interpretation of PIC Programs through Logic Programming , 2006, 2006 Sixth IEEE International Workshop on Source Code Analysis and Manipulation.

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