Compile-time garbage collection for a pure declarative logic programming language (Mercury)
By Nancy Mazur, K.U.Leuven
Tuesday March 26, 2002 at 14h00 in Celestijnenlaan 200A, room 03.14(Cafetaria)
AbstractPure declarative languages are single-assignment languages: once given a ground value to a variable, it may not be altered. The benefit is referential transparency, the cost is large memory usage. Many techniques have been introduced to limit this cost. The most popular ones include careful programming using special purpose language constructs (difference lists, monads, or other special built-ins) and specific run-time management systems. None of these are ideal. Within the declarative setting a programmer should not be paying attention to such low-level procedural aspects as memory management and the drawback of runtime garbage collection (RTGC) is the runtime overhead it introduces to collect unreferenced memory. A third, less researched technique, is compile-time garbage collection (CTGC) where garbage is automatically detected and recycled at compile-time, producing code with an (hopefully) acceptable memory footprint. The effect is that it relieves the programmer from the responsability of memory management, and less run-time garbage collection interventions should be needed. In this work we studied compile-time garbage collection based on abstract interpretation in the context of the pure declarative language Mercury. The talk will present how this work evolved, what the current status is, and what needs to be done in the near future to obtain a theoretically correct, usable and effective compile-time garbage collection system.