Principled scavenging

Proof-carrying code and typed assembly languages aim to minimize the trusted computing base by directly certifying the actual machine code. Unfortunately, these systems cannot get rid of the dependency on a trusted garbage collector. Indeed, constructing a provably type-safe garbage collector is one of the major open problems in the area of certifying compilation. Building on an idea by Wang and Appel, we present a series of new techniques for writing type-safe stop-and-copy garbage collectors. We show how to use intensional type analysis to capture the contract between the mutator and the collector, and how the same method can be applied to support forwarding pointers and generations. Unlike Wang and Appel (which requires whole-program analysis), our new framework directly supports higher-order funtions and is compatible with separate compilation; our collectors are written in provably type-safe languages with rigorous semantics and fully formalized soundness proofs.

[1]  Robert Harper,et al.  Typed closure conversion , 1996, POPL '96.

[2]  Robert Harper,et al.  Typed Closure Conversion for Recursively-Defined Functions , 1997, Electron. Notes Theor. Comput. Sci..

[3]  Scott Nettles,et al.  Real-time replication garbage collection , 1993, PLDI '93.

[4]  MorrisettGreg,et al.  Intensional polymorphism in type-erasure semantics , 1998, ICFP '98.

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

[6]  Andrew W. Appel,et al.  Type-preserving garbage collectors , 2001, POPL '01.

[7]  Zhong Shao,et al.  Implementing typed intermediate languages , 1998, ICFP '98.

[8]  Guy E. Blelloch,et al.  On Bounding Time and Space for Multiprocessor Garbage Collection , 1999, PLDI.

[9]  Karl Crary,et al.  Intensional polymorphism in type-erasure semantics , 2002, J. Funct. Program..

[10]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

[11]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

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

[13]  Mads Tofte,et al.  Implementation of the typed call-by-value λ-calculus using a stack of regions , 1994, POPL '94.

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

[15]  David Walker,et al.  Typed memory management in a calculus of capabilities , 1999, POPL '99.

[16]  Andrew P. Tolmach,et al.  From ML to Ada: Strongly-typed language interoperability via source translation , 1998, Journal of Functional Programming.

[17]  Robert Harper,et al.  Compiling polymorphism using intensional type analysis , 1995, POPL '95.

[18]  Olivier Danvy,et al.  Representing Control: a Study of the CPS Transformation , 1992, Mathematical Structures in Computer Science.

[19]  Zhong Shao,et al.  Fully reflexive intensional type analysis , 2000, ICFP '00.