Syntactic Type Soundness Results for the Region Calculus |
| |
Authors: | Cristiano Calcagno Simon Helsen Peter Thiemann |
| |
Affiliation: | a Queen Mary University of London, England and DISI, University of Genova, Italy;Institut für Informatik, Universität Freiburg, Germanyf1 |
| |
Abstract: | 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 Hindley-Milner typed functional languages such as ML without traditional trace-based garbage collection. Static region and effect inference can be used to annotate a statically typed ML program with memory management primitives. Soundness of the calculus with respect to the region and effect 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 type soundness with respect to the region and effect system. Following the standard syntactic approach of Wright, Felleisen, and Harper, we obtain simple inductive proofs. The first 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. Albeit slightly more complicated, its additional expressiveness allows us to model operations on references with destructive update. A pure fragment of both small-step semantics is then proven equivalent to the original big-step operational approach of Tofte and Talpin. This leads to an alternative soundness proof for their evaluation-style formulation. |
| |
Keywords: | Abbreviations: operational semanticsAbbreviations: region calculusAbbreviations: type soundness |
本文献已被 ScienceDirect 等数据库收录! |
|