| M. Tofte and J.-P. Talpin. Implementing the call-byvalue lambda-calculus using a stack of regions. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 188--201, 1994. |
....to force a garbage collection, and the garbage collector can be told not to run unless absolutely necessary. Still, for critical real time programs, Java is not recommended. 1. 3 Region based memory management In 1994 Tofte and Talpin suggested a radically dioeerent method of memory management in [TT94], and this scheme was subsequently used in an implementation of ML: The ML Kit. This is described in [TT97] and [TBE 97] The technique is called region based memory management. Unlike garbage collection techniques, it has the major advantage that it does not require a complex and ineOEcient ....
....in this thesis would be useful for making region based versions of any object oriented, imperative language. We expect the reader of thesis to be familiar with Java (or at least object oriented languages in general) and at least somewhat acquainted with the region based model as presented in [TT97, TT94, TBE 97]. Region Based Model In this chapter we present our region based model for implementing Java with regions. We focus on a small language subset of Java and present a rigorous study of this subset with respect to the model. First, we derive our language subset from Java. This language is then ....
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, January 1994.
....values the region contains will never be accessed. Early purveyors of these ideas include Baker [13] Lucassen and Gifford [132] and Talpin and Jouvelet [184] but their use has been pushed to a practical level in the ML Kit which provides a Standard ML implementation without garbage collection [187, 188, 19]. The underlying inference algorithm, which is based on Hindley Milner type inference [139] has been described in painful detail [186] and can be improved using set based constraints [9] One of the key features of the regions calculus is that it allows dangling pointers into deallocated memory ....
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambdacalculus using a stack of regions. In Proceedings of the 21st ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pages 188-- 201. ACM Press, January 1994.
....programs [5, 8, 9] However, it is still as error prone and unsafe as the traditional C like malloc free framework. In particular, it is still hard to verify that a program does not contain space leaks and does not deallocate a region before the last use of data allocated in it. Tofte and Talpin [15] introduced a region inference system The order of authors on this paper carries no significance. Final version. To appear at PPDP, Firenze, Italy, September 2001. Copyright assigned to ACM. and algorithm that inserts region based deallocation operations automatically, eliminating the ....
....the original program s expression structure. The original inspiration for Tofte and Talpin s region calculus came from work on effect systems [4, 12] Recent research shows how such systems can be represented in the monadic lambda calculus [17, 10] The TT system is efficient for smaller programs [15], but requires a number of extra analyses to give reasonable behavior for larger programs [2] The problem is that in practice object lifetimes do not follow a stack discipline. In the ML Kit [13] a compiler for Standard ML using region based memory management, a storage mode analysis is used to ....
[Article contains additional citation context not shown here]
M. Tofte and J.-P. Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Principles of Programming Languages (POPL), pages 188--201, 1994.
....14, 1996 3 1 Introduction Functional languages like Standard ML [12, 11] normally use a garbage collector to reclaim some of the unused memory. Another approach is to use a region based memory management scheme where allocation and deallocation of regions should give a more eager reuse of memory [23, 21, 22]. Region Inference is a static analysis which only gives an approximation of the dynamic memory behaviour of the program. In some cases the analysis gives a bad approximation and memory allocations which could be local are treated as global allocations with the result that memory is not eagerly ....
....overview of profiling in the ML Kit. We assume that the reader is acquainted with Standard ML [12, 11] and the notation used in the typed call by value lambda calculus. It should not be necessary to be well of in the theory of region inference but more information on the theory can be found in [21, 23, 22, 2]. We will often refer to [7] because it contains a detailed description of how region inference is implemented in the ML Kit. Implementational details of the ML Kit can be found in [10, 5, 6] Experience with the ML Kit is reported in [4, 23] 1 This report is based on the ML Kit with Regions ....
[Article contains additional citation context not shown here]
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188--201. ACM Press, January 1994.
....by integrating a simple e ect analysis. It is, however, easy to extend our method to deal with e ects, as mentioned above. We think that it is preferable to keep a type system for e ect analysis and that for UVE separate, because complex type systems such as subtyping and polymorphic recursion [27] are necessary for precise analysis of e ects, while simpler type systems suce for UVE. Fischbach and Hannan s method does not deal with tuples and polymorphism. 6.3 Other Related Work Deadcode elimination. As mentioned above, Damiani et al. 1; 2] treated a slightly di erent problem: to replace ....
M. Tofte and J.-P. Talpin. Implementing the call-byvalue lambda-calculus using a stack of regions. In Proc. of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 188-201, 1994.
....features of the core ML: records, datatype declarations, references, and exceptions. Polymorphism on types and uses is based on the let polymorphism discussed in Section 6. 31 Polymorphic recursion on uses would be sound (just as polymorphic recursion on regions is sound in the region inference [19]) but it is not supported currently. That is because the algorithm would become complex and also because the polymorphic recursion does not seem so crucial for our analysis. The current system has the following limitations. It produces the least use annotation, not the best one (see Section 5) ....
....as real 1 2 1 real 0 in one place and as real 0 2 1 real 1 in another place, both uses are coerced to real 1 2 1 real 1 and the total use was counted as real 2 real . 8. 2 Region inference There is an alternative approach to static memory management: region inference [5, 19]. The region inference abstracts a bunch of memory addresses as a region, and estimates its life time by performing a kind of type inference. The region inference infers, in addition to the usual type information, which region each expression may access, and automatically inserts allocation and ....
[Article contains additional citation context not shown here]
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 188--201, 1994.
.... in the uses to which e#ects have been put: collecting the set of procedures or functions called [41] collecting the set of storage cells written or read during execution [40] determining what exceptions can be raised during evaluation, and collecting the regions in which evaluation takes place [44] to mention just a few. We begin by considering an analysis for collecting the set of storage cells written or read during execution. Example 4. Adding Imperative Constructs. To facilitate the side e#ect analysis we shall add imperative constructs (resembling those of Standard ML) for creating ....
....using polymorphic recursion for the e#ects annotating the ordinary and possibly polymorphic types given to recursive functions. In this way, distinct uses of a recursive function inside its body can still be analysed in di#erent ways. This approach is taken in an analysis known as region inference [44] that is used when implementing functional languages in a stack based regime rather than a heap based regime. More precisely, the memory model is a stack of regions of data items, and the analysis facilitates determining at compile time in which region to allocate data and when to deallocate a ....
[Article contains additional citation context not shown here]
M. Tofte and J.-P. Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proc. POPL '94, pages 188--201. ACM Press, 1994.
....in [3] In a system with a good garbage collection, this kind of compile time GC is probably not worth the effort. However, if the typing rules are modified to handle a call by value language (essentially eliminating the uses of ) the analysis can be used in conjunction with region inference [9]. Experience with the ML kit with regions [8] shows that a common space leak is when a function takes apart a constructor and builds a new constructor of the same type in the same region, causing this region to grow. If the analysis can detect that the original constructor is not used again, the ....
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambdacalculus using a stack of regions. In Proceedings of the 21st ACM SIGPLANSIGACT Symposium on Principles of Programming Languages. ACM Press, January 1994.
....full features of the core ML: records, datatype declarations, references, and exceptions. Polymorphism on types and uses is based on the let polymorphism discussed in Section 6. Polymorphic recursion on uses would be sound (just as polymorphic recursion on regions is sound in the region inference [19]) but it is not supported currently. That is because the algorithm would become complex and also because the polymorphic recursion does not seem so critical for our analysis. The current system has the following limitations. It produces the least use annotation, not the best one (see Section 5) ....
....1 real 1 list 1 filter (int ; bool) 2 1 int list (int ; bool) 2 1 int list 1 (int ffi; bool) 2 ffi int list ffi Table 2: Comparison with previous linear type systems 8. 2 Region inference There is an alternative approach to static memory management: region inference [19, 5]. The region inference abstracts a bunch of memory addresses as a region, and estimates its life time by performing a kind of type inference. The region inference infers, in addition to the usual type information, which region each expression may access, and automatically inserts allocation and ....
[Article contains additional citation context not shown here]
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 188--201, 1994.
....first region to be deallocated. Each region may grow upwards. Uniformity. The garbage collector uses a fixed strategy for all user programs, although some garbage collection algorithms rely on heuristics about common memory behaviour of programs (e.g. 15] Region based memory management [20, 3, 21, 17] attempts to achieve both the predictability and e#ciency of the stack discipline and the flexibility and safety of automatic heap management. Conceptually, the store is organised as a stack of regions, see Figure 1. Allocation and deallocation directives of regions are inserted into the program ....
....discipline and the flexibility and safety of automatic heap management. Conceptually, the store is organised as a stack of regions, see Figure 1. Allocation and deallocation directives of regions are inserted into the program at compile time, based on a program analysis called region inference [20, 3]. Value creating expressions are annotated with information that directs in what region values go at runtime. Moreover, if e is some region annotated expression, then so is letregion r in e end Expressions of this form are evaluated as follows. First a region is allocated on top of the stack and ....
[Article contains additional citation context not shown here]
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188--201. ACM Press, January 1994.
....resort to simply running the program on different input values to see what happens. It is difficult for a programmer who has no way of asserting or checking lifetimes of values to avoid that the garbage collector hangs on to values which are actually not needed. Region based memory management [16,2,17] offers an alternative to the above memory management disciplines. At runtime, all values are stored in a socalled stack of regions, see Figure 1. All values, including function closures and values of recursive types (such as lists and trees) are stored in regions. Every region can grow ....
....which are different from the formal region parameters ae 1 ; ae k . Region based memory management has been implemented in The ML Kit with Regions [15] a compiler for Standard ML which uses regions as its sole form of memory management. 1. 2 Region Inference Rules Tofte and Talpin [16] introduced region inference not as an algorithm, but as a set of inference rules in the style of type inference rules. Region inference is based on earlier work on effects and (a different notion of) regions [13,3,6] In particular, we use effects for determining the lifetime of values. As a ....
[Article contains additional citation context not shown here]
M. Tofte and J-P. Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188--201. ACM Press, January 1994.
....decisions about where to allocate and deallocate regions are made statically, by region inference; furthermore, for every value producing expression, region inference decides into which region the value is to be put. Region Inference has been developed for the typed call by value lambda calculus [Tofte and Talpin 1994; 1997] and it is used in the ML Kit with Regions [Tofte et al. 1997] a compiler from Standard ML [Milner et al. 1997] to HP PA RISC assembly code. There are several reasons why region inference is attractive. First, region inference restores the coupling of allocation and deallocation; after ....
....this scheme for the ML Kit. In order to use regions e#ectively, one has to understand the region inference rules. Here it is important to distinguish between the specification and the implementation of region inference. The specification of region inference is a set of formal inference rules [Tofte and Talpin 1994; 1997] which admit many di#erent results of the analysis. Indeed, the rules permit putting all values in one global region which is never deallocated. The soundness of these rules with respect to a dynamic semantics is proved in Tofte and Talpin [1997] An implementation of region inference is an ....
[Article contains additional citation context not shown here]
Tofte, M. and Talpin, J.-P. 1994. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, 188--201.
....the strict separation between allocation and de allocation means that there is no language support for reasoning about the lifetimes of storage cells, and thus it is in general very difficult for programmers to reason about how much memory their programs will use. Region based memory management[23, 1, 2] is yet a form of automatic management of dynamic allocation. Conceptually, the store consists of a stack of regions. A region can be thought of as a heap which can grow dynamically depending on how many values it needs to hold. Regions are allocated and de allocated in a stack like manner, i.e. ....
....noteworthy when one considers that the ML Kit boxes all tuples, including the tuples of region variables that are passed to region polymorphic functions; that is what regions ae 16 , ae 22 and ae 27 are used for. 3 Related Work The basic ideas of the region inference scheme are described in [23]. An extended version, including a proof that the region inference rules are sound, may be found in [24] Other analysis which have been combined with region inference are described in [1, 2] The emphasis of this paper is on using unification to constrain region variables and arrow effects. ....
[Article contains additional citation context not shown here]
M. Tofte and J.-P. Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188--201. ACM Press, January 1994.
No context found.
M. Tofte and J.-P. Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188--201. ACM Press, January 1994.
....a new region based ML compiler is compared to the performance of Standard ML of New Jersey, a state of the art ML compiler. 1 Introduction It has been suggested that programming languages which are based on typed call by value lambda calculus can be implemented using regions for memory management[17]. At runtime, the store consists of a stack of regions. All values, including function closures, are put into regions. Region inference, a refinement of Milner s polymorphic type discipline, is used for inferring where regions can be allocated and where they can be deallocated. For each expression ....
....region inference also infers a region in which the value should be put. Experiments with a proto type implementation of region inference and an instrumented interpreter have suggested that often it is possible to achieve very economical use of memory resources, even without garbage collection[17]. The potential benefits of region inference are: Work done while at University of Copenhagen. Current address: School of Computer Science, Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh, PA 15213, USA; email: birkedal cs.cmu.edu. y Address: Department of Computer Science (DIKU) ....
[Article contains additional citation context not shown here]
Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188--201. ACM Press, January 1994.
No context found.
M. Tofte and J.-P. Talpin. Implementing the call-byvalue lambda-calculus using a stack of regions. In Proceedings of ACM SIGPLAN/SIGACT Symposium on Principles of Programming Languages, pages 188--201, 1994.
No context found.
M. Tofte and J.-P. Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proc. POPL'94, pages 188--201, 1994.
No context found.
M. Tofte and J.-P. Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Principles of Programming Languages (POPL), pages 188--201, 1994.
No context found.
M. Tofte and J-P. Talpin, Implementing the call-by-value lambda-calculus using a stack of regions. in "Proc. POPL'94," pp. 188--201, 1994.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC