A type theory for memory allocation and data layout

Ordered type theory is an extension of linear type theory in which variables in the context may be neither dropped nor re-ordered. This restriction gives rise to a natural notion of adjacency. We show that a language based on ordered types can use this property to give an exact account of the layout of data in memory. The fuse constructor from ordered logic describes adjacency of values in memory, and the mobility modal describes pointers into the heap. We choose a particular allocation model based on a common implementation scheme for copying garbage collection and show how this permits us to separate out the allocation and initialization of memory locations in such a way as to account for optimizations such as the coalescing of multiple calls to the allocator.

[1]  Yasuhiko Minamide,et al.  A functional representation of data structures with a hole , 1998, POPL '98.

[2]  Naoki Kobayashi Quasi-linear types , 1999, POPL '99.

[3]  Dan Grossman,et al.  TALx86: A Realistic Typed Assembly Language∗ , 1999 .

[4]  David Walker,et al.  Alias Types , 2000, ESOP.

[5]  Frank Pfenning,et al.  A type theory for memory allocation and data layout , 2003, POPL '03.

[6]  Peter Lee,et al.  TIL: a type-directed, optimizing compiler for ML , 2004, SIGP.

[7]  Philip Wadler,et al.  Operational Interpretations of Linear Logic , 1999, Theor. Comput. Sci..

[8]  George C. Necula,et al.  A certifying compiler for Java , 2000, PLDI '00.

[9]  Frank Pfenning,et al.  Natural Deduction for Intuitionistic Non-communicative Linear Logic , 1999, TLCA.

[10]  Carl A. Gunter,et al.  Proving memory management invariants for a language based on linear logic , 1992, LFP '92.

[11]  ScienceYale UniversityNew Haven An Overview of the Flint/ml Compiler , 1997 .

[12]  Frank Pfenning,et al.  A judgmental reconstruction of modal logic , 2001, Mathematical Structures in Computer Science.

[13]  Karl Crary,et al.  Flexible type analysis , 1999, ICFP '99.

[14]  Karl Crary,et al.  Type Structure for Low-Level Programming Languages , 1999, ICALP.

[15]  George C. Necula,et al.  The design and implementation of a certifying compiler , 1998, PLDI.

[16]  Frank Pfenning,et al.  Relating Natural Deduction and Sequent Calculus for Intuitionistic Non-Commutative Linear Logic , 1999, MFPS.

[17]  David B. MacQueen,et al.  The Definition of Standard ML (Revised) , 1997 .

[18]  Jeff Polakow,et al.  Ordered linear logic and applications , 2001 .

[19]  Naoki Kobayashi,et al.  Garbage Collection Based on a Linear Type System , 2000 .

[20]  David Walker,et al.  Alias Types for Recursive Data Structures , 2000, Types in Compilation.

[21]  Robert Harper,et al.  Semantics of memory management for polymorphic languages , 1999 .

[22]  Frank Pfenning,et al.  Properties of Terms in Continuation-Passing Style in an Ordered Logical Framework , 2000 .

[23]  Carl A. Gunter,et al.  Reference counting as a computational interpretation of linear logic , 1996, Journal of Functional Programming.

[24]  James Cheney,et al.  Cyclone: A Safe Dialect of C , 2002, USENIX Annual Technical Conference, General Track.

[25]  Frank Pfenning,et al.  Eliminating array bound checking through dependent types , 1998, PLDI.