Goal-oriented test data generation for pointer programs

Automatic test data generation leads to the identification of input values on which a selected path or a selected branch is executed within a program (path-oriented vs. goal-oriented methods). In both cases, several approaches based on constraint solving exist, but in the presence of pointer variables only path-oriented methods have been proposed. Pointers are responsible for the existence of conditional aliasing problems that usually provoke the failure of the goal-oriented test data generation process. In this paper, we propose an overall constraint-based method that exploits the results of an intraprocedural points-to analysis and provides two specific constraint combinators for automatically generating goal-oriented test data. This approach correctly handles multi-levels stack-directed pointers that are mainly used in C programs. The method has been fully implemented in the test data generation tool INKA and first experiences in applying it to a variety of existing programs are presented.

[1]  Laurie J. Hendren,et al.  Putting pointer analysis to work , 1998, POPL '98.

[2]  Bruno Marre,et al.  On-the-fly generation of k-path tests for C functions , 2004 .

[3]  Arnaud Gotlieb,et al.  Automatic test data generation using constraint solving techniques , 1998, ISSTA '98.

[4]  Arnaud Gotlieb,et al.  Symbolic execution of floating-point computations: Research Articles , 2006 .

[5]  Dinakar Dhurjati,et al.  Ensuring code safety without runtime checks for real-time control systems , 2002, CASES '02.

[6]  Bogdan Korel,et al.  Automated Software Test Data Generation , 1990, IEEE Trans. Software Eng..

[7]  A. Jefferson Offutt,et al.  Constraint-Based Automatic Test Data Generation , 1991, IEEE Trans. Software Eng..

[8]  Chidchanok Lursinsap,et al.  An address mapping approach for test data generation of dynamic linked structures , 2005, Inf. Softw. Technol..

[9]  Laurie J. Hendren,et al.  Extended SSA Numbering: Introducing SSA Properties to Language with Multi-level Pointers , 1998, CC.

[10]  David W. Binkley,et al.  Application of the pointer state subgraph to static program slicing , 1996, J. Syst. Softw..

[11]  Koushik Sen,et al.  CUTE: a concolic unit testing engine for C , 2005, ESEC/FSE-13.

[12]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1987, TOPL.

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

[14]  Mats Carlsson,et al.  An Open-Ended Finite Domain Constraint Solver , 1997, PLILP.

[15]  Laurie J. Hendren,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994, PLDI '94.

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

[17]  Arnaud Gotlieb,et al.  INKA: TEN YEARS AFTER THE FIRST IDEAS , 2006 .

[18]  A. Jefferson Offutt,et al.  Experimental results from an automatic test case generator , 1993, TSEM.

[19]  A. Jefferson Offutt,et al.  The Dynamic Domain Reduction Procedure for Test Data Generation: Design and Algorithms , 1994 .

[20]  Hanspeter Mössenböck,et al.  Single-pass generation of static single-assignment form for structured languages , 1994, TOPL.

[21]  Ron Cytron,et al.  Efficient accommodation of may-alias information in SSA form , 1993, PLDI '93.

[22]  Neelam Gupta,et al.  Generating test data for functions with pointer inputs , 2002, Proceedings 17th IEEE International Conference on Automated Software Engineering,.

[23]  Yves Deville,et al.  Consistency techniques for interprocedural test data generation , 2003, ESEC/FSE-11.

[24]  Susan Horwitz,et al.  Using static single assignment form to improve flow-insensitive pointer analysis , 1998, PLDI '98.

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

[26]  Marvin V. Zelkowitz,et al.  Programming Languages: Design and Implementation , 1975 .

[27]  Benjamin Livshits,et al.  Tracking pointers with path and context sensitivity for bug detection in C programs , 2003, ESEC/FSE-11.

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

[29]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[30]  Arnaud Gotlieb,et al.  Automated metamorphic testing , 2003, Proceedings 27th Annual International Computer Software and Applications Conference. COMPAC 2003.

[31]  Elaine J. Weyuker,et al.  Data flow-based test adequacy analysis for languages with pointers , 1991, TAV4.

[32]  Tsong Yueh Chen,et al.  Fault-based testing in the absence of an oracle , 2001, 25th Annual International Computer Software and Applications Conference. COMPSAC 2001.

[33]  Arnaud Gotlieb,et al.  Symbolic execution of floating‐point computations , 2006, Softw. Test. Verification Reliab..