On regions and linear types

Citation
D. Walker et K. Watkins, On regions and linear types, ACM SIGPL N, 36(10), 2001, pp. 181-192
Citations number
34
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
36
Issue
10
Year of publication
2001
Pages
181 - 192
Database
ISI
SICI code
1523-2867(200110)36:10<181:ORALT>2.0.ZU;2-8
Abstract
We explore how two different mechanisms for reasoning about state, linear t yping 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 app ropriate memory safety properties, we draw upon the literature on linear ty pe 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 v alues are explicitly reference-counted, and show that both interpretations give rise to interesting invariants for manipulating regions. We also explo re new programming paradigms that arise by mixing first-class regions and c onventional linear data structures.