Abstract
The equational theories at the core of most functional programming are variations on the standard lambda calculus. The best known of these is the call-by-value lambda calculus whose core is the value-beta computation rule (λχ.M) V → M[V/χ] where V is restricted to be a value rather than an arbitrary term. This paper investigates the transformational power of this core theory of functional programming. The main result is that the equational theory of the call-by-value lambda calculus cannot speed up (or slow down) programs by more than a constant factor. The corresponding result also holds for call-by-need but we show that it does not hold for call-byname: there are programs for which a single beta reduction can change the program’s asymptotic complexity.
Author’s current address: Galois Connections, Oregon. moran@galcon.com
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Z. M. Ariola and S. Blom, Cyclic lambda calculi, Proc. TACS’97, LNCS, vol. 1281, Springer-Verlag, February 1997, pp. 77–106.
M. Abadi and L. Cardelli, A theory of objects, Springer-Verlag, New York, 1996.
Z. Ariola, M. Felleisen, J. Maraist, M. Odersky, and P. Wadler, A call-byneed lambda calculus, Proc. POPL’95, the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, ACM Press, January 1995, pp. 233–246.
Lars Andersen and Carsten Gomard, Speedup analysis in partial evaluation: Preliminary results, Proceedings of the 1992 ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation (San Francisco, U.S.A.), Association for Computing Machinery, June 1992, pp. 1–7.
Gerard Boudol and Laurent Kott, Recursion induction principle revisited, Theoretical Computer Science 22 (1983), 135–173.
Matthias Felleisen and Robert Hieb, A revised report on the syntactic theories of sequential control and state, Theoretical Computer Science 103 (1992), no. 2, 235–271.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft, Partial evaluation and automatic program generation, Prentice Hall International, International Series in Computer Science, June 1993, ISBN number 0-13-020249-5 (pbk).
Neil D. Jones, Partial evaluation, self-application and types, Automata, Languages and Programming, LNCS, vol. 443, Springer-Verlag, 1990, pp. 639–659.
N. D. Jones, Constant time factors do matter, STOC’ 93. Symposium on Theory of Computing (Steven Homer, ed.), ACM Press, 1993, pp. 602–611.
Neil D. Jones, What not to do when writing an interpreter for specialisation, Partial Evaluation (Olivier Danvy, Robert Glück, and Peter Thiemann, eds.), Lecture Notes in Computer Science, vol. 1110, Springer-Verlag, 1996, pp. 216–237.
P. J. Landin, The next 700 programming languages, Communications of the ACM 9 (1966), no. 3, 157–164.
R. Milner, Fully abstract models of the typed ë-calculus, Theoretical Computer Science 4 (1977), 1–22.
Andrew Moran and David Sands, Improvement in a lazy context: An operational theory for call-by-need, Proc. POPL’99, ACM Press, January 1999, pp. 43–56.
G. Plotkin, Call-by-name, call-by-value and the ë-calculus, Theoretical Computer Science 1 (1976), no. 1, 125–159.
Eva Rose, Linear-time hierarchies for a functional language machine model, Science of Computer Programming 32 (1998), no. 1–3, 109–143, 6th European Symposium on Programming (Linköping, 1996).
D. Sands, Proving the correctness of recursion-based automatic program transformations, Theoretical Computer Science 167 (1996), no. A.
Hong Zhu, How powerful are folding/unfolding transformations?, Journal of Functional Programming 4 (1994), no. 1, 89–112.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Sands, D., Gustavsson, J., Moran, A. (2002). Lambda Calculi and Linear Speedups. In: Mogensen, T.Æ., Schmidt, D.A., Sudborough, I.H. (eds) The Essence of Computation. Lecture Notes in Computer Science, vol 2566. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36377-7_4
Download citation
DOI: https://doi.org/10.1007/3-540-36377-7_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00326-7
Online ISBN: 978-3-540-36377-4
eBook Packages: Springer Book Archive