Results 1 - 10
of
13
Program Analysis and Specialization for the C Programming Language
, 1994
"... Software engineers are faced with a dilemma. They want to write general and wellstructured programs that are flexible and easy to maintain. On the other hand, generality has a price: efficiency. A specialized program solving a particular problem is often significantly faster than a general program. ..."
Abstract
-
Cited by 472 (0 self)
- Add to MetaCart
Software engineers are faced with a dilemma. They want to write general and wellstructured programs that are flexible and easy to maintain. On the other hand, generality has a price: efficiency. A specialized program solving a particular problem is often significantly faster than a general program. However, the development of specialized software is time-consuming, and is likely to exceed the production of today’s programmers. New techniques are required to solve this so-called software crisis. Partial evaluation is a program specialization technique that reconciles the benefits of generality with efficiency. This thesis presents an automatic partial evaluator for the Ansi C programming language. The content of this thesis is analysis and transformation of C programs. We develop several analyses that support the transformation of a program into its generating extension. A generating extension is a program that produces specialized programs when executed on parts of the input. The thesis contains the following main results.
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers
, 1994
"... This paper reports on the design, implementation, and empirical results of a new method for dealing with the aliasing problem in C. The method is based on approximating the points-to relationships between accessible stack locations, and can be used to generate alias pairs, or used directly for other ..."
Abstract
-
Cited by 359 (23 self)
- Add to MetaCart
This paper reports on the design, implementation, and empirical results of a new method for dealing with the aliasing problem in C. The method is based on approximating the points-to relationships between accessible stack locations, and can be used to generate alias pairs, or used directly for other analyses and transformations. Our method provides context-sensitive interprocedural information based on analysis over invocation graphs that capture all calling contexts including recursive and mutually-recursive calling contexts. Furthermore, the method allows the smooth integration for handling general function pointers in C.
Putting Pointer Analysis to Work
, 1998
"... This paper addresses the problem of how to apply pointer analysis to a wide variety of compiler applications. We are not presenting a new pointer analysis. Rather, we focus on putting two existing pointer analyses, points-to analysis and connection analysis, to work. We demonstrate that the fundamen ..."
Abstract
-
Cited by 91 (8 self)
- Add to MetaCart
This paper addresses the problem of how to apply pointer analysis to a wide variety of compiler applications. We are not presenting a new pointer analysis. Rather, we focus on putting two existing pointer analyses, points-to analysis and connection analysis, to work. We demonstrate that the fundamental problem is that one must be able to compare the memory locations read/written via pointer indirections, at different program points, and one must also be able to summarize the effect of pointer references over regions in the program. It is straightforward to compute read/write sets for indirections involving stack-directed pointers using points-to information. However, for heap-directed pointers we show that one needs to introduce the notion of anchor handles into the connection analysis and then express read/write sets to the heap with respect to these anchor handles. Based on the read/write sets we show how to extend traditional optimizations like common subexpression elimination, loop...
Is it a Tree, a DAG, or a Cyclic Graph?
, 1996
"... This paper reports on the design and implementation of a practical shape analysis for C. The purpose of the analysis is to aid in the disambiguation of heap-allocated data structures by estimating the shape (Tree, DAG, or Cyclic Graph) of the data structure accessible from each heap-directed pointer ..."
Abstract
-
Cited by 37 (0 self)
- Add to MetaCart
This paper reports on the design and implementation of a practical shape analysis for C. The purpose of the analysis is to aid in the disambiguation of heap-allocated data structures by estimating the shape (Tree, DAG, or Cyclic Graph) of the data structure accessible from each heap-directed pointer. This shape information can be used to improve dependence testing and in parallelization, and to guide the choice of more complex heap analyses. The method has been implemented as a contextsensitive interprocedural analysis in the McCAT compiler. Experimental results and observations are given for 16 benchmark programs. These results show that the analysis gives accurate and useful results for an important group of applications. 1 Introduction and Related Work Pointer analyses are of critical importance for optimizing /parallelizing compilers that support languages like C, C++ and FORTRAN90. The pointer analysis problem can be divided into two distinct subproblems: (i) analyzing pointers t...
Composing Dataflow Analyses and Transformations
, 2001
"... Dataflow analyses can have mutually beneficial interactions. Previous e#orts to exploit these interactions have either (1) iteratively performed each individual analysis until no further improvements are discovered or (2) developed "superanalyses " that manually combine conceptually separate analyse ..."
Abstract
-
Cited by 35 (6 self)
- Add to MetaCart
Dataflow analyses can have mutually beneficial interactions. Previous e#orts to exploit these interactions have either (1) iteratively performed each individual analysis until no further improvements are discovered or (2) developed "superanalyses " that manually combine conceptually separate analyses. We have devised a new approach that allows analyses to be defined independently while still enabling them to be combined automatically and profitably. Our approach avoids the loss of precision associated with iterating individual analyses and the implementation di#culties of manually writing a super-analysis. The key to our approach is a novel method of implicit communication between the individual components of a super-analysis based on graph transformations. In this paper, we precisely define our approach; we demonstrate that it is sound and it terminates; finally we give experimental results showing that in practice (1) our framework produces results at least as precise as iterating the individual analyses while compiling at least 5 times faster, and (2) our framework achieves the same precision as a manually written super-analysis while incurring a compiletime overhead of less than 20%.
Practical Fine-Grained Static Slicing of Optimized Code
, 1994
"... Program slicing is a technique for visualizing dependences and restricting attention to just the components of a program relevant to evaluation of certain expressions. Backward slicing reveals which other parts of the program the expressions' meaning depends on, while forward slicing determines whic ..."
Abstract
-
Cited by 28 (2 self)
- Add to MetaCart
Program slicing is a technique for visualizing dependences and restricting attention to just the components of a program relevant to evaluation of certain expressions. Backward slicing reveals which other parts of the program the expressions' meaning depends on, while forward slicing determines which parts of the program depend on their meaning. Slicing helps programmers understand program structure, which aids program understanding, maintenance, testing, and debugging; slicing can also assist parallelization, integration and comparison of program versions, and other tasks. This paper improves previous techniques for static slicing. Our algorithm is expression-oriented rather than based on statements and variables, resulting in smaller slices. A user can slice on any value computed by the program---including ones that are not, or cannot be, assigned to variables. The slicer accounts for function calls, pointers, and aggregate structures. It takes advantage of compiler analyses and tran...
Generalized Constant Propagation A Study in C
- In 6th Int. Conf. on Compiler Construction, volume 1060 of Lec. Notes in Comp. Sci
, 1996
"... . Generalized Constant Propagation (GCP) statically estimates the ranges of variables throughout a program. GCP is a top-down compositional compiler analysis in the style of abstract intepretation. In this paper we present an implementation of both intraprocedural and interprocedural GCP within the ..."
Abstract
-
Cited by 24 (2 self)
- Add to MetaCart
. Generalized Constant Propagation (GCP) statically estimates the ranges of variables throughout a program. GCP is a top-down compositional compiler analysis in the style of abstract intepretation. In this paper we present an implementation of both intraprocedural and interprocedural GCP within the context of the C language. We compare the accuracy and utility of GCP information for several versions of GCP using experimental results from an actual implementation. 1 Introduction Generalized Constant Propagation (GCP) is a top-down compositional compiler analysis based on the style of abstract interpretation [CC77]. A GCP analysis statically approximates the possible values each variable could take at each point in the program. As an extension of constant propagation (CP), GCP estimates ranges for variables rather than their precise value: each variable at each point is associated with a minimum and maximum value. We have implemented GCP for the full C language, in both intraprocedural...
Frameworks for intra- and interprocedural dataflow analysis
, 1996
"... Because dataflow analyses are difficult to implement from scratch, reusable dataflow analysis frameworks have been developed which provide generic support facilities for managing propagation of dataflow information and iteration in loops. We have designed a framework that improves on previous work b ..."
Abstract
-
Cited by 18 (5 self)
- Add to MetaCart
Because dataflow analyses are difficult to implement from scratch, reusable dataflow analysis frameworks have been developed which provide generic support facilities for managing propagation of dataflow information and iteration in loops. We have designed a framework that improves on previous work by making it easy to perform graph transformations as part of iterative analysis, to run multiple analyses “in parallel ” to achieve the precision of a single monolithic analysis while preserving modularity and reusability of the component analyses, and to construct contextsensitive interprocedural analyses from intraprocedural versions. We have implemented this framework in the Vortex optimizing compiler and used the framework to help build both traditional optimizations and non-traditional optimizations of dynamically-dispatched messages and first-class, lexically-nested functions. 1
Dynamically Discovering Pointer-Based Program Invariants
, 1999
"... Explicitly stated program invariants can help programmers by characterizing aspects of program execution and identifying program properties that must be preserved when modifying code; invariants can also be of assistance to automated tools. Unfortunately, these invariants are usually absent from cod ..."
Abstract
-
Cited by 17 (7 self)
- Add to MetaCart
Explicitly stated program invariants can help programmers by characterizing aspects of program execution and identifying program properties that must be preserved when modifying code; invariants can also be of assistance to automated tools. Unfortunately, these invariants are usually absent from code. Previous work showed how to dynamically invariants from program traces by looking for patterns in and relationships among variable values. Although the original prototype recovered invariants from formally-specified programs, and the invariants it detected assisted programmers in a software evolution task, it was not effective for pointerbased programs. This paper closes that gap by showing that two key techniques are adequate to detect pointer-related invariants. First, we linearize data structures to present them whole to our invariant detector and to express values for expressions not present in the source code. Second, we discuss several policies and a mechanism for computing disjunct...

