Results 1 - 10
of
13
On Regions and Linear Types
"... We explore how two different mechanisms for reasoning about state, linear typing and the type, region and effect discipline, complement one another in the design of a strongly typed functional programming language. The basis for our language is a simple lambda calculus containing first-class regions ..."
Abstract
-
Cited by 32 (2 self)
- Add to MetaCart
We explore how two different mechanisms for reasoning about state, linear typing and the type, region and effect discipline, complement one another in the design of a strongly typed functional programming language. The basis for our language is a simple lambda calculus containing first-class regions, which are explicitly passed as arguments to functions, returned as results and stored in user-defined data structures. In order to ensure appropriate memory safety properties, we draw upon the literature on linear type systems to help control access to and deallocation of regions. In fact, we use two different interpretations of linear types, one in which multiple-use values are freely copied and discarded and one in which multiple-use values are explicitly reference-counted, and show that both interpretations give rise to interesting invariants for manipulating regions. We also explore new programming paradigms that arise by mixing first-class regions and conventional linear data stru...
Stratified Operational Semantics for Safety and Correctness of The Region Calculus
- In Proceedings of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’01
, 2001
"... The region analysis of Tofte and Talpin is an attempt to determine statically the life span of dynamically allocated objects. But the calculus is at once intuitively simple, yet deceptively subtle, and previous theoretical analyses have been frustratingly complex: no analysis has revealed and explai ..."
Abstract
-
Cited by 22 (1 self)
- Add to MetaCart
The region analysis of Tofte and Talpin is an attempt to determine statically the life span of dynamically allocated objects. But the calculus is at once intuitively simple, yet deceptively subtle, and previous theoretical analyses have been frustratingly complex: no analysis has revealed and explained in simple terms the connection between the subtleties of the calculus and the imperative features it builds on. We present a novel approach for proving safety and correctness of a simplified version of the region calculus. We give a stratified operational semantics, composed of a high-level semantics dealing with the conceptual difficulties of effect annotations, and a low-level one with explicit operations on a region-indexed store. The main results of the paper are a proof simpler than previous ones, and a modular approach to type safety and correctness. The flexibility of this approach is demonstrated by the simplicity of the extension to the full calculus with type and region polymorphism.
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.
Syntactic Type Soundness Results for the Region Calculus
- INFORMATION AND COMPUTATION
, 2001
"... The region calculus of Tofte and Talpin is a polymorphically typed lambda calculus with annotations that make memory allocation and deallocation explicit. It is intended as an intermediate language for implementing ML without garbage collection. Static region and eect inference can be used to genera ..."
Abstract
-
Cited by 15 (5 self)
- Add to MetaCart
The region calculus of Tofte and Talpin is a polymorphically typed lambda calculus with annotations that make memory allocation and deallocation explicit. It is intended as an intermediate language for implementing ML without garbage collection. Static region and eect inference can be used to generate annotations from a given ML program. Soundness of the calculus with respect to the region and eect system is crucial to guarantee safe deallocation of regions, i.e., deallocation should only take place for objects which are provably dead. The original soundness proof by Tofte and Talpin requires a complex co-inductive safety relation. In this paper, we present two small-step operational semantics for the region calculus and prove their soundness. Following the syntactic approach of Wright, Felleisen, and Harper, we obtain simple inductive proofs. The rst semantics is store-less. It is simple and elegant and gives rise to perspicuous proofs. The second semantics provides a store-based model for the region calculus. It is slightly more complicated, but includes operations on references with destructive update. We prove (the pure fragment of) both semantics equivalent to the original evaluation-style formulation by Tofte and Talpin.
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
On Regions and Linear Types (Extended Abstract)
- In Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
, 2001
"... We explore how two different mechanisms for reasoning about state, linear typing and the type, region and effect discipline, complement one another in the design of a strongly typed functional programming language. The basis for our language is a simple lambda calculus containing first-class memory ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
We explore how two different mechanisms for reasoning about state, linear typing and the type, region and effect discipline, complement one another in the design of a strongly typed functional programming language. The basis for our language is a simple lambda calculus containing first-class memory regions, which are explicitly passed as arguments to functions, returned as results and stored in user-defined data structures. In order to ensure appropriate memory safety properties, we draw upon the literature on linear type systems to help control access to and deallocation of regions. In fact, we use two different interpretations of linear types, one in which multiple-use values are freely copied and discarded and one in which multiple-use values are explicitly reference-counted, and show that both interpretations give rise to interesting invariants for manipulating regions. We also explore new programming paradigms that arise by mixing first-class regions and conventional linear data structures.

