Hostname: page-component-76fb5796d-x4r87 Total loading time: 0 Render date: 2024-04-25T15:20:19.528Z Has data issue: false hasContentIssue false

The adequacy of Launchbury's natural semantics for lazy evaluation*

Published online by Cambridge University Press:  03 January 2018

JOACHIM BREITNER*
Affiliation:
Computer and Information Science, University of Pennsylvania, Philadelphia, PA-19146, USA (e-mail: joachim@cis.upenn.edu)
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.

In his seminal paper “A Natural Semantics for Lazy Evaluation”, John Launchbury proves his semantics correct with respect to a denotational semantics, and outlines a proof of adequacy. Previous attempts to rigorize the adequacy proof, which involves an intermediate natural semantics and an intermediate resourced denotational semantics, have failed. We devised a new, direct proof that skips the intermediate natural semantics. It is the first rigorous adequacy proof of Launchbury's semantics. We have modeled our semantics in the interactive theorem prover Isabelle and machine-checked our proofs. This does not only provide a maximum level of rigor, but also serves as a tool for further work, such as a machine-checked correctness proof of a compiler transformation.

Type
Articles
Copyright
Copyright © Cambridge University Press 2018 

Footnotes

*

This work was carried out while the author was a member of the Programming Paradigms Group of the Karlsruhe Institute of Technology, Germany. The author was supported by the Deutsche Telekom Stiftung.

References

Abramsky, S. (1990) The lazy lambda calculus. In Research Topics in Functional Programming. Boston, MA, USA: Addison-Wesley Longman Publishing Co., Inc., pp. 65116.Google Scholar
Baker-Finch, C., King, D., Hall, J. & Trinder, P. (1999) An Operational Semantics for Parallel Call-by-Need. Technical Report 99/1. Faculty of Mathematics and Computing, The Open University.Google Scholar
Baker-Finch, C., King, D. J. & Trinder, P. W. (2000) An operational semantics for parallel lazy evaluation. In Proceedings of ACM SIGPLAN International Conference on Functional Programming.CrossRefGoogle Scholar
Ballarin, C. (2014) Locales: A module system for mathematical theories. J. Autom. Reason. 52 (2), 123153.CrossRefGoogle Scholar
Breitner, J. (2013) The correctness of Launchbury's natural semantics for lazy evaluation. Archive of formal proofs, Jan. Available at: http://afp.sf.net/entries/Launchbury.html, Formal proof development.Google Scholar
Breitner, J. (2015a) Call arity. In TFP'14. LNCS, vol. 8843. Springer, pp. 3450.Google Scholar
Breitner, J. (2015b) Formally proving a compiler transformation safe. In Proceedings of Haskell Symposium. ACM.Google Scholar
Breitner, J. (2015c) The safety of call arity. Archive of formal proofs, Feb. Available at: http://afp.sf.net/entries/Call_Arity.shtml, Formal proof development.Google Scholar
Eekelen, M. van, & Mol, M. de. (2004 January) Mixed lazy/strict graph semantics. Technical Report. NIII-R0402. Radboud University Nijmegen.Google Scholar
Eisenberg, R. (2013) System FC, as Implemented in GHC.Google Scholar
Launchbury, J. (1993) A natural semantics for lazy evaluation. In Principles of Programming Languages, pp. 144–154.Google Scholar
Nakata, K. (2010) Denotational semantics for lazy initialization of letrec: Black holes as exceptions rather than divergence. In Proceedings of the 7th Workshop on Fixed Points in Computer Science.Google Scholar
Nakata, K. & Hasegawa, M. (2009) Small-step and big-step semantics for call-by-need. J. Funct. Program. 19 (6), 699722.Google Scholar
Sánchez-Gil, L., Hidalgo-Herrero, M. & Ortega-Mallén, Y. (2010) An operational semantics for distributed lazy evaluation. In Trends in Functional Programming, vol. 10. New York, NY, USA: Intellect Books, pp. 6580.Google Scholar
Sánchez-Gil, L., Hidalgo-Herrero, M. & Ortega-Mallén, Y. (2011) Relating function spaces to resourced function spaces. In Proceedings of ACM Symposium on Applied Computing, pp. 1301–1308.CrossRefGoogle Scholar
Sánchez-Gil, L., Hidalgo-Herrero, M. & Ortega-Mallén, Y. (2012) A locally nameless representation for a natural semantics for lazy evaluation. In Proceedings of International Colloquium on Theoretical Aspects of Computing, pp. 1301–1308.Google Scholar
Sánchez-Gil, L., Hidalgo-Herrero, M. & Ortega-Mallén, Y. (2014) The role of indirections in lazy natural semantics. In Proceedings of PSI.Google Scholar
Sestoft, P. (1997) Deriving a lazy abstract machine. J. Funct. Program. 7 (4), 231264.Google Scholar
Urban, C. & Kaliszyk, C. (2012) General bindings and alpha-equivalence in nominal Isabelle. Logical Methods Comput. Sci. 8 (2). See https://lmcs.episciences.org/page/lmcs-ev for details.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.