Abstract
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.
Keywords
Preview
Unable to display preview. Download preview PDF.
References
Appel A. W., Garbage Collection in Topics in Advanced Language Implementation (Ed. Peter Lee), The MIT Press, 1991.
Chase D. R., Garbage Collection and other Optimizations, Ph. D. thesis, Dept. of Computer Science, University of Houston, Texas, 1987.
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.
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.
Inoue K., Seki H. & Yagi H., Analysis of Functional Programs to Detect Run-Time Garbage Cells, ACM TOPLAS, October 1988.
Johnsson T., Lambda-lifting — transforming programs to recursive equations, Proc. of the Conference on Functional Programming and Computer Architecture, Nancy, LNCS 201, Springer Verlag, 1985
Lieberman H., Hewitt C., A real-time garbage collector based on the lifetimes of objects, Communication of the ACM, 23(6):419–429, 1983.
Peyton Jones S.L.P., The Implementation of Functional Programming Languages, Printice Hall, 1987.
Satpathy M., Issues in Implementation of Functional Programming Languages, Ph. D. Thesis, Dept. of Computer Science and Engg., I.I.T. Bombay (In Preparation).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Satpathy, M., Sanyal, A., Venkatesh, G. (1995). An automaton-driven frame disposal algorithm and its proof of correctness. In: Kanchanasut, K., Lévy, JJ. (eds) Algorithms, Concurrency and Knowledge. ACSC 1995. Lecture Notes in Computer Science, vol 1023. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60688-2_37
Download citation
DOI: https://doi.org/10.1007/3-540-60688-2_37
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60688-8
Online ISBN: 978-3-540-49262-7
eBook Packages: Springer Book Archive