Abstract
This paper addresses two issues: (1) What it means for a higher-order, eager functional language to be implemented with a single, global, stack-based environment and (2) how the existence of such an environment can be predicted statically.
The central theme is the use of the λ-abstraction to control the extent or lifetime of bindings. All programs in a higher-order, call-by-name language can be implemented with a stack environment. The reason: soundness of η-expansion and decurrying for call-by-name. However, η-expansion is unsound for call-by-value. Hence, we must identify a subset of the simply-typed, call-by-value λ-calculus, where the λ-abstraction can serve as the block construct for a stack implementation.
The essence of environment stackability is that the shape of the environment remains the same before and after the execution of an expression. Thus if a closure is returned as a value, the environment trapped in it must be a subenvironment of the global environment. This yields a dynamic criterion for stackability — indeed, it is the downwards funargs criterion of the LISP community. A safe static criterion can now be found via closure analysis.
Supported by NSF grant CCR-93-02962 and ONR grant N00014-94-1-0866
Preview
Unable to display preview. Download preview PDF.
References
Anindya Banerjee, and David A. Schmidt. Stackability in the Typed Call-by-value Lambda Calculus. Technical Report TR-94-6, Kansas State University, Manhattan, Kansas, U.S.A., 1994.
Michael Georgeff. Transformations and reduction strategies for typed lambda expressions. ACM Transactions on Programming Languages and Systems, 6(4):603–631, October 1984.
Benjamin Goldberg and Young Gil Park. Higher order escape analysis:optimizing stack allocation in functional program implementations. In N.Jones, editor, Proceedings of the Third European Symposium on Programming, number 432 in Lecture Notes in Computer Science, pages 152–160, Copenhagen, Denmark, May 1990.
Gilles Kahn. Natural semantics. Technical Report 601, INRIA, Sophia Antipolis, France, February 1987.
Jean-Louis Krivine. Lambda Calculus, Types, and Models. Ellis-Horwood, Chichester, 1993.
Robin Milner, and Mads Tofte. Co-induction in relational semantics. Theoretical Computer Science, 17:209–220, 1992.
John C. Reynolds. Preliminary design of the programming language Forsythe. Technical Report CMU-CS-88-159, Computer Science, Carnegie-Mellon University, Pittsburgh, Pennsylvania, 1988.
David A. Schmidt. Denotational Semantics: A Methodology for Language Development. Allyn and Bacon, Inc., 1986.
Peter Sestoft. Analysis and Efficient Implementation of Functional Programs. PhD thesis, DIKU, Copenhagen, Denmark, October 1991. Rapport Nr. 92/6.
Mads Tofte and Jean-Pierre Talpin. Implementation of the Typed Call-by-value λ-calculus using a Stack of Regions. In Proceedings of the Twentyfirst Annual ACM Symposium on Principles of Programming Languages, Portland, Oregon, January 1994.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Banerjee, A., Schmidt, D.A. (1994). Stackability in the simply-typed call-by-value lambda calculus. In: Le Charlier, B. (eds) Static Analysis. SAS 1994. Lecture Notes in Computer Science, vol 864. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58485-4_37
Download citation
DOI: https://doi.org/10.1007/3-540-58485-4_37
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58485-8
Online ISBN: 978-3-540-49005-0
eBook Packages: Springer Book Archive