Results 1  10
of
14
On Slicing Programs with Jump Statements
, 1994
"... Program slices have potential uses in many software engineering applications. Traditional slicing algorithms, however, do not work correctly on programs that contain explicit jump statements. Two similar algorithms were proposed recently to alleviate this problem. Both require the flowgraph and the ..."
Abstract

Cited by 58 (0 self)
 Add to MetaCart
Program slices have potential uses in many software engineering applications. Traditional slicing algorithms, however, do not work correctly on programs that contain explicit jump statements. Two similar algorithms were proposed recently to alleviate this problem. Both require the flowgraph and the program dependence graph of the program to be modified. In this paper, we propose an alternative algorithm that leaves these graphs intact and uses a separate graph to store the additional required information. We also show that this algorithm permits an extremely efficient, conservative adaptation for use with programs that contain only "structured" jump statements.
A Simple, Fast Dominance Algorithm
"... The problem of finding the dominators in a controlflow graph has a long history in the literature. The original algorithms su#ered from a large asymptotic complexity but were easy to understand. Subsequent work improved the time bound, but generally sacrificed both simplicity and ease of implemen ..."
Abstract

Cited by 30 (0 self)
 Add to MetaCart
The problem of finding the dominators in a controlflow graph has a long history in the literature. The original algorithms su#ered from a large asymptotic complexity but were easy to understand. Subsequent work improved the time bound, but generally sacrificed both simplicity and ease of implementation. This paper returns to a simple formulation of dominance as a global dataflow problem. Some insights into the natureofdominance lead to an implementation of an O(N )algorithm that runs faster, in practice, than the classic LengauerTarjan algorithm, which has a timebound of O(E log(N)). We compare the algorithm to LengauerTarjan because it is the best known and most widely used of the fast algorithms for dominance. Working from the same implementationinsights,wealso rederive (from earlier work on control dependence by Ferrante, et al.)amethodforcalculating dominance frontiers that we show is faster than the original algorithm by Cytron, et al. The aim of this paper is not to present a new algorithm, but, rather, to make an argument based on empirical evidence that algorithms with discouraging asymptotic complexities can be faster in practice than those more commonly employed. We show that, in some cases, careful engineering of simple algorithms can overcome theoretical advantages, even when problems grow beyond realistic sizes. Further, we argue that the algorithms presented herein are intuitive and easily implemented, making them excellent teaching tools.
Dominators in Linear Time
, 1997
"... A linear time algorithm is presented for finding dominators in control flow graphs. ..."
Abstract

Cited by 25 (0 self)
 Add to MetaCart
A linear time algorithm is presented for finding dominators in control flow graphs.
Efficient Coverage Testing Using Global Dominator Graphs
, 1999
"... Coverage testing techniques, such as statement and decision coverage, play a significant role in improving the quality of software systems. Constructing a thorough set of tests that yield high coverage, however, is often avery tedious, time consuming task. In this paper we present a technique to fin ..."
Abstract

Cited by 17 (0 self)
 Add to MetaCart
Coverage testing techniques, such as statement and decision coverage, play a significant role in improving the quality of software systems. Constructing a thorough set of tests that yield high coverage, however, is often avery tedious, time consuming task. In this paper we present a technique to find a small subset of a program's statements and decisions with the property that covering the subset implies covering the rest. We introduce the notion of a mega block which is a set of basic blocks spanning multiple procedures with the property that one basic block in it is executed iff every basic block in it is executed. We also present an algorithm to construct a data structure called the global dominator graph showing dominator relationships among mega blocks. A tester only needs to create test cases that are aimed at executing one basic block from each of the leaf nodes in this directed acyclic graph. Every other basic block in the program will automatically be covered by the same test set.
Dominators, Super Blocks, and Program Coverage
, 1994
"... In this paper we present techniques to find subsets of nodes of a flowgraph that satisfy the following property: A test set that exercises all nodes in a subset exercises all nodes in the flowgraph. Analogous techniques to find subsets of edges are also proposed. These techniques may be used to sign ..."
Abstract

Cited by 9 (0 self)
 Add to MetaCart
In this paper we present techniques to find subsets of nodes of a flowgraph that satisfy the following property: A test set that exercises all nodes in a subset exercises all nodes in the flowgraph. Analogous techniques to find subsets of edges are also proposed. These techniques may be used to significantly reduce the cost of coverage testing of programs. A notion of a super block consisting of one or more basic blocks is developed. If any basic block in a super block is exercised by an input then all basic blocks in that super blockmust be exercised by the same input. Dominator relationships among super blocks are used to identify a subset of the super blocks whose coverage implies that of all super blocks and, in turn, that of all basic blocks. Experiments with eight systems in the range of 175K lines of code show that, on the average, test cases targeted to cover just 29% of the basic blocks and 32% of the branches ensure 100% block and branch coverage, respectively.
Generalized Dominators for Structured Programs
, 1996
"... . Recently it has been discovered that control flow graphs of structured programs have bounded treewidth. In this paper we show that this knowledge can be used to design fast algorithms for control flow analysis. We give a linear time algorithm for the problem of finding the immediate multipleverte ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
. Recently it has been discovered that control flow graphs of structured programs have bounded treewidth. In this paper we show that this knowledge can be used to design fast algorithms for control flow analysis. We give a linear time algorithm for the problem of finding the immediate multiplevertex dominator set for all nodes in a control flow graph. The problem was originally proposed by Gupta (Generalized dominators and postdominators, ACM Symp. on Principles of Programming Languages, 1992). Without the restriction of bounded treewidth the fastest algorithm runs in O(jV j jEj) on a graph with jV j nodes and jEj edges and is due to Alstrup, Clausen and Jørgensen (An O(jV j jEj) Algorithm for Finding Immediate MultipleVertex Dominators, accepted to Information Processing Letters). 1 Introduction Constructing dominator trees for control flow graphs G(V; E; s) has been investigated in many papers (see e.g. [8, 9, 11, 13, 14]) in connection with global flow analysis and program op...
Interprocedural Dataflow Analysis  Alias Analysis
, 2001
"... Storage Graph . . . . . . . . . . . . . . . . . . . . . . . . . 124 6.4.2 Dataow Lattice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.5 Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 ix 6.5.1 Labeling execution instances . . . . . . . . . . ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
Storage Graph . . . . . . . . . . . . . . . . . . . . . . . . . 124 6.4.2 Dataow Lattice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.5 Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 ix 6.5.1 Labeling execution instances . . . . . . . . . . . . . . . . . . . . . . 125 6.5.2 LTFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.6 Intraprocedural Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.6.1 Malloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 6.6.2 Assignment Statements . . . . . . . . . . . . . . . . . . . . . . . . . 127 6.7 Interprocedural Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.7.1 Processing SCCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 7 An elimination algorithm for interprocedural alias analysis 136 7.1.1 Alias Abstractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 7.1.2 Elimination algorithms for interprocedural pointer analysis . . . . . 138 7.1.3 An Example Program . . . . . . . . . . . . . . . . . . . . . . . . . . 138 7.2 Induction variable introduction . . . . . . . . . . . . . . . . . . . . . . . . . 139 7.2.1 Iterative control structures . . . . . . . . . . . . . . . . . . . . . . . 140 7.2.2 Interprocedural context . . . . . . . . . . . . . . . . . . . . . . . . . 142 7.3 Sequence Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 7.3.1 Dynamic Sequence Tokens . . . . . . . . . . . . . . . . . . . . . . . . 144 7.3.2 Interprocedural sequence tokens . . . . . . . . . . . . . . . . . . . . 145 7.4 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 7.4.1 A Layout dependent represe...
A Simple and Optimal Algorithm for Finding Immediate Dominators in Reducible Graphs
, 1996
"... We present two simple algorithm for finding immediate dominator in reducible graphs with n nodes and m edges: A O(n + m) RAM algorithm and a O(n +m log log n) pointer machine algorithm. 1 Introduction Algorithms for finding dominator trees for control flow graphs are described in [5, 7, 8]. Dominat ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
We present two simple algorithm for finding immediate dominator in reducible graphs with n nodes and m edges: A O(n + m) RAM algorithm and a O(n +m log log n) pointer machine algorithm. 1 Introduction Algorithms for finding dominator trees for control flow graphs are described in [5, 7, 8]. Dominator trees are used in control flow analysis [1, 4]. In [5] a linear time algorithm is given. This algorithm is complicated and to our knowledge no experimental results using this algorithm have been published. This is the motivation for presenting two simpler algorithms, one of which runs on a pointer machine [10]. The algorithms presented in this paper have previously been described by the authors of this paper and also independently and simultaneously in [9]. But at that time the important results from [2, 3], were not applied, so the contribution of this paper is only a compilation. 2 Notation A control flow graph CFG(V;E; s) is a directed graph with a start node s, from which all nodes i...
A Simple Dynamic Algorithm for Maintaining a Dominator Tree
, 1996
"... We present a simple algorithm which maintains the dominator tree for an arbitrary flow graph during a sequence of i edge insertions interspersed with q queries as "does x dominate y?". The complexity of the algorithm is O(q + m minfi; ng), where m and n respectively are the number of edges and nod ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
We present a simple algorithm which maintains the dominator tree for an arbitrary flow graph during a sequence of i edge insertions interspersed with q queries as "does x dominate y?". The complexity of the algorithm is O(q + m minfi; ng), where m and n respectively are the number of edges and nodes in the flow graph after the i 0 th edge insertion. This improves the former best results from O(q log n +m i log n) in [12] and O(q n +m i) in [5]. Furthermore, we show that the complexity of our algorithm for a single edge insertion is bounded by those nodes which no longer will be dominated by the same set of nodes. 1 Introduction Dominator trees are used in control flow analysis [1, 6, 7, 8]. Algorithms for finding dominator trees for control flow graphs are given in [9, 10, 11] and the algorithm in [9] is linear. Recently dynamic algorithms [3, 5, 12] 1 have been presented for maintaining dominator trees, but the complexities of these algorithms are worse or just as good as...
Algorithm for Finding Immediate MultipleVertex Dominators.
, 1996
"... We present an O(jV j jEj) algorithm for finding immediate multiplevertex dominators in a graph with vertices V and edges E. 1 Introduction. Finding dominators in a graph has been investigated in many papers [6, 7, 8, 9, 10] in connection with global flow analysis and program optimization. Recentl ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
We present an O(jV j jEj) algorithm for finding immediate multiplevertex dominators in a graph with vertices V and edges E. 1 Introduction. Finding dominators in a graph has been investigated in many papers [6, 7, 8, 9, 10] in connection with global flow analysis and program optimization. Recently Gupta extended the problem to find generalized dominators [4, 5], which can be use for e.g. propagating loop invariant statements out of the loop in cases, where no single vertex dominates the loop exit, but where a union of vertices together dominates the exit. Fundamental in connection with generalized dominators are the immediate multiple vertex dominators, imdoms. In [5] the immediate multiple vertex dominator set of a given vertex v, imdom(v), is defined . An O(n 2 n jV j + jV j n ) algorithm is given for computing imdom(v) for all vertices, where n is the largest cardinality of any of imdom. The algorithm is based on the observation that imdom(v) is a subset of the set of im...