Generating Tests from Counterexamples

Dirk Beyer, Adam J. Chlipala, Thomas A. Henzinger, Ranjit Jhala, and Rupak Majumdar

We have extended the software model checker Blast to automatically generate test suites that guarantee full coverage with respect to a given predicate. More precisely, given a C program and a target predicate p, Blast determines the set L of program locations which program execution can reach with p true, and automatically generates a set of test vectors that exhibit the truth of p at all locations in L. We have used Blast to generate test suites and to detect dead code in C programs with up to 30K lines of code. The analysis and test-vector generation is fully automatic (no user intervention) and exact (no false positives).

Proceedings of the 26th Annual International Conference on Software Engineering (ICSE), IEEE Computer Society Press, 2004, pp. 326-335.

Download inofficial, sometimes updated PostScript / PDF document. © 2004 IEEE.