Syntactic type soundness results for the region calculus

  • Authors:
  • Christiano Calcagno;Simon Helsen;Peter Thiermann

  • Affiliations:
  • Univ. of Genova, Italy;Univ. Freiburg, Germany;Univ. Freiburg, Germany

  • Venue:
  • Information and Computation
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

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 probably dead. The original soundness proof by Tofte and Taplin required a complex co-inductive safety relation. In this paper, we present two small-stop 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 t Tofte and Taplin. This leads to an n alternative soundness proof for their evaluation-style formulation.