A First Step in the Design of a Formally Verified Constraint-Based Testing Tool: FocalTest

Constraint-based test data generators rely on SMT or constraint solvers to automatically generate test data (e.g., Pex, Sage, Gatel, PathCrawler, Euclide). However, for some test data generation requests corresponding to particular test objectives, these tools may fail to deliver the expected test data because they focus on efficiency rather than soundness and completeness. We adopt an opposite view in the development of FocalTest, a test data generation tool for Focalize programs. The goal of the tool is to generate an MC/DC-compliant set of test data over the precondition of user-defined program properties. The development of such a correct-by-construction test data generator requires 1) to provide a formally verified translation of Focalize programs and properties into constraint systems; 2) to introduce a formally verified constraint solver able to solve those constraint systems. This paper is concerned with the first step only where we formally demonstrate with Coq the soundness of the translation of an intermediate functional language into a constraint system. This objective requires to formally define the operational semantics of the source language that features the manipulation of concrete data types via pattern-matching and function calls, constructions that are mirrored in the constraint language. Although such a semantics-oriented formalization is only a first step of a larger goal which is to provide a formally verified constraint-based testing tool, we argue that it is an important contribution to the building of more robust software testing tools.

[1]  Andreas Podelski Model Checking as Constraint Solving , 2000, SAS.

[2]  Arnaud Gotlieb Euclide: A Constraint-Based Testing Framework for Critical C Programs , 2009, 2009 International Conference on Software Testing Verification and Validation.

[3]  Matt Bishop,et al.  Property-based testing: a new approach to testing for assurance , 1997, SOEN.

[4]  Luís Moniz Pereira,et al.  Computational Logic — CL 2000 , 2000, Lecture Notes in Computer Science.

[5]  Luc Maranget,et al.  Compiling lazy pattern matching , 1992, LFP '92.

[6]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[7]  Brian Nielsen,et al.  Formal Approaches to Software Testing, 4th International Workshop, FATES 2004, Linz, Austria, September 21, 2004, Revised Selected Papers , 2005, FATES.

[8]  Meine van der Meulen,et al.  Correlations between Internal Software Metrics and Software Dependability in a Large Population of Small C/C++ Programs , 2007, The 18th IEEE International Symposium on Software Reliability (ISSRE '07).

[9]  M. Carlier Test automatique de propriétés dans un atelier de développement de logiciels sûrs , 2009 .

[10]  Arnaud Gotlieb,et al.  Improving Constraint-Based Testing with Dynamic Linear Relaxations , 2007, The 18th IEEE International Symposium on Software Reliability (ISSRE '07).

[11]  Achim D. Brucker,et al.  Interactive Testing with HOL-TestGen , 2005, FATES.

[12]  J Hayhurst Kelly,et al.  A Practical Tutorial on Modified Condition/Decision Coverage , 2001 .

[13]  Cormac Flanagan,et al.  Automatic software model checking via constraint logic , 2004, Sci. Comput. Program..

[14]  Elvira Albert,et al.  Test case generation for object-oriented imperative languages in CLP , 2010, Theory Pract. Log. Program..

[15]  Arnaud Gotlieb,et al.  Constraint-Based Test Input Generation for Java Bytecode , 2010, 2010 IEEE 21st International Symposium on Software Reliability Engineering.

[16]  Bruno Marre,et al.  Test sequences generation from LUSTRE descriptions: GATEL , 2000, Proceedings ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering.

[17]  Franz Wotawa,et al.  On the Compilation of Programs into their Equivalent Constraint Representation , 2008, Informatica.

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

[19]  Arnaud Gotlieb,et al.  Constraint Reasoning in FocalTest , 2010, ICSOFT.

[20]  Catherine Dubois,et al.  Functional Testing in the Focal Environment , 2008, TAP.

[21]  François Pessaux,et al.  Trusted Software within Focal , 2008 .