Hostname: page-component-8448b6f56d-gtxcr Total loading time: 0 Render date: 2024-04-19T12:40:13.461Z Has data issue: false hasContentIssue false

Heap profiling of lazy functional programs

Published online by Cambridge University Press:  07 November 2008

Colin Runciman
Affiliation:
Department of Computer Science, University of York, Heslington, York YO1 5DD, UK (e-mail: colin@minster.york.ac.uk, dw@minster.york.ac.uk)
David Wakeling
Affiliation:
Department of Computer Science, University of York, Heslington, York YO1 5DD, UK (e-mail: colin@minster.york.ac.uk, dw@minster.york.ac.uk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

We describe the design, implementation and use of a new kind of profiling tool that yields valuable information about the memory use of lazy functional programs. The tool has two parts: a modified functional language implementation which generates profiling information during the execution of programs, and a separate program which converts this information to graphical form. With the aid of profile graphs, one can make alterations to a functional program which dramatically reduce its space consumption. We demonstrate this in the case of a genuine example - the first to which the tool was applied - for which the results are strikingly successful.

Type
Articles
Copyright
Copyright © Cambridge University Press 1993

References

Appel, A. W. 1992. Compiling With Continuations. Cambridge University Press.Google Scholar
Augustsson, L. 1987. Compiling Lazy Functional Languages, Part II. PhD Thesis, Chalmers University of Technology, S-412 96 Göteborg, 11.Google Scholar
Augustsson, L. and Johnsson, T. 1989. The Chalmers Lazy-ML Compiler. Computer Journal 32(2): 127141, 04.CrossRefGoogle Scholar
Bjerner, B. and Holmström, A. 1989. A compositional approach to time analysis of first order lazy functional programs. In Proceedings Conference on Functional Programming Languages and Computer Architecture, 157165. ACM Press, 09.Google Scholar
Hartel, P. H. and Veen, A. H. 1988. Statistics on graph reduction of SASL programs. Software-Practice and Experience 18: 239253.CrossRefGoogle Scholar
Hughes, R. J. M. 1984. The Design and Implementation of Programming Languages. PhD Thesis, Oxford University, 09.Google Scholar
Hughes, R. J. M. 1992. A loop-detecting interpreter for lazy, higher-order programs. In Proceedings 5th Glasgow Workshop on Functional Programming, 07.Google Scholar
Johnsson, T. 1985. Lambda lifting: Transforming programs to recursive equations. In Proceedings Conference on Functional Programming Languages and Computer Architecture, 190203Springer-Verlag, 09.CrossRefGoogle Scholar
Johnsson, T. 1987. Compiling Lazy Functional Languages. PhD Thesis, Chalmers University of Technology, S-412 96 Göteborg, 02.Google Scholar
Jones, R. 1992. Tail recursion without space leaks. Journal of Functional Programming 2(1): 7379, 01.CrossRefGoogle Scholar
Kozato, Y. and Otto, G. P. 1992. Geometric transformations in a lazy functional language. In Proceedings 11th International Conference on Pattern Recognition, 08.Google Scholar
Manna, Z. and Waldinger, R. 1985. The Logical Basis for Computer Programming (Volume 1: Deductive Reasoning). Addison-Wesley.Google Scholar
Meira, S. L. 1985. On the Efficiency of Applicative Algorithms. PhD Thesis, University of Kent at Canterbury, 03.Google Scholar
Peyton Jones, S. L. 1987. The Implementation of Functional Programming Languages. Prentice-Hall.Google Scholar
Peyton Jones, S. L. 1992. Implementation of Functional Languages on Stock Hardware: The Spineless Tagless G-machine. Journal of Functional Programming 2(2): 127202, 04.CrossRefGoogle Scholar
Runciman, C. and Wakeling, D. 1990. Problems and proposals for time and space profiling of functional programs. In Proceedings Glasgow Workshop on Functional Programming, 237245, Springer-Verlag, 08.Google Scholar
Runciman, C. and Wakeling, D. 1992. Heap Profiling of a lazy functional compiler. In Proceedings Glasgow Workshop on Functional Programming, Springer-Verlag, 08.Google Scholar
Runciman, C. and Wakeling, D. 1992. Heap Profiling of Lazy Functional Programs. Technical Report 172, Department of Computer Science, University of York, 04.Google Scholar
Sands, D. 1991. Time analysis, cost equivalence and program refinement. In Proceedings Conference on the Foundations of Software Technology and Theoretical Computer Science, 2539. Springer-Verlag, 12.CrossRefGoogle Scholar
Sansom, P. 1992. Profiling Lazy Functional Languages. Draft Memorandum, Department of Computing Science, University of Glasgow, 01.Google Scholar
Stoye, W. 1986. The Implementation of Functional Languages Using Custom Hardware. PhD Thesis, University of Cambridge Computer Laboratory, 12 (Technical Report No. 81).Google Scholar
Tufte, E. R. 1983. The Visual Display of Quantitative Information. Graphics Press, Cheshire, Connecticut.Google Scholar
van der Poel, W. M.The Mechanization of the Lambda Calculus. Undated typescript, University of Technology, Delft, The Netherlands.Google Scholar
Wadler, P. 1987. Fixing some space leaks with a garbage collector. Software-Practice and Experience 17 (9): 595608, 09.CrossRefGoogle Scholar
Wadler, P. 1988. Strictness analysis aids time analysis. In Fifteenth Annual ACM Symposium on the Principles of Programming Languages, 119131, 01.Google Scholar
Wray, S. C. 1986. Implementation and Programming Techniques for Functional Languages. PhD Thesis, University of Cambridge Computer Laboratory, 01 (Technical Report No. 92).Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.