Abstract
An approach to finding a minimal set of base paths of a program is described. The program digraph is reduced to a weighted loopfree graph (WLFG) in which a node represents a subgraph of the program digraph that contains at most one outermost loop of the program. An algorithm for finding a maximal cutset of the WLFG is given such that (1) a maximal cutset does not contain two arcs that lie on a single path of the WLFG, and (2) its capacity is equal to the cardinality of a minimal set of base paths of the program. The algorithm repeatedly finds an eliminable arc and removes it from the WLFG until either the WLFG contains three nodes or no more eliminable arc can be found. An illustration is given for finding a maximal cutset and subsequently a minimal set of base paths.
Similar content being viewed by others
References
M. R. Paige and J. P. Benson, “The use of software probes in testing fortran programs,”Computer (July 1974), pp. 40–46.
Edward F. Miller, Jr., M. R. Paige, and J. P. Benson, “Structural techniques of program validation,”IEEE Comput Soc. Int. Conf. (February 1974), pp. 161–165.
F. E. Allen and J. Cooke, “Graph-Theoretic Construct for Program Control Flow Analysis,” IBM Research Report (July 1972), pp. 1–28.
Marvin Shaefer,A Mathematical Theory of Global Program Optimization (Prentice Hall, Englewood Cliffs, New Jersey, 1973), pp. 1–34.
Narsingh Deo,Graph Theory with Applications to Engineering and Computer Science (Prentice Hall, Englewood Cliffs, New Jersey, 1974), pp. 270–315, 424–448.
T. C. Hu,Integer Programming and Network Flows (Addison-Wesley, Reading, Massachusetts, 1969), pp. 105–119.
H. Koh, “Analysis of Program Structure for Test Input Generation in a Successive Testing Environment,” Ph.D. thesis, University of Pittsburgh (1978), pp. 166–171.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Koh, H., Chuang, H.Y.H. Finding a minimal set of base paths of a program. International Journal of Computer and Information Sciences 8, 473–488 (1979). https://doi.org/10.1007/BF00995499
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF00995499