Hostname: page-component-8448b6f56d-c4f8m Total loading time: 0 Render date: 2024-04-18T04:54:38.377Z Has data issue: false hasContentIssue false

Small-step and big-step semantics for call-by-need

Published online by Cambridge University Press:  07 September 2009

KEIKO NAKATA
Affiliation:
Institute of Cybernetics, Tallinn University of Technology, Tallinn, Estonia (e-mail: keiko@cs.ioc.ee)
MASAHITO HASEGAWA
Affiliation:
Research Institute for Mathematical Sciences, Kyoto University, Kyoto, Japan (e-mail: hassei@kurims.kyoto-u.ac.jp)
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 present natural semantics for acyclic as well as cyclic call-by-need lambda calculi, which are proved equivalent to the reduction semantics given by Ariola and Felleisen (J. Funct. Program., vol. 7, no. 3, 1997). The natural semantics are big-step and use global heaps, where evaluation is suspended and memorized. The reduction semantics are small-step, and evaluation is suspended and memorized locally in let-bindings. Thus two styles of formalization describe the call-by-need strategy from different angles. The natural semantics for the acyclic calculus is revised from the previous presentation by Maraist et al. (J. Funct. Program., vol. 8, no. 3, 1998), and its adequacy is ascribed to its correspondence with the reduction semantics, which has been proved equivalent to call-by-name by Ariola and Felleisen. The natural semantics for the cyclic calculus is inspired by that of Launchbury (1993) and Sestoft (1997), and we state its adequacy using a denotational semantics in the style of Launchbury; adequacy of the reduction semantics for the cyclic calculus is in turn ascribed to its correspondence with the natural semantics.

Type
Articles
Copyright
Copyright © Cambridge University Press 2009

References

Abramsky, S. & Ong, C.-H. L. (1993) Full abstraction in the lazy lambda calculus, Inf. Comput., 105 (2): 159267.Google Scholar
Ariola, Z. & Felleisen, M. (1997) The call-by-need lambda calculus. J. Funct. Program., 7 (3): 265301.CrossRefGoogle Scholar
Ariola, Z. M. & Blom, S. (1997) Cyclic lambda calculi. In Proc. Theoretical Aspects of Computer Software. Abadi, M. and Ito, T. (eds), Lecture Notes in Computer Science, vol. 1281. Springer, Berlin/Heidelberg, pp. 77106.Google Scholar
Ariola, Z. M. & Klop, J. W. (1994) Cyclic lambda graph rewriting. In Proceedings of the Symposium on Logic in Computer Science, Abramsky, S. (ed), Paris, France, pp. 416425.Google Scholar
Danvy, O. (2008) Defunctionalized interpreters for programming languages. In Proceedings of the International Conference on Functional Programming, Hook, James and Thiemann, Peter (eds), Victoria, BC, Canada, ACM Press.Google Scholar
Garcia, R., Lumsdaine, A & Sabry, A. (2009) Lazy evaluation and delimited control. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on the Principles of Programming Languages, Shao, Zhong and Pierce, Benjamin C. (eds), Savannah, GA, USA. ACM Press.Google Scholar
Launchbury, J. (1993) A natural semantics for lazy evaluation. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on the Principles of Programming Languages, Charleston, SC, USA.Google Scholar
Leroy, X., Doligez, D., Garrigue, J., Rémy, D. & Vouillon, J. (2008) The Objective Caml system, release 3.11 [online]. Available at: http://caml.inria.fr/ (Accessed 29 July 2009).Google Scholar
Maraist, J., Odersky, M. & Wadler, P. (1998) A call-by-need lambda calculus, J. Funct. Program., 8 (3): 275317.Google Scholar
Nakata, K. & Hasegawa, M. (2009) Small-step and big-step semantics for call-by-need (extended version). ArXiv:0907.4640v1 [cs.PL].Google Scholar
Okasaki, C., Lee, P. & Tarditi, D. (1994) Call-by-need and continuation-passing style, LISP Symbol. Comput., 7 (1): 5782.CrossRefGoogle Scholar
Plotkin, G. (1975) Call-by-name, Call-by-value and the λ-Calculus, Theoret. Comp. Sci., 1 (2): 125159.CrossRefGoogle Scholar
Sestoft, P. (1997) Deriving a lazy abstract machine, J. Funct. Program., 7 (3): 231264.Google Scholar
Sperber, M., Dybvig, R. K., Flatt, M. & Straaten, A. V. (2009) Revised6 Report on the Algorithmic Language Scheme. J. Funct. Program., 19 (S1): 1301.Google Scholar
Syme, D. (2005) Initializing mutually referential abstract objects: The value recursion challenge. In Proceedings of the Workshop on ML, Electr. Notes Theor. Comput. Sci., Tallinn, Estonia, 148 (2): 325.Google Scholar
Syme, D. & Margetson, J. (2008) The F# programming language [online]. Available at: http://research.microsoft.com/en-us/um/people/curtisvv/fsharp_default.aspx (Accessed 29 July 2009).Google Scholar
Wright, A. K. & Felleisen, M. (1994) A syntactic approach to type soundness. Information and Computation, 115 (1): 3894.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.