Results 11  20
of
79
A Calculus with Polymorphic and Polyvariant Flow Types
"... We present # CIL , a typed #calculus which serves as the foundation for a typed intermediate language for optimizing compilers for higherorder polymorphic programming languages. The key innovation of # CIL is a novel formulation of intersection and union types and flow labels on both terms and ..."
Abstract

Cited by 31 (11 self)
 Add to MetaCart
We present # CIL , a typed #calculus which serves as the foundation for a typed intermediate language for optimizing compilers for higherorder polymorphic programming languages. The key innovation of # CIL is a novel formulation of intersection and union types and flow labels on both terms and types. These flow types can encode polyvariant control and data flow information within a polymorphically typed program representation. Flow types can guide a compiler in generating customized data representations in a strongly typed setting. Since # CIL enjoys confluence, standardization, and subject reduction properties, it is a valuable tool for reasoning about programs and program transformations.
Strongly Typed FlowDirected Representation Transformations (Extended Abstract)
 In ICFP ’97 [ICFP97
, 1997
"... We present a new framework for transforming data representations in a strongly typed intermediate language. Our method allows both value producers (sources) and value consumers (sinks) to support multiple representations, automatically inserting any required code. Specialized representations can be ..."
Abstract

Cited by 30 (13 self)
 Add to MetaCart
(Show Context)
We present a new framework for transforming data representations in a strongly typed intermediate language. Our method allows both value producers (sources) and value consumers (sinks) to support multiple representations, automatically inserting any required code. Specialized representations can be easily chosen for particular source/sink pairs. The framework is based on these techniques: 1. Flow annotated types encode the "flowsfrom" (source) and "flowsto" (sink) information of a flow graph. 2. Intersection and union types support (a) encoding precise flow information, (b) separating flow information so that transformations can be well typed, (c) automatically reorganizing flow paths to enable multiple representations. As an instance of our framework, we provide a function representation transformation that encompasses both closure conversion and inlining. Our framework is adaptable to data other than functions.
Systematic Realisation of Control Flow Analyses for CML
 In Proceedings of ICFP'97
, 1997
"... We present a methodology for the systematic realisation of control flow analyses and illustrate it for Concurrent ML. We start with an abstract specification of the analysis that is next proved semantically sound with respect to a traditional smallstep operational semantics; this result holds for t ..."
Abstract

Cited by 23 (11 self)
 Add to MetaCart
(Show Context)
We present a methodology for the systematic realisation of control flow analyses and illustrate it for Concurrent ML. We start with an abstract specification of the analysis that is next proved semantically sound with respect to a traditional smallstep operational semantics; this result holds for terminating as well as nonterminating programs. The analysis is defined coinductively and it is shown that all programs have a least analysis result (that is indeed the best one). To realise the analysis we massage the specification in three stages: (i) to explicitly record reachability of subexpressions, (ii) to be defined in a syntaxdirected manner, and (iii) to generate a set of constraints that subsequently can be solved by standard techniques. We prove equivalence results between the different versions of the analysis; in particular it follows that the least solution to the constraints generated will be the least analysis result also to the initial specification. 1 Introduction Many c...
ControlFlow Analysis of Function Calls and Returns by Abstract Interpretation
, 2012
"... Abstract interpretation techniques are used to derive a controlflow analysis for a simple higherorder functional language. The analysis approximates the interprocedural controlflow of both function calls and returns in the presence environment, the analysis computes for each expression an abstrac ..."
Abstract

Cited by 23 (2 self)
 Add to MetaCart
Abstract interpretation techniques are used to derive a controlflow analysis for a simple higherorder functional language. The analysis approximates the interprocedural controlflow of both function calls and returns in the presence environment, the analysis computes for each expression an abstract callstack, effectively approximating where function calls return. The analysis is systematically machine of Flanagan et al. using a series of Galois connections. We prove that the analysis is equivalent to an analysis obtained by first transforming the program into continuationpassing style and then performing control flow analysis of the transformed program. We then show how the analysis induces an equivalent constraintbased formulation, thereby providing a rational reconstruction of a constraintbased CFA from abstract interpretation principles.
Constraint Systems for Useless Variable Elimination
, 1998
"... A useless variable is one whose value contributes nothing to the final outcome of a computation. Such variables are unlikely to occur in humanproduced code, but may be introduced by various program transformations. We would like to eliminate useless parameters from procedures and eliminate the corr ..."
Abstract

Cited by 23 (1 self)
 Add to MetaCart
A useless variable is one whose value contributes nothing to the final outcome of a computation. Such variables are unlikely to occur in humanproduced code, but may be introduced by various program transformations. We would like to eliminate useless parameters from procedures and eliminate the corresponding actual parameters from their call sites. This transformation is the extension to higherorder programming of a variety of deadcode elimination optimizations that are important in compilers for firstorder imperative languages. Shivers has presented such a transformation. We reformulate the transformation and prove its correctness. We believe that this correctness proof can be a model for proofs of other analysisbased transformations. We proceed as follows: ffl We reformulate Shivers' analysis as a set of constraints; since the constraints are conditional inclusions, they can be solved using standard algorithms. ffl We prove that any solution to the constraints is sound: that tw...
A Typed Intermediate Language for FlowDirected Compilation
, 1997
"... We present a typed intermediate language # CIL for optimizing compilers for functionoriented and polymorphically typed programming languages (e.g., ML). The language # CIL is a typed lambda calculus with product, sum, intersection, and union types as well as function types annotated with flow label ..."
Abstract

Cited by 22 (13 self)
 Add to MetaCart
(Show Context)
We present a typed intermediate language # CIL for optimizing compilers for functionoriented and polymorphically typed programming languages (e.g., ML). The language # CIL is a typed lambda calculus with product, sum, intersection, and union types as well as function types annotated with flow labels. A novel formulation of intersection and union types supports encoding flow information in the typed program representation. This flow information can direct optimization.
Optimizing Lazy Functional Programs Using Flow Inference
, 1995
"... . Nonstrict higher order functional programming languages are notorious for their low run time efficiency. Optimizations based on flow analysis, which determines for each variable x in a program which expressions could have originated the value of x, can improve the situation by removing redundant ..."
Abstract

Cited by 21 (5 self)
 Add to MetaCart
. Nonstrict higher order functional programming languages are notorious for their low run time efficiency. Optimizations based on flow analysis, which determines for each variable x in a program which expressions could have originated the value of x, can improve the situation by removing redundant eval and thunk operations, avoiding thunk updates, and allowing the use of unboxed representations of some data. We formulate flow analysis as an inference problem in a type system built using type inclusion constraints and an algorithm for solving these constraints is also given. 1 Introduction Polymorphically typed nonstrict higher order functional programming languages are a boon to the programmer because they provide powerful mechanisms for abstraction [11]. Equally, and for the same reasons, they are very difficult to compile to efficient code. Among the main obstacles are the frequent need to build thunks (representations for unevaluated expressions), test whether objects are thunks o...
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 higherorder 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
(Show Context)
An interprocedural flow analysis can justify inlining in higherorder 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 compiletime 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...
Environment Analysis via ∆CFA
, 2006
"... We describe a new programanalysis framework, based on CPS and procedurestring abstractions, that can handle critical analyses which the kCFA framework cannot. We present the main theorems concerning correctness, show an application analysis, and describe a running implementation. ..."
Abstract

Cited by 16 (8 self)
 Add to MetaCart
We describe a new programanalysis framework, based on CPS and procedurestring abstractions, that can handle critical analyses which the kCFA framework cannot. We present the main theorems concerning correctness, show an application analysis, and describe a running implementation.
Set Constraints for Destructive Array Update Optimization
, 1999
"... Destructive array update optimization is critical for writing scientific codes in functional languages. We present set constraints for an interprocedural update optimization that runs in polynomial time. This is a multipass optimization, involving interprocedural flow analyses for aliasing and live ..."
Abstract

Cited by 15 (1 self)
 Add to MetaCart
Destructive array update optimization is critical for writing scientific codes in functional languages. We present set constraints for an interprocedural update optimization that runs in polynomial time. This is a multipass optimization, involving interprocedural flow analyses for aliasing and liveness. We characterize and prove the soundness of these analyses using smallstep operational semantics. We also prove that any sound liveness analysis induces a correct program transformation.