Title :
On Complexity of All-Paths Test Generation: From Practice to Theory
Author :
Kosmatov, Nikolai
Author_Institution :
Software Safety Lab., CEA, Gif-sur-Yvette, France
Abstract :
Automatic structural testing of programs becomes more and more popularin software engineering. Among the most rigorous structural coverage criteria, all-paths coverage requires to generate a set of test cases such that every feasible execution path of the program under test is executed by one test case. This article addresses different aspects of computability and complexity of constraint-based all-paths test generation for C programs from the practitioner´s point of view, and tries to bridge the gap between mathematical theory and practical computation problems arising in this domain. We focus on two particular classes of programs important for practice. We show first that for a class containing the simplest programs with strong restrictions, all-paths test generation in polynomial time is possible. For a wider class of programs in which inputs may beused as array indices (or pointer offsets), all-paths test generation is shown to be NP-hard. Some experimental results illustrating test generation timefor programs of these classes are provided.
Keywords :
C language; computational complexity; data flow analysis; program testing; C programs; NP-hard; all-paths test generation; automatic structural program testing; mathematical theory; polynomial time; program under test; software engineering; Automatic testing; Constraint theory; Costs; Input variables; Laboratories; Polynomials; Software engineering; Software safety; Software testing; Time factors; all-paths test generation; complexity; computability;
Conference_Titel :
Testing: Academic and Industrial Conference - Practice and Research Techniques, 2009. TAIC PART '09.
Conference_Location :
Windsor
Print_ISBN :
978-0-7695-3820-4
DOI :
10.1109/TAICPART.2009.26