Cactus Environment Machine: Shared Environment Call-by-Need

George Stelle, Darko Stefanovic, Stephen L. Olivier, Stephanie Forrest

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Existing machines for lazy evaluation use a flat representation of environments, storing the terms associated with free variables in an array. Combined with a heap, this structure supports the shared intermediate results required by lazy evaluation. We propose and describe an alternative approach that uses a shared environment to minimize the overhead of delayed computations. We show how a shared environment can act as both an environment and a mechanism for sharing results. To formalize this approach, we introduce a calculus that makes the shared environment explicit, as well as a machine to implement the calculus, the Cactus Environment Machine. A simple compiler implements the machine and is used to run experiments for assessing performance. The results show reasonable performance and suggest that incorporating this approach into real-world compilers could yield performance benefits in some scenarios.

Original languageEnglish (US)
Title of host publicationTrends in Functional Programming - 17th International Conference, TFP 2016, Revised Selected Papers
EditorsJohn Hughes, David Van Horn
PublisherSpringer Verlag
Pages24-43
Number of pages20
ISBN (Print)9783030148041
DOIs
StatePublished - Jan 1 2019
Externally publishedYes
Event17th International Symposium on Trends in Functional Programming, TFP 2016 - College Park, United States
Duration: Jun 8 2016Jun 10 2016

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume10447 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference17th International Symposium on Trends in Functional Programming, TFP 2016
CountryUnited States
CityCollege Park
Period6/8/166/10/16

    Fingerprint

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Cite this

Stelle, G., Stefanovic, D., Olivier, S. L., & Forrest, S. (2019). Cactus Environment Machine: Shared Environment Call-by-Need. In J. Hughes, & D. Van Horn (Eds.), Trends in Functional Programming - 17th International Conference, TFP 2016, Revised Selected Papers (pp. 24-43). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 10447 LNCS). Springer Verlag. https://doi.org/10.1007/978-3-030-14805-8_2