This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Automatic Generation of Path Covers Based on the Control Flow Analysis of Computer Programs
December 1994 (vol. 20 no. 12)
pp. 885-899

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] A. L. Baker and S. H. Zweben, "A comparison of measures of control flow complexity,"IEEE Trans. Software Eng., vol.SE-6, pp.506-512, Nov. 1980.
[2] B. Beizer,Software Testing Techniques. New York: Van Nostrand Reinhold, 1983.
[3] W. G. Bently and E. F. Miller, "Ct coverage--initial results,"Software Quality J., vol. 2, no. 1, pp. 29-47, Mar. 1993.
[4] C. Berge,Graphs, New York: Elsevier North-Holland, 1985, 2nd revised ed.
[5] A. Bertolino, "Unconstrained edges and their application to branch analysis and testing of programs,"J. Syst. and Software, vol. 20, no. 2, pp. 125-133, Feb. 1993.
[6] A. Bertolino and M. Marré, "A meaningful bound for branch testing," inProc. Int. Symposium on Software Analysis and Testing (ISSTA 94), Seattle, USA, Aug. 1994.
[7] A. Bertolino and M. Marré, "On automatic generation of path covers," Istituto di Elaborazione della Informazione CNR Italy, Tech. Rep. TR IEI B4-59, Nov. 1992.
[8] T. Chusho, "Test data selection and quality estimation based on the concept of essential branches for path-testing,"IEEE Trans. Software Eng., vol. SE-13, pp. 509-517, May 1987.
[9] R. P. Dilworth, "A decomposition theorem for partially ordered sets,"Annals Math., vol. 51, no. 1, pp. 161-166, Jan. 1950.
[10] M. Hecht,Flow Analysis of Computer Programs. New York: Elsevier North-Holland, 1977.
[11] D. Hedley and M. A. Hennell, "The causes and effects of infeasible paths in computer programs," inProc. 8th Int. Conf. on Software Eng., Imperial College, London, UK, Aug. 1985, pp. 259-266.
[12] B. W. Kernighan and D. M. Ritchie,The C Programming Language. Englewood Cliffs, NJ: Prentice-Hall, 1978.
[13] K. W. Krause, R. W. Smith, and M. A. Goodwin, "Optimal software test planning through automated network analysis,"IEEE Symp. on Computer Software Reliability, 1973.
[14] T. Lengauer and R.E. Tarjan, "A Fast Algorithm for Finding Dominators in a Flowgraph,"ACM Trans. Programming Languages and Systems, July 1979, pp. 121-141.
[15] T. J. McCabe, "A comnlexity measure,"IEEE Trans. Software Eng., vol. SE-2, pp. 308-320, Dec. 1976.
[16] E. F. Miller, "Software testing technology: An overview,"Handbook of Software Engineering, C. R. Vick and C. V. Ramamoorthy, Eds. New York: Van Nostrand Reinhold Company, 1984.
[17] E. F. Miller, M. R. Paige, J. P. Benson, and W. R. Wisehart, "Structural techniques of program validation," inDigest COMPCON74, pp. 161-164, 1974.
[18] S. C. Ntafos and S. Louis Hakimi, "On path cover problems in digraphs and applications to program testing,"IEEE Trans. Software Eng., vol. SE-5, pp. 520-529, Sept. 1979.
[19] H. S. Wang, S. R. Hsu, and J. C. Lin, "A generalized optimal path selection model for structural program testing,"J. Syst. and Software, vol. 10, pp. 55-63, 1989.
[20] E. Weyuker, "Translatability and decidability questions for restricted classes of program schemas,"SIAM J. Computers, vol. 8, no. 4, pp. 587-598, 1979.
[21] E. J. Weyuker, "Axiomatizing software test data adequacy,"IEEE Trans. Software Eng., vol. SE-12, no. 12, pp. 1128-1138, Dec. 1986.
[22] R. W. Whitty, N. E. Fenton, and A. A. Kaposi, "A rigorous approach to structural analysis and metrication of software,"Software and Microsystems, vol. 4, no. 1, pp. 2-16, Feb. 1985.
[23] M. R. Woodward, D. Hedley, and M. A. Hennell, "Experience with path analysis and testing of programs,"IEEE Trans. Soft. Eng., vol. SE-6, pp. 278-286, May 1980.
[24] D. F. Yates and N. Malevris, "Reducing the effects of infeasible paths in branch testing,"ACM SIGSOFT Soft. Eng. Notes, vol. 14, no. 8, pp. 48-54, Dec. 1989.

Index Terms:
program testing; software tools; trees (mathematics); program diagnostics; flow graphs; program control structures; path covers; control flow analysis; program branch testing; program flowgraph; program inputs; ddgraph; graph theoretic principles; dominance; implication; arc trees; unconstrained arcs; dominator tree; implied tree; flexibility; simplicity; recursive iteration; infeasible paths; selection strategy; software analysis tool; software testing tool; automated testing tool
Citation:
A. Bertolino, M. Marre, "Automatic Generation of Path Covers Based on the Control Flow Analysis of Computer Programs," IEEE Transactions on Software Engineering, vol. 20, no. 12, pp. 885-899, Dec. 1994, doi:10.1109/32.368137
Usage of this product signifies your acceptance of the Terms of Use.