Abstract
A significant problem with lazy functional programs is that they often demand a great deal of space. Multi-megabyte workstations are now commonplace, but serious users of functional programming systems have to equip even these machines with additional memory. The essence of laziness is to delay evaluation rather than compute values that may not be needed; and once values are computed to retain them if they may be needed again. This policy might save time, but it can easily lead to space faults: the accumulation or retention of large structures in memory, in ways that the programmer is unaware of, or does not fully understand, let alone intend. Hence profiling tools, by which programmers can obtain information about memory use in terms of the source program, are potentially of great value.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
L. Augustsson and T. Johnsson. The Chalmers Lazy-ML Compiler. Computer Journal, 32 (2): 127–141, April 1989.
S. Clayman, D. Parrot, and C. Clack. A Profiling Technique for Lazy, Higher-Order Functional Programs. Technical report, Department of Computing Science, University College London, November 1991.
T-M. Kuo and Mishra. Strictness Analysis: A New Perspective Based on Type Inference. In Proceedings of the 1989 Conference on Functional Programming Languages and Computer Architecture, pages 260–272. ACM Press, September 1989.
C. Runciman and H. W. Thimbleby. Equal Opportunity Interactive Systems. International Journal of Man-Machine Studies, 25: 439–451, 1986.
C. Runciman and D. Wakeling. Heap Profiling of Lazy Functional Programs. Technical Report 172, Department of Computer Science, University of York, April 1992.
P. M. Sansom and S. L. Peyton Jones. Profiling Lazy Functional Programs. In J. Launchbury and P. M. Sansom, editors, Functional Programming, Glasgow 1992. Springer-Verlag, Workshps in Computing, 1992.
W. Stoye. The Implementation of Functional Languages Using Custom Hardware. PhDthesis, University of Cambridge Computer Laboratory, December 1986. Technical Report No. 81.
D. A. Turner. A new implementation technique for applicative languages. SOFTWARE – Practice and Experience, 9 (1): 31–50, January 1979.
C. von Dorrien. Stingy Evaluation. Licentiate Dissertation, Chalmers University of Technology, S-412 96 Göteborg, 1989.
P. Wadler. Fixing Some Space Leaks with a Garbage Collector. Software – Practice and Experience, 17 (9): 595–608, September 1987.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1993 British Computer Society
About this paper
Cite this paper
Runciman, C., Wakeling, D. (1993). Heap Profiling of a Lazy Functional Compiler. In: Launchbury, J., Sansom, P. (eds) Functional Programming, Glasgow 1992. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3215-8_18
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3215-8_18
Publisher Name: Springer, London
Print ISBN: 978-3-540-19820-8
Online ISBN: 978-1-4471-3215-8
eBook Packages: Springer Book Archive