Evaluating Call-by-Need on the Control Stack

  • Stephen Chang
  • David Van Horn
  • Matthias Felleisen
Conference paper

DOI: 10.1007/978-3-642-22941-1_1

Volume 6546 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Chang S., Van Horn D., Felleisen M. (2011) Evaluating Call-by-Need on the Control Stack. In: Page R., Horváth Z., Zsók V. (eds) Trends in Functional Programming. TFP 2010. Lecture Notes in Computer Science, vol 6546. Springer, Berlin, Heidelberg

Abstract

Ariola and Felleisen’s call-by-need λ-calculus replaces a variable occurrence with its value at the last possible moment. To support this gradual notion of substitution, function applications—once established—are never discharged. In this paper we show how to translate this notion of reduction into an abstract machine that resolves variable references via the control stack. In particular, the machine uses the static address of a variable occurrence to extract its current value from the dynamic control stack.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Stephen Chang
    • 1
  • David Van Horn
    • 1
  • Matthias Felleisen
    • 1
  1. 1.PLT & PRLNortheastern UniversityBostonUSA