An automaton-driven frame disposal algorithm and its proof of correctness

  • M. Satpathy
  • A. Sanyal
  • G. Venkatesh
Knowledge Representation and programming Languages
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1023)


Activation records or frames of function calls, in a functional programming implementation, are either maintained in a stack or in heap. A frame is usually treated alive till the function returns, though long before that its requirement may have been over.

In this paper, we define the concept of disposing a frame at earliest point in time and do dispose a frame as soon as we are sure that it will no longer be required. To do this we first construct a finite automaton from the program text and use this automaton to guide the frame disposal. We also prove that the disposal strategy is correct.

The advantages are many. It reduces the size of root-set from which the garbage collector starts pointer-chasing to scan the live data. It also delays the occurrences of garbage collection and in the process may improve upon the number of such occurrences in a program execution.


Functional Programming Garbage Collection and Static Analysis 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Appel A. W., Garbage Collection in Topics in Advanced Language Implementation (Ed. Peter Lee), The MIT Press, 1991.Google Scholar
  2. 2.
    Chase D. R., Garbage Collection and other Optimizations, Ph. D. thesis, Dept. of Computer Science, University of Houston, Texas, 1987.Google Scholar
  3. 3.
    Fairbrain J. & Wray C., TIM: A simple lazy abstract machine to execute supercombinators, Proc. of Conference on Functional Programming and Computer Architecture, LNCS 274, Springer Verlag, 1987.Google Scholar
  4. 4.
    Goldberg B. & Young G. P., Higher Order Escape Analysis: Optimizing Stack Allocation in Functional Programming Implementations, European Symposium on Programming (ESOP-90), LNCS 432, Springer Verlag, 1990.Google Scholar
  5. 5.
    Inoue K., Seki H. & Yagi H., Analysis of Functional Programs to Detect Run-Time Garbage Cells, ACM TOPLAS, October 1988.Google Scholar
  6. 6.
    Johnsson T., Lambda-lifting — transforming programs to recursive equations, Proc. of the Conference on Functional Programming and Computer Architecture, Nancy, LNCS 201, Springer Verlag, 1985Google Scholar
  7. 7.
    Lieberman H., Hewitt C., A real-time garbage collector based on the lifetimes of objects, Communication of the ACM, 23(6):419–429, 1983.Google Scholar
  8. 8.
    Peyton Jones S.L.P., The Implementation of Functional Programming Languages, Printice Hall, 1987.Google Scholar
  9. 9.
    Satpathy M., Issues in Implementation of Functional Programming Languages, Ph. D. Thesis, Dept. of Computer Science and Engg., I.I.T. Bombay (In Preparation).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • M. Satpathy
    • 1
  • A. Sanyal
    • 1
  • G. Venkatesh
    • 1
  1. 1.Department of Computer Science and EngineeringIndian Institute of TechnologyBombayIndia

Personalised recommendations