AUTOMATIC-GENERATION OF PATH COVERS BASED ON THE CONTROL FLOW-ANALYSIS OF COMPUTER-PROGRAMS

被引:56
作者
BERTOLINO, A [1 ]
MARRE, M [1 ]
机构
[1] UNIV PISA,DIPARTIMENTO INFORMAT,I-56100 PISA,ITALY
关键词
AUTOMATED TESTING TOOL; BRANCH TESTING; DDGRAPH; DOMINATOR TREE; IMPLIED TREE; INFEASIBLE PATH; PATH COVER; UNCONSTRAINED ARC;
D O I
10.1109/32.368137
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Branch testing a program involves: 1) generating a set of paths that will cover every arc in the program flowgraph, called a path cover; 2) finding a set of program inputs that will execute every path in the path cover. The generation of path covers can be performed through the analysis of program control flow and can be automated, but, inevitably, statically generated path covers may include infeasible paths. The method used for path generation should attempt to reduce the incidence of this problem. The 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 immediately a subset of ddgraph arcs, called unconstrained arcs, having the property that a set of paths exercising all the unconstrained arcs will 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 algoritm 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.
引用
收藏
页码:885 / 899
页数:15
相关论文
共 24 条
[1]   A COMPARISON OF MEASURES OF CONTROL FLOW COMPLEXITY [J].
BAKER, AL ;
ZWEBEN, SH .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1980, 6 (06) :506-512
[2]  
Beizer B., 2003, SOFTWARE TESTING TEC
[3]   CT COVERAGE - INITIAL RESULTS [J].
BENTLY, WG ;
MILLER, EF .
SOFTWARE QUALITY JOURNAL, 1993, 2 (01) :29-47
[4]  
Berge C, 1985, GRAPHS
[5]   UNCONSTRAINED EDGES AND THEIR APPLICATION TO BRANCH ANALYSIS AND TESTING OF PROGRAMS [J].
BERTOLINO, A .
JOURNAL OF SYSTEMS AND SOFTWARE, 1993, 20 (02) :125-133
[6]  
BERTOLINO A, 1992, CNR TRIEI B459 TECH
[7]  
BERTOLINO A, 1994, AUG P INT S SOFTW AN
[9]   A DECOMPOSITION THEOREM FOR PARTIALLY ORDERED SETS [J].
DILWORTH, RP .
ANNALS OF MATHEMATICS, 1950, 51 (01) :161-166
[10]  
Hecht Matthew S., 1977, FLOW ANAL COMPUTER P