Results 1 - 10
of
10
A practical and flexible flow analysis for higher-order languages
- ACM Transactions on Programming Languages and Systems
, 1996
"... A flow analysis collects data-flow and control-flow information about programs. A compiler can use this information to enable optimizations. The analysis described in this article unifies and extends previous work on flow analyses for higher-order languages supporting assignment and control operator ..."
Abstract
-
Cited by 47 (4 self)
- Add to MetaCart
A flow analysis collects data-flow and control-flow information about programs. A compiler can use this information to enable optimizations. The analysis described in this article unifies and extends previous work on flow analyses for higher-order languages supporting assignment and control operators. The analysis is abstract interpretation based and is parameterized over two polyvariance operators and a projection operator. These operators are used to regulate the speed and accuracy of the analysis. An implementation of the analysis is incorporated into and used in a production Scheme compiler. The analysis can process any legal Scheme program without modification. Others have demonstrated that a 0CFA analysis can enable optimizations, but a 0CFA analysis is O(n3). An O(n) instantiation of our analysis successfully enables the optimization of closure representations and procedure calls. Experiments with the cheaper instantiation show that it is as effective as 0CFA for these optimizations.
Eta-Expansion does the Trick
- ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 1996
"... Partial-evaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "binding-time improvements": nonstandard use of continuationpassing style, eta-expansion, and a popul ..."
Abstract
-
Cited by 22 (6 self)
- Add to MetaCart
Partial-evaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "binding-time improvements": nonstandard use of continuationpassing style, eta-expansion, and a popular transformation called "The Trick". We provide a unified view of these binding-time improvements, from a typing perspective. Just as a
The Effectiveness of Flow Analysis for Inlining
- In Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming
, 1997
"... An interprocedural flow analysis can justify inlining in higher-order languages. In principle, more inlining can be performed as analysis accuracy improves. This paper compares four flow analyses to determine how effectively they justify inlining in practice. The paper makes two contributions. First ..."
Abstract
-
Cited by 18 (2 self)
- Add to MetaCart
An interprocedural flow analysis can justify inlining in higher-order languages. In principle, more inlining can be performed as analysis accuracy improves. This paper compares four flow analyses to determine how effectively they justify inlining in practice. The paper makes two contributions. First, the relative merits of the flow analyses are measured with all other variables held constant. The four analyses include two monovariant and two polyvariant analyses that cover a wide range of the accuracy/cost spectrum. Our measurements show that the effectiveness of the inliner improves slightly as analysis accuracy improves, but the improvement is offset by the compile-time cost of the accurate analyses. The second contribution is an improvement to the previously reported inlining algorithm used in our experiments. The improvement causes flow information provided by a polyvariant analysis to be selectively merged. By merging flow information depending on the inlining context, the algorit...
Towards Bridging the Gap Between Programming Languages and Partial Evaluation
- in "ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation
, 2002
"... Partial evaluation is a program-transformation technique that automatically specializes a program with respect to user-supplied invariants. Despite successful applications in areas such as graphics, operating systems, and software engineering, partial evaluators have yet to achieve widespread use. O ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
Partial evaluation is a program-transformation technique that automatically specializes a program with respect to user-supplied invariants. Despite successful applications in areas such as graphics, operating systems, and software engineering, partial evaluators have yet to achieve widespread use. One reason is the difficulty of adequately describing specialization opportunities. Indeed, under-specialization or over-specialization often occurs, without any direct feedback to the user as to the source of the problem. We have developed a high-level, module-based language allowing the programmer to guide the choice of both the code to specialize and the invariants to exploit during the specialization process. To ease the use of partial evaluation, the syntax of this language is similar to the declaration syntax of the target language of the partial evaluator. To provide feedback to the programmer, declarations are checked throughout the analyses performed by partial evaluation. The language has been successfully used by a signal-processing expert in the design of a specializable Forward Error Correction component. 1.
Search-Based Binding Time Analysis using Type-Directed Pruning
- In: Proceedings of the ACM SIGPLAN Asian Symposium on Partial Evaluation and Semantics-Based Program Manipulation, Aizu
, 2002
"... We introduce a new kind of Binding Time Analysis (BTA) based on search rather than constraint solving or abstract interpretation. The search is guided by type information which significantly prunes the size of the search space, making the algorithm practical. We also point out, that higher order mul ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
We introduce a new kind of Binding Time Analysis (BTA) based on search rather than constraint solving or abstract interpretation. The search is guided by type information which significantly prunes the size of the search space, making the algorithm practical. We also point out, that higher order multi-stage types are a rich and expressive medium for the expression of binding-time specifications. A goal of our work is to demonstrate that a single unified system which seamlessly integrates both manual staging and automatic BTA based staging can be built.
Binding-Time Analysis in Partial Evaluation: One Size Does Not Fit All
, 2000
"... Existing partial evaluators usually fix the strategy for binding-time analysis. But a single strategy cannot fulfill all goals without leading to compromises regarding precision, termination, and code explosion in partial evaluators. Our goal is to improve the usability of partial evaluator systems ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Existing partial evaluators usually fix the strategy for binding-time analysis. But a single strategy cannot fulfill all goals without leading to compromises regarding precision, termination, and code explosion in partial evaluators. Our goal is to improve the usability of partial evaluator systems by developing an adaptive approach that can accommodate a variety of different strategies ranging from maximally polyvariant to entirely uniform analysis, and thereby make offline specialization more practical in a realistic setting. The core of the analysis has been implemented in FSpec, an offline partial evaluator for a subset of Fortran 77.
Fast Strictness Analysis Via Symbolic Fixpoint Iteration
, 1991
"... . Strictness analysis (at least for flat domains) is well understood. For a few years the main concern was efficiency, since the standard analysis was shown to be exponential in the worst case [9]. Thus lots of research evolved to find efficient average-case algorithms. In Yale Haskell we have imple ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
. Strictness analysis (at least for flat domains) is well understood. For a few years the main concern was efficiency, since the standard analysis was shown to be exponential in the worst case [9]. Thus lots of research evolved to find efficient average-case algorithms. In Yale Haskell we have implemented a strictness analyzer that computes fixpoints via symbolic manipulation of boolean functions. This extremely simple approach also is extremely fast -- the strictness analysis phase of our compiler typically takes about 1% of the overall compilation time. 1 Introduction The goal of strictness analysis is to determine, for every function in a program, the parameters in which it is strict. Strictness information is crucial to the implementation of a non-strict language such as Haskell, since conventional machines are best suited to strict, or eager evaluation. Knowing that a function is strict in a given argument allows one to evaluate that argument eargerly and thus avoid creating dela...
Demand-Driven Type Analysis for Dynamically-Typed Functional Languages
"... We present a new static type analysis for dynamically-typed languages that produces high quality results at a cost that remains practicable. The analysis has the ability to adapt to the needs of the optimizer and to the characteristics of the program at hand. The result is an analyzer that quickly t ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
We present a new static type analysis for dynamically-typed languages that produces high quality results at a cost that remains practicable. The analysis has the ability to adapt to the needs of the optimizer and to the characteristics of the program at hand. The result is an analyzer that quickly transforms itself to be better equipped to attack the program. Experiments show that our approach can be pretty clever in the optimizations that it enables.
Collecting Interpreters Yield Constraint-Based Analyses
, 1998
"... Abstract interpretation-based and constraint-based analyses are analysis methodologies with different strengths and weaknesses. Abstract interpretation is intuitive because it is based on a standard interpretation of the language, but a naive implementation is slow. A constraint-based analysis, o ..."
Abstract
- Add to MetaCart
Abstract interpretation-based and constraint-based analyses are analysis methodologies with different strengths and weaknesses. Abstract interpretation is intuitive because it is based on a standard interpretation of the language, but a naive implementation is slow. A constraint-based analysis, on the other hand, does not have a direct connection with the language's standard semantics, but simple algorithms can solve the constraints relatively quickly. This paper relates these two seemingly different analysis methodologies by showing how to derive a polyvariant, set-based analysis from a collecting interpreter. An analysis derived using our techniques has the benefits of both methodologies. It retains its connection with the standard interpreter, yet it is also fast. Furthermore, the derived analysis is polyvariant and generates constraints lazily so that unnecessary constraints are not placed on the solution. Our approach is illustrated by deriving a working analysis from a ...

