Automatic Generation of Path Covers Based on the Control Flow Analysis of Computer Programs

Branch testing a program involves generating a set of paths that will cover every arc in the program flowgraph, called a path cover, and finding a set of program inputs that will execute every path in the path cover. This paper presents a generalized algorithm that finds a path cover for a given program flowgraph. The analysis is conducted on a reduced flowgraph, called a ddgraph, and uses graph theoretic principles differently than previous approaches. In particular, the relations of dominance and implication which form two trees of the arcs of the ddgraph are exploited. These relations make it possible to identify a subset of ddgraph arcs, called unconstrained arcs, having the property that a set of paths exercising all the unconstrained arcs also cover all the arcs in the ddgraph. In fact, the algorithm has been designed to cover all the unconstrained arcs of a given ddgraph: the paths are derived one at a time, each path covering at least one as yet uncovered unconstrained arc. The greatest merits of the algorithm are its simplicity and its flexibility. It consists in just visiting recursively in combination the dominator and the implied trees, and is flexible in the sense that it can derive a path cover to satisfy different requirements, according to the strategy adopted for the selection of the unconstrained arc to be covered at each recursive iteration. This feature of the algorithm can be employed to address the problem of infeasible paths, by adopting the most suitable selection strategy for the problem at hand. Embedding of the algorithm into a software analysis and testing tool is recommended. >

[1]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[2]  Antonia Bertolino,et al.  Unconstrained edges and their application to branch analysis and testing of programs , 1993, J. Syst. Softw..

[3]  Robin W. Whitty,et al.  A rigorous approach to structural analysis and metrication of software , 1985, Softw. Microsystems.

[4]  Elaine J. Weyuker,et al.  Axiomatizing software test data adequacy , 1986, IEEE Transactions on Software Engineering.

[5]  Matthew S. Hecht,et al.  Flow Analysis of Computer Programs , 1977 .

[6]  Michael A. Hennell,et al.  The causes and effects of infeasible paths in computer programs , 1985, ICSE '85.

[7]  Elaine J. Weyuker Translatability and Decidability Questions for Restricted Classes of Program Schemas , 1979, SIAM J. Comput..

[8]  Robert E. Tarjan,et al.  A fast algorithm for finding dominators in a flowgraph , 1979, TOPL.

[9]  Martin R. Woodward,et al.  Experience with Path Analysis and Testing of Programs , 1980, IEEE Transactions on Software Engineering.

[10]  R. P. Dilworth,et al.  A DECOMPOSITION THEOREM FOR PARTIALLY ORDERED SETS , 1950 .

[11]  Takeshi Chusho,et al.  Test Data Selection and Quality Estimation Based on the Concept of Essential Branches for Path Testing , 1987, IEEE Transactions on Software Engineering.

[12]  Antonia Bertolino,et al.  A meaningful bound for branch testing , 1994, ISSTA '94.

[13]  H. S. Wang,et al.  A generalized optimal path-selection model for structural program testing , 1989, J. Syst. Softw..

[14]  Albert L. Baker,et al.  A Comparison of Measures of Control Flow Complexity , 1979, IEEE Transactions on Software Engineering.

[15]  S. Louis Hakimi,et al.  On Path Cover Problems in Digraphs and Applications to Program Testing , 1979, IEEE Transactions on Software Engineering.

[16]  N. Malevris,et al.  Reducing the effects of infeasible paths in branch testing , 1989 .

[17]  Boris Beizer,et al.  Software testing techniques (2. ed.) , 1990 .