Results 1  10
of
93
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 564 (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 timeconsuming, and is likely to exceed the production of today’s programmers. New techniques are required to solve this socalled 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.
Pointsto Analysis in Almost Linear Time
, 1996
"... We present an interprocedural flowinsensitive pointsto analysis based on type inference methods with an almost linear time cost complexity. To our knowledge, this is the asymptotically fastest nontrivial interprocedural pointsto analysis algorithm yet described. The algorithm is based on a nons ..."
Abstract

Cited by 553 (2 self)
 Add to MetaCart
(Show Context)
We present an interprocedural flowinsensitive pointsto analysis based on type inference methods with an almost linear time cost complexity. To our knowledge, this is the asymptotically fastest nontrivial interprocedural pointsto analysis algorithm yet described. The algorithm is based on a nonstandard type system. The type inferred for any variable represents a set of locations and includes a type which in turn represents a set of locations possibly pointed to by the variable. The type inferred for a function variable represents a set of functions it may point to and includes a type signature for these functions. The results are equivalent to those of a flowinsensitive alias analysis (and control flow analysis) that assumes alias relations are reflexive and transitive. This work makes
FlowSensitive Type Qualifiers
, 2002
"... We present a system for extending standard type systems with flowsensitive type qualifiers. Users annotate their programs with type qualifiers, and inference checks that the annotations are correct. In our system only the type qualifiers are modeled flowsensitively  the underlying standard types ..."
Abstract

Cited by 384 (29 self)
 Add to MetaCart
(Show Context)
We present a system for extending standard type systems with flowsensitive type qualifiers. Users annotate their programs with type qualifiers, and inference checks that the annotations are correct. In our system only the type qualifiers are modeled flowsensitively  the underlying standard types are unchanged, which allows us to obtain an efficient constraintbased inference algorithm that integrates flowinsensitive alias analysis, effect inference, and ideas from linear type systems to support strong updates. We demonstrate the usefulness of flowsensitive type qualifiers by finding a number of new locking bugs in the Linux kernel.
Tutorial Notes on Partial Evaluation
 Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages
, 1993
"... The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a sourcetosource program transformation technique for specializing program ..."
Abstract

Cited by 239 (62 self)
 Add to MetaCart
(Show Context)
The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a sourcetosource program transformation technique for specializing programs with respect to parts of their input. In essence, partial evaluation removes layers of interpretation. In the most general sense, an interpreter can be defined as a program whose control flow is determined by its input data. As Abelson points out, [43, Foreword], even programs that are not themselves interpreters have important interpreterlike pieces. These pieces contain both compiletime and runtime constructs. Partial evaluation identifies and eliminates the compiletime constructs. 1.1 A complete example We consider a function producing formatted text. Such functions exist in most programming languages (e.g., format in Lisp and printf in C). Figure 1 displays a formatting functio...
Unificationbased Pointer Analysis with Directional Assignments
, 2000
"... This paper describes a new algorithm for flow and context insensitive pointer analysis of C programs. Our studies show that the most common use of pointers in C programs is in passing the addresses of composite objects or updateable values as arguments to procedures. Therefore, we have designed a lo ..."
Abstract

Cited by 207 (7 self)
 Add to MetaCart
(Show Context)
This paper describes a new algorithm for flow and context insensitive pointer analysis of C programs. Our studies show that the most common use of pointers in C programs is in passing the addresses of composite objects or updateable values as arguments to procedures. Therefore, we have designed a lowcost algorithm that handles this common case accurately. In terms of both precision and running time, this algorithm lies between Steensgaard's algorithm, which treats assignments bidirectionally using unification, and Andersen's algorithm, which treats assignments directionally using subtyping. Our "one level flow" algorithm uses a restricted form of subtyping to avoid unification of symbols at the top levels of pointer chains in the pointsto graph, while using unification elsewhere in the graph. The method scales easily to large programs. For instance, we are able to analyze a 1.4 MLOC (million lines of code) program in two minutes, using less than 200MB of memory. At the same time, the pr...
A Modal Analysis of Staged Computation
 JOURNAL OF THE ACM
, 1996
"... We show that a type system based on the intuitionistic modal logic S4 provides an expressive framework for specifying and analyzing computation stages in the context of functional languages. Our main technical result is a conservative embedding of Nielson & Nielson's twolevel functional la ..."
Abstract

Cited by 197 (22 self)
 Add to MetaCart
We show that a type system based on the intuitionistic modal logic S4 provides an expressive framework for specifying and analyzing computation stages in the context of functional languages. Our main technical result is a conservative embedding of Nielson & Nielson's twolevel functional language in our language MiniML, which in
A framework for call graph construction algorithms
 ACM Transactions on Programming Languages and Systems
, 2001
"... A large number of call graph construction algorithms for objectoriented and functional languages have been proposed, each embodying different tradeoffs between analysis cost and call graph precision. In this article we present a unifying framework for understanding call graph construction algorithm ..."
Abstract

Cited by 75 (2 self)
 Add to MetaCart
A large number of call graph construction algorithms for objectoriented and functional languages have been proposed, each embodying different tradeoffs between analysis cost and call graph precision. In this article we present a unifying framework for understanding call graph construction algorithms and an empirical comparison of a representative set of algorithms. We first present a general parameterized algorithm that encompasses many wellknown and novel call graph construction algorithms. We have implemented this general algorithm in the Vortex compiler infrastructure, a mature, multilanguage, optimizing compiler. The Vortex implementation provides a “level playing field ” for meaningful crossalgorithm performance comparisons. The costs and benefits of a number of call graph construction algorithms are empirically assessed by applying their Vortex implementation to a suite of sizeable (5,000 to 50,000 lines of code) Cecil and Java programs. For many of these applications, interprocedural analysis enabled substantial speedups over an already highly optimized baseline. Furthermore, a significant fraction of these speedups can be obtained through the use of a scalable, nearlinear time call graph construction algorithm.
Two Classes of Boolean Functions for Dependency Analysis
 SCIENCE OF COMPUTER PROGRAMMING
, 1994
"... Many static analyses for declarative programming/database languages use Boolean functions to express dependencies among variables or argument positions. Examples include groundness analysis, arguably the most important analysis for logic programs, finiteness analysis and functional dependency analys ..."
Abstract

Cited by 71 (4 self)
 Add to MetaCart
Many static analyses for declarative programming/database languages use Boolean functions to express dependencies among variables or argument positions. Examples include groundness analysis, arguably the most important analysis for logic programs, finiteness analysis and functional dependency analysis for databases. We identify two classes of Boolean functions that have been used: positive and definite functions, and we systematically investigate these classes and their efficient implementation for dependency analyses. On the theoretical side we provide syntactic characterizations and study the expressiveness and algebraic properties of the classes. In particular, we show that both are closed under existential quantification. On the practical side we investigate various representations for the classes based on reduced ordered binary decision diagrams (ROBDDs), disjunctive normal form, conjunctive normal form, Blake canonical form, dual Blake canonical form, and two forms specific to de...
Fast Interprocedural Class Analysis
 IN SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES
, 1998
"... Previous algorithms for interprocedural control flow analysis of higherorder and/or objectoriented languages have been described that perform propagation or constraint satisfaction and take O(N³) time (such as Shivers's 0CFA and Heintze's setbased analysis), or unification and take O(Na ..."
Abstract

Cited by 67 (3 self)
 Add to MetaCart
Previous algorithms for interprocedural control flow analysis of higherorder and/or objectoriented languages have been described that perform propagation or constraint satisfaction and take O(N³) time (such as Shivers's 0CFA and Heintze's setbased analysis), or unification and take O(Na(N,N)) time (such as Steensgaard's pointer analysis), or optimistic reachability analysis and take O(N) time (such as Bacon and Sweeney's Rapid Type Analysis). We describe a general parameterized analysis framework that integrates propagationbased and unificationbased analysis primitives and optimistic reachability analysis, whose instances mimic these existing algorithms as well as several new algorithms taking O(N), O(Na(N,N)), O(N²), and O(N² a(N,N)) time; our O(N) and O(Na(N,N)) algorithms produce more precise results than the previous algorithms with these complexities. We implemented our algorithm framework in the Vortex optimizing compiler, and we measured the cost and benefit of t...
Efficient Multilevel Generating Extensions for Program Specialization
, 1995
"... . Multiple program specialization can stage a computation into several computation phases. This paper presents an effective solution for multiple program specialization by generalizing conventional offline partial evaluation and integrating the "cogen approach" with a multilevel binding ..."
Abstract

Cited by 64 (5 self)
 Add to MetaCart
. Multiple program specialization can stage a computation into several computation phases. This paper presents an effective solution for multiple program specialization by generalizing conventional offline partial evaluation and integrating the "cogen approach" with a multilevel bindingtime analysis. This novel "multicogen approach" solves two fundamental problems of selfapplicable partial evaluation: the generationtime problem and the generatorsize problem. The multilevel program generator has been implemented for a higherorder subset of Scheme. Experimental results show a remarkable reduction of generation time and generator size compared to previous attempts of multiple selfapplication. 1 Introduction Stages of computation arise naturally in many programs, depending on the availability of data or the frequency with which the input changes. Code for later stages can be optimized based on values available in earlier stages. Partial evaluation has received much attention beca...