Results 1 -
9 of
9
Monadic regions
- In International Conference on Functional Programming
, 2004
"... Region-based type systems provide programmer control over memory management without sacrificing type-safety. However, the type systems for region-based languages, such as the ML-Kit or Cyclone, are relatively complicated, so proving their soundness is nontrivial. This paper shows that the complicati ..."
Abstract
-
Cited by 16 (1 self)
- Add to MetaCart
Region-based type systems provide programmer control over memory management without sacrificing type-safety. However, the type systems for region-based languages, such as the ML-Kit or Cyclone, are relatively complicated, so proving their soundness is nontrivial. This paper shows that the complication is in principle unnecessary. In particular, we show that plain old parametric polymorphism, as found in Haskell, is all that is needed. We substantiate this claim by giving a type- and meaning-preserving translation from a region-based language based on core Cyclone to a monadic variant of System F with region primitives whose types and operations are inspired by (and generalize) the ST monad.
A Retrospective on Region-Based Memory Management
- 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.
Garbage Collection Safety for Region-based Memory Management
- In Proceedings of the ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI’03
, 2003
"... In this paper, we prove the safety of integrating region-based memory management and Cheney-style copying garbage collection. The safety property relies on a refinement of the region typing rules that forbids dangling pointers during evaluation. To accommodate the triggering of garbage collection at ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
In this paper, we prove the safety of integrating region-based memory management and Cheney-style copying garbage collection. The safety property relies on a refinement of the region typing rules that forbids dangling pointers during evaluation. To accommodate the triggering of garbage collection at any step in the evaluation process, we base our type-safety result for the region-based system on a small-step contextual semantics and show that whenever a well-typed expression reduces to another expression, possibly by deallocating a region, then no dangling pointer is introduced. Because there are no dangling pointers in the initial heap, no dangling pointers appear during evaluation.
Polymorphic Specialization for ML
- ACM Transactions on Programming Languages and Systems
, 2002
"... We present a novel technique for offine partial evaluation of functional languages with an ML-style typing discipline. Our program specialization method comprises a polymorphic binding-time analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a binding-ti ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
We present a novel technique for offine partial evaluation of functional languages with an ML-style typing discipline. Our program specialization method comprises a polymorphic binding-time analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a binding-time analysis as a constraint analysis on top of region inference. Our insight is to regard binding times as properties of regions.
Monadic regions: Formal type soundness and correctness
, 2004
"... Drawing together two lines of research (that done in type-safe region-based memory management and that done in monadic encapsuation of effects), we give a type-preserving translation from a variation of the region calculus of Tofte and Talpin into an extension of System F augmented with monadic type ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
Drawing together two lines of research (that done in type-safe region-based memory management and that done in monadic encapsuation of effects), we give a type-preserving translation from a variation of the region calculus of Tofte and Talpin into an extension of System F augmented with monadic types and operations. Our source language is a novel region calculus, dubbed the Single Effect Calculus, in which sets of effects are specified by a single region representing an upper bound on the set. Our target language is F RGN, which provides an encapsulation operator whose parametric type ensures that regions (and values allocated therein) are neither accessible nor visible outside the appropriate scope. 1
Monadic and Substructural Type Systems for Region-Based Memory Management
- Cornell University
, 2007
"... Region-based memory management is a scheme for managing dynamically allocated data. A defining characteristic of region-based memory management is the bulk deallocation of data, which avoids both the tedium of malloc/free and the overheads of a garbage collector. Type systems for region-based memory ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Region-based memory management is a scheme for managing dynamically allocated data. A defining characteristic of region-based memory management is the bulk deallocation of data, which avoids both the tedium of malloc/free and the overheads of a garbage collector. Type systems for region-based memory manag-ment enhance the utility of this scheme by statically determining when a program is guaranteed to not perform any erroneous region operations. We describe three type systems for region-based memory management: • a type-and-effect system (à la the Tofte-Talpin region calculus); • a novel monadic type system; • a novel substructural type system. We demonstrate how to successively encode the type-and-effect system into the monadic type system and the monadic type system into the substructural type system. These type systems and encodings support the argument that the type-and-effect systems that have traditionally been used to ensure the safety of region-based memory management are neither the simplest nor the most expressive type
Bisimilarity for the region calculus
- Higher-Order and Symbolic Computation
"... Abstract. A region calculus is a programming language calculus with explicit instrumentation for memory management. Every value is annotated with a region in which it is stored and regions are allocated and deallocated in a stack-like fashion. The annotations can be statically inferred by a type and ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Abstract. A region calculus is a programming language calculus with explicit instrumentation for memory management. Every value is annotated with a region in which it is stored and regions are allocated and deallocated in a stack-like fashion. The annotations can be statically inferred by a type and effect system, making a region calculus suitable as an intermediate language for a compiler of statically typed programming languages. Although a lot of attention has been paid to type soundness properties of different flavors of region calculi, it seems that little effort has been made to develop a semantic framework. In this paper, we present a theory based on bisimulation, which serves as a coinductive proof principle for showing equivalences of polymorphically region-annotated terms. Our notion of bisimilarity is reminiscent of open bisimilarity for the π-calculus and we prove it sound and complete with respect to Morris-style contextual equivalence. As an application, we formulate a syntactic equational theory, which is used elsewhere to prove the soundness of a specializer based on region inference. We use our bisimulation framework to show that the equational theory is sound with respect to contextual equivalence.
An Equational Theory for a Region Calculus
, 2002
"... A region calculus is a polymorphically typed lambda calculus with explicit memory management primitives. Every value is annotated with a region in which it is stored. Regions are allocated and deallocated in a stack-like fashion. The annotations can be statically inferred by a type and eect syst ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
A region calculus is a polymorphically typed lambda calculus with explicit memory management primitives. Every value is annotated with a region in which it is stored. Regions are allocated and deallocated in a stack-like fashion. The annotations can be statically inferred by a type and eect system, making a region calculus suitable as an intermediate language for a compiler of statically typed programming languages.
Region-Based Memory Management for a Dynamically-Typed Language
"... Abstract. Region-based memory management scheme has been proposed for programming language ML. In this scheme, a compiler statically estimates the live range of each object by performing an extension of type inference (called region inference) and inserts code for memory allocation and deallocation. ..."
Abstract
- Add to MetaCart
Abstract. Region-based memory management scheme has been proposed for programming language ML. In this scheme, a compiler statically estimates the live range of each object by performing an extension of type inference (called region inference) and inserts code for memory allocation and deallocation. Advantages of this scheme are that memory objects can be deallocated safely (unlike with manual memory management using malloc/free) and often earlier than with run-time garbage collection. Since the region inference is an extension of the ML type inference, however, it was not clear whether the region-based memory management was applicable to dynamically-typed programming languages like Scheme. In this paper, we show that the region-based memory management can be applied to dynamically-typed languages by combining region inference and Cartwright et al.’s soft type system. 1

