Type-preserving garbage collectors

By combining existing type systems with standard type-based compilation techniques, we describe how to write strongly typed programs that include a function that acts as a t racing garbage collector for the program. Since the garbage collector is an explicit function, we do not need to provide a t rusted garbage collector as a runtime service to manage memory.Since our language is strongly typed, the standard type soundness guarantee "Well typed programs do not go wrong" is extended to include the collector. Our type safety guarantee is non-trivial since not only does it guarantee the type safety of the garbage collector, but it guarantees that the collector preservers the type safety of the program being garbage collected. We describe the technique in detail and report performance measurements for a few microbench-marks as well as sketch the proofs of type soundness for our system.

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

[2]  Zhong Shao,et al.  Principled scavenging , 2001, PLDI '01.

[3]  Henry G. Baker,et al.  The Boyer benchmark meets linear logic , 1993, LIPO.

[4]  Hans-Juergen Boehm Simple garbage-collector-safety , 1996, PLDI '96.

[5]  Amer Diwan,et al.  Compiler support for garbage collection in a statically typed language , 1992, PLDI '92.

[6]  William M. Waite,et al.  An efficient machine-independent procedure for garbage collection in various list structures , 1967, CACM.

[7]  Karl Crary,et al.  Intensional polymorphism in type-erasure semantics , 1998, ICFP '98.

[8]  Anindya Banerjee,et al.  Region analysis and the polymorphic lambda calculus , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[9]  Henry G. Baker,et al.  Lively linear Lisp: “look ma, no garbage!” , 1992, SIGP.

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

[11]  Andrew W. Appel,et al.  Efficient and safe-for-space closure conversion , 2000, TOPL.

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

[13]  Alexander Aiken,et al.  Better static memory management: improving region-based analysis of higher-order languages , 1995, PLDI '95.

[14]  Jeffrey Mark Siskind,et al.  Flow-Directed Lightweight Closure Conversion , 2000 .

[15]  David Walker,et al.  Alias Types for Recursive Data Structures (Extended Version) , 2000 .

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

[17]  Matthias Felleisen,et al.  Abstract models of memory management , 1995, FPCA '95.

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

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

[20]  David Gay,et al.  Memory management with explicit regions , 1998, PLDI.

[21]  James Gosling,et al.  Java Intermediate Bytecode , 1995, Intermediate Representations Workshop.

[22]  Daniel P. Friedman,et al.  Recycling continuations , 1998, ICFP '98.

[23]  James Gosling,et al.  Java Intermediate Bytecode , 1995, Intermediate Representations Workshop.

[24]  Andrew W. Appel,et al.  Empirical and Analytic Study of Stack Versus Heap Cost for Languages with Closures , 1996, J. Funct. Program..

[25]  GoslingJames Java intermediate bytecodes , 1995 .

[26]  Henry G. Baker,et al.  The treadmill: real-time garbage collection without motion sickness , 1992, SIGP.

[27]  Philip Wadler,et al.  How to make ad-hoc polymorphism less ad hoc , 1989, POPL '89.