• Documents
  • Authors
  • Tables
  • Other Seers ▼
    RefSeer AckSeer CollabSeer SeerSeer
  • Log in
  • Sign up
  • MetaCart

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

A theory of stack allocation in polymorphically typed languages (1993)

by M Tofte, J-P Talpin
Add To MetaCart

Tools

Sorted by:
Results 1 - 10 of 20
Next 10 →

Region-Based Memory Management

by Mads Tofte, Jean-Pierre Talpin , 1997
"... This paper describes a memory management discipline for programs that perform dynamic memory allocation and de-allocation. At runtime, all values are put into regions. The store consists of a stack of regions. All points of region allocation and deallocation are inferred automatically, using a type ..."
Abstract - Cited by 268 (8 self) - Add to MetaCart
This paper describes a memory management discipline for programs that perform dynamic memory allocation and de-allocation. At runtime, all values are put into regions. The store consists of a stack of regions. All points of region allocation and deallocation are inferred automatically, using a type and effect based program analysis. The scheme does not assume the presence of a garbage collector. The scheme was first presented by Tofte and Talpin (1994); subsequently, it has been tested in The ML Kit with Regions, a region-based, garbage-collection free implementation of the Standard ML Core language, which includes recursive datatypes, higher-order functions and updatable references (Birkedal et al. 96, Elsman and Hallenberg 95). This paper defines a region-based dynamic semantics for a skeletal programming language extracted from Standard ML. We present the inference system which specifies where regions can be allocated and de-allocated and a detailed proof that the system is sound wi...

Escape Analysis for Object Oriented Languages. Application to Java

by Bruno Blanchet - IN PROCEEDINGS OF THE 14TH ANNUAL CONFERENCE ON OBJECT-ORIENTED PROGRAMMING SYSTEMS, LANGUAGES AND APPLICATIONS , 1999
"... Escape analysis [27, 14, 5] is a static analysis that determines whether the lifetime of data exceeds its static scope. The main originality of our escape analysis is that it determines precisely the effect of assignments, which is necessary to apply it to object oriented languages with promising r ..."
Abstract - Cited by 89 (1 self) - Add to MetaCart
Escape analysis [27, 14, 5] is a static analysis that determines whether the lifetime of data exceeds its static scope. The main originality of our escape analysis is that it determines precisely the effect of assignments, which is necessary to apply it to object oriented languages with promising results, whereas previous work [27, 14, 5] applied it to functional languages and were very imprecise on assignments. Our implementation analyses the full Java TM Language. We have applied our analysis to stack allocation and synchronization elimination. We manage to stack allocate 13% to 95% of data, eliminate more than 20% of synchronizations on most programs (94% and 99% on two examples) and get up to 44% speedup (21% on average). Our detailed experimental study on large programs shows that the improvement comes more from the decrease of the garbage collection and allocation times than from improvements on data locality [7], contrary to what happened for ML [5].

Generational Stack Collection and Profile-Driven Pretenuring

by Perry Cheng, Robert Harper, Peter Lee , 1998
"... This paper presents two techniques for improving garbage collection performance: generational stack collection and profile-driven pretenuring. The first is applicable to stackbased implementations of functional languages while the second is useful for any generational collector. We have implemented ..."
Abstract - Cited by 60 (3 self) - Add to MetaCart
This paper presents two techniques for improving garbage collection performance: generational stack collection and profile-driven pretenuring. The first is applicable to stackbased implementations of functional languages while the second is useful for any generational collector. We have implemented both techniques in a generational collector used by the TIL compiler (Tarditi, Morrisett, Cheng, Stone, Harper, and Lee 1996), and have observed decreases in garbage collection times of as much as 70% and 30%, respectively. Functional languages encourage the use of recursion which can lead to a long chain of activation records. When a collection occurs, these activation records must be scanned for roots. We show that scanning many activation records can take so long as to become the dominant cost of garbage collection. However, most deep stacks unwind very infrequently, so most of the root information obtained from the stack remains unchanged across successive garbage collections. Generatio...

Escape Analysis: Correctness Proof, Implementation and Experimental Results

by Bruno Blanchet - In Conference Record of the 25th Annual ACM Symposium on Principles of Programming Languages , 1998
"... We describe an escape analysis [32, 14], used to determine whether the lifetime of data exceeds its static scope. We give a new correctness proof starting directly from a semantics. Contrary to previous proofs, it takes into account all the features of functional languages, including imperative fea ..."
Abstract - Cited by 59 (2 self) - Add to MetaCart
We describe an escape analysis [32, 14], used to determine whether the lifetime of data exceeds its static scope. We give a new correctness proof starting directly from a semantics. Contrary to previous proofs, it takes into account all the features of functional languages, including imperative features and polymorphism. The analysis has been designed so that it can be implemented under the small complexity bound of O(n log 2 n) where n is the size of the analyzed program. We have included it in the Caml Special Light compiler (an implementation of ML), and applied it to very large programs. We plan to apply these techniques to the Java programming language. Escape analysis has been applied to stack allocation. We improve the optimization technique by determining minimal lifetime for stack allocated data, and using inlining. We manage to stack allocate 25% of data in the theorem prover Coq. We analyzed the effect of this optimization, and noticed that its main effect is to improve ...

Implementation of the typed call-by-value λ-calculus using a stack of regions

by Mads Tofte - In ACM Symposium on Principles of Programming Languages , 1994
"... We present a translation scheme for the polymorphically typed call-by-value λ-calculus. All runtime values, including function closures, are put into regions. The store consists of a stack of regions. Region inference and effect inference are used to infer where regions can be allocated and de-alloc ..."
Abstract - Cited by 53 (0 self) - Add to MetaCart
We present a translation scheme for the polymorphically typed call-by-value λ-calculus. All runtime values, including function closures, are put into regions. The store consists of a stack of regions. Region inference and effect inference are used to infer where regions can be allocated and de-allocated. Recursive functions are handled using a limited form of polymorphic recursion. The translation is proved correct with respect to a store semantics, which models a regionbased run-time system. Experimental results suggest that regions tend to be small, that region allocation is frequent and that overall memory demands are usually modest, even without garbage collection. 1

Combining Region Inference and Garbage Collection

by Niels Hallenberg, Martin Elsman, Mads Tofte , 2002
"... This paper describes a memory discipline that combines region-based memory management and copying garbage collection by extending Cheney's copying garbage collection algorithm to work with regions. The paper presents empirical evidence that region inference very significantly reduces the number of g ..."
Abstract - Cited by 40 (2 self) - Add to MetaCart
This paper describes a memory discipline that combines region-based memory management and copying garbage collection by extending Cheney's copying garbage collection algorithm to work with regions. The paper presents empirical evidence that region inference very significantly reduces the number of garbage collections; and evidence that the fastest execution is obtained by using regions alone, without garbage collection.

Monadic Encapsulation in ML

by Miley Semmelroth, Amr Sabry - In Proceedings of the 4th ACM SIGPLAN International Conference on Functional Programming (ICFP’99 , 1999
"... In a programming language with procedures and assignments, it is often important to isolate uses of state to particular program fragments. The frameworks of type, region, and effect inference, and monadic state are technologies that have been used to state and enforce the property that an expression ..."
Abstract - Cited by 15 (2 self) - Add to MetaCart
In a programming language with procedures and assignments, it is often important to isolate uses of state to particular program fragments. The frameworks of type, region, and effect inference, and monadic state are technologies that have been used to state and enforce the property that an expression has no visible side-effects. This property has been exploited to justify the deallocation of memory regions despite the presence of dangling pointers. Starting from an idea developed in the context of monadic state in Haskell, we develop an ML-like language with full assignments and an operator that enforces the encapsulation of effects. Using this language, we formalize and prove the folklore connection between effect masking and monadic encapsulation. Then, by employing a novel set of reductions to deal with dangling pointers, we establish the soundness of the type-based encapsulation with a proof based on a standard subject reduction argument. 1 Introduction Two of the recurring theme...

A Retrospective on Region-Based Memory Management

by Mads Tofte, Lars Birkedal, Martin Elsman, Niels Hallenberg - Higher-Order and Symbolic Computation Journal , 2004
"... We report on our experience with designing, implementing, proving correct, and evaluating a region-based memory management system. ..."
Abstract - Cited by 10 (0 self) - Add to MetaCart
We report on our experience with designing, implementing, proving correct, and evaluating a region-based memory management system.

An Optimizing Backend for the ML Kit Using a Stack of Regions

by Martin Elsman, Niels Hallenberg , 1995
"... Recent research has shown that static memory management is a promising alternative to runtime garbage collection in higher order functional programming languages. Region inference determines where in a program memory can be allocated and deallocated in a stack like manner. We present an optimizing b ..."
Abstract - Cited by 9 (5 self) - Add to MetaCart
Recent research has shown that static memory management is a promising alternative to runtime garbage collection in higher order functional programming languages. Region inference determines where in a program memory can be allocated and deallocated in a stack like manner. We present an optimizing backend for the ML Kit compiler building on region inference. As intermediate representation we use nested basic blocks. This representation allows optimizing transformations such as copy propagation, dead code elimination and register allocation to be more precise than if conventional flat basic blocks were used. We have implemented a code generator for the HPPA RISC architecture and experiments show that we in some cases generate faster code than the Standard ML of New Jersey compiler. In general, experiments show that the region based ML Kit compiler, when using our optimizing backend is comparable to the Standard ML of New Jersey compiler, not only regarding memory usage but also regarding execution time. 1

Combining Garbage Collection and Region Inference in The ML Kit

by Niels Hallenberg , 1999
"... Machine ...................... 148 9.1.1 Grammar for KAM .................... 149 9.2 Code Generation ......................... 151 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 Constants and Access Types .............. 151 Allocation Points ..................... 152 Set Storage Modes .................. ..."
Abstract - Cited by 7 (4 self) - Add to MetaCart
Machine ...................... 148 9.1.1 Grammar for KAM .................... 149 9.2 Code Generation ......................... 151 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 Constants and Access Types .............. 151 Allocation Points ..................... 152 Set Storage Modes .................... 155 Call Convention ..................... 156 Functions ......................... 158 Applications ....................... 159 III The Garbage Collector 167 10 Basic Garbage Collection Algorithms 168 10.1 Fundamentals ........................... 168 10.2 Reference Counting ........................ 170 10.3 Mark-Sweep Collection ..................... 173 10.4 Mark-Compact Collection .................... 174 10.5 Copying Garbage Collection ................... 177 10.5.1 Simple Stop and Copy .................. 178 10.5.2 Cheneys Algorithm ................... 182 10.5.3 Generational Garbage Collection ............ 184 10.6 Comparing The Algorithms ................... 185 11 Garbage Collection of Regions. 188 11.1 Algorithm Using Recursion ................... 188 11.2 Cheneys Algorithm and Regions ................ 189 11.2.1 A Stack of Values .................... 191 11.2.2 A Stack of Regions .................... 191 11.3 A Revised Region and Region Page Descriptor ........ 194 11.4 The Garbage Collection Algorithm ............... 195 11.5 Finite Regions .......................... 197 11.5.1 Recursive Data Structures ................ 198 11.6 Garbage Collect a Few Regions Only .............. 199 11.7 Using Only One Global Region ................. 201 11.8 When to Increase The Heap ................... 201 12 Data Representation 203 12.1 Scalar and Pointer Records ................... 204 12.2 Tagging Objects ......................... 205 12.3 Eliminating Fragmented Objects .........
The National Science Foundation
  • About CiteSeerX
  • Submit Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2010 The Pennsylvania State University