Results 1  10
of
30
A modular, polyvariant, and typebased closure analysis
 In ICFP ’97 [ICFP97
"... We observe that the principal typing property of a type system is the enabling technology for modularity and separate compilation [10]. We use this technology to formulate a modular and polyvariant closure analysis, based on the rank 2 intersection types annotated with controlflow information. Modu ..."
Abstract

Cited by 54 (1 self)
 Add to MetaCart
We observe that the principal typing property of a type system is the enabling technology for modularity and separate compilation [10]. We use this technology to formulate a modular and polyvariant closure analysis, based on the rank 2 intersection types annotated with controlflow information. Modularity manifests itself in a syntaxdirected, annotatedtype inference algorithm that can analyse program fragments containing free variables: a principal typing property is used to formalise it. Polyvariance manifests itself in the separation of different behaviours of the same function at its different uses: this is formalised via the rank 2 intersection types. As the rank 2 intersection type discipline types at least all (core) ML programs, our analysis can be used in the separate compilation of such programs. 1
A practical and flexible flow analysis for higherorder languages
 ACM Transactions on Programming Languages and Systems
, 1996
"... A flow analysis collects dataflow and controlflow 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 higherorder languages supporting assignment and control operator ..."
Abstract

Cited by 52 (4 self)
 Add to MetaCart
A flow analysis collects dataflow and controlflow 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 higherorder 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.
Effective Flow Analysis for Avoiding RunTime Checks
 In Proceedings of the 1995 International Static Analysis Symposium
, 1995
"... . This paper describes a general purpose program analysis that computes global controlflow and dataflow information for higherorder, callbyvalue programs. This information can be used to drive global program optimizations such as inlining and runtime check elimination, as well as optimizations ..."
Abstract

Cited by 49 (5 self)
 Add to MetaCart
. This paper describes a general purpose program analysis that computes global controlflow and dataflow information for higherorder, callbyvalue programs. This information can be used to drive global program optimizations such as inlining and runtime check elimination, as well as optimizations like constant folding and loop invariant code motion that are typically based on specialpurpose local analyses. The analysis employs a novel approximation technique called polymorphic splitting that uses letexpressions as syntactic clues to gain precision. Polymorphic splitting borrows ideas from HindleyMilner polymorphic type inference systems to create an analog to polymorphism for flow analysis. Experimental results derived from an implementation of the analysis for Scheme indicate that the analysis is extremely precise and has reasonable cost. In particular, it eliminates significantly more runtime checks than simple flow analyses (i.e. 0CFA) or analyses based on type ...
Trust in the λCalculus
 JOURNAL OF FUNCTIONAL PROGRAMMING
, 1995
"... This paper introduces trust analysis for higherorder languages. Trust analysis encourages the programmer to make explicit the trustworthiness of data, and in return it can guarantee that no mistakes with respect to trust will be made at runtime. We present a confluent λcalculus with explicit tru ..."
Abstract

Cited by 48 (0 self)
 Add to MetaCart
This paper introduces trust analysis for higherorder languages. Trust analysis encourages the programmer to make explicit the trustworthiness of data, and in return it can guarantee that no mistakes with respect to trust will be made at runtime. We present a confluent λcalculus with explicit trust operations, and we equip it with a trusttype system which has the subject reduction property. Trust information in presented as two annotations of each function type constructor, and type inference is computable in O(n³) time.
ControlFlow Analysis and Type Systems
, 1995
"... . We establish a series of equivalences between type systems and controlflow analyses. Specifically, we take four type systems from the literature (involving simple types, subtypes and recursion) and conservatively extend them to reason about controlflow information. Similarly, we take four standa ..."
Abstract

Cited by 48 (1 self)
 Add to MetaCart
. We establish a series of equivalences between type systems and controlflow analyses. Specifically, we take four type systems from the literature (involving simple types, subtypes and recursion) and conservatively extend them to reason about controlflow information. Similarly, we take four standard controlflow systems and conservatively extend them to reason about type consistency. Our main result is that we can match up the resulting type and controlflow systems such that we obtain pairs of equivalent systems, where the equivalence is with respect to both type and controlflow information. In essence, type systems and controlflow analysis can be viewed as complementary approaches for addressing questions of type consistency and controlflow. Recent and independent work by Palsberg and O'Keefe has addressed the same general question. Our work differs from theirs in two respects. First, they only consider what happens when controlflow systems are used to reason about types. In co...
Fast and Effective Optimization of Statically Typed ObjectOriented Languages
, 1997
"... In this dissertation, we show how a relatively simple and extremely fast interprocedural optimization algorithm can be used to optimize many of the expensive features of statically typed, objectoriented languages  in particular, C++ and Java. We present a new program analysis algorithm, Rapid ..."
Abstract

Cited by 45 (3 self)
 Add to MetaCart
In this dissertation, we show how a relatively simple and extremely fast interprocedural optimization algorithm can be used to optimize many of the expensive features of statically typed, objectoriented languages  in particular, C++ and Java. We present a new program analysis algorithm, Rapid Type Analysis, and show that it is fast both in theory and in practice, and significantly outperforms other "fast" algorithms for virtual function call resolution. We present optimization algorithms for the resolution of virtual function calls, conversion of virtual inheritance to direct inheritance, elimination of dynamic casts and dynamic type checks, and removal of object synchronization. These algorithms are all presented within a common framework that allows them to be driven by the information collected by Rapid Type Analysis, or by some other type analysis algorithm. Collectively, the optimizations in this dissertation free the programmer from having to sacrifice modularity and extensibility for performance. Instead, the programmer can freely make use of the most powerful features of objectoriented programming, since the optimizer will remove unnecessary extensibility from the program.
Lineartime Subtransitive Control Flow Analysis
, 1997
"... We present a lineartime algorithm for boundedtype programs that builds a directed graph whose transitive closure gives exactly the results of the standard (cubictime) ControlFlow Analysis (CFA) algorithm. Our algorithm can be used to list all functions calls from all call sites in (optimal) quadr ..."
Abstract

Cited by 42 (1 self)
 Add to MetaCart
We present a lineartime algorithm for boundedtype programs that builds a directed graph whose transitive closure gives exactly the results of the standard (cubictime) ControlFlow Analysis (CFA) algorithm. Our algorithm can be used to list all functions calls from all call sites in (optimal) quadratic time. More importantly, it can be used to give lineartime algorithms for CFAconsuming applications such as: ffl effects analysis: find the sideeffecting expressions in a program. ffl klimited CFA: for each callsite, list the functions if there are only a few of them ( k) and otherwise output "many". ffl calledonce analysis: identify all functions called from only one callsite. 1 Introduction The controlflow graph of a program plays a central role in compilation  it identifies the block and loop structure in a program, a prerequisite for many code optimizations. For firstorder languages, this graph can be directly constructed from a program because information about flow of ...
From Polyvariant Flow Information to Intersection and Union Types
 J. FUNCT. PROGRAMMING
, 1998
"... Many polyvariant program analyses have been studied in the 1990s, including kCFA, polymorphic splitting, and the cartesian product algorithm. The idea of polyvariance is to analyze functions more than once and thereby obtain better precision for each call site. In this paper we present an equivalen ..."
Abstract

Cited by 41 (7 self)
 Add to MetaCart
Many polyvariant program analyses have been studied in the 1990s, including kCFA, polymorphic splitting, and the cartesian product algorithm. The idea of polyvariance is to analyze functions more than once and thereby obtain better precision for each call site. In this paper we present an equivalence theorem which relates a coinductively defined family of polyvariant ow analyses and a standard type system. The proof embodies a way of understanding polyvariant flow information in terms of union and intersection types, and, conversely, a way of understanding union and intersection types in terms of polyvariant flow information. We use the theorem as basis for a new flowtype system in the spirit of the CIL calculus of Wells, Dimock, Muller, and Turbak, in which types are annotated with flow information. A flowtype system is useful as an interface between a owanalysis algorithm and a program optimizer. Derived systematically via our equivalence theorem, our flowtype system should be a g...
On the Cubic Bottleneck in Subtyping and Flow Analysis
, 1997
"... A variety of program analysis methods have worst case time complexity that grows cubicly in the length of the program being analyzed. Cubic complexity typically arises in control flow analyses and the inference of recursive types (including object types). It is often said that such cubic performance ..."
Abstract

Cited by 32 (6 self)
 Add to MetaCart
A variety of program analysis methods have worst case time complexity that grows cubicly in the length of the program being analyzed. Cubic complexity typically arises in control flow analyses and the inference of recursive types (including object types). It is often said that such cubic performance can not be improved because these analyses require "dynamic transitive closure". Here we prove linear time reductions from the problem of determining membership for languages defined by 2way nondeterministic pushdown automata (2NPDA) to problems of flow analysis and typability in the AmadioCardelli type system. An O(n 3 ) algorithm was given for 2NPDA acceptability in 1968 and is still the best known. The reductions are factored through the problem of "monotone closure" and we propose linear time reduction of the monotone closure as a method of establishing "monotone closure hardness" for program analysis problems. A subcubic procedure for a monotone closure hard problem would imply a ...