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

Cactus
Experiments
Compiler
Calculus
Heap
Evaluation
Sharing
Minimise
Scenarios
Alternatives
Term
Experiment

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

Cactus Environment Machine : Shared Environment Call-by-Need. / Stelle, George; Stefanovic, Darko; Olivier, Stephen L.; Forrest, Stephanie.

Trends in Functional Programming - 17th International Conference, TFP 2016, Revised Selected Papers. ed. / John Hughes; David Van Horn. Springer Verlag, 2019. p. 24-43 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 10447 LNCS).

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

Stelle, G, Stefanovic, D, Olivier, SL & 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. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 10447 LNCS, Springer Verlag, pp. 24-43, 17th International Symposium on Trends in Functional Programming, TFP 2016, College Park, United States, 6/8/16. https://doi.org/10.1007/978-3-030-14805-8_2
Stelle G, Stefanovic D, Olivier SL, Forrest S. Cactus Environment Machine: Shared Environment Call-by-Need. In Hughes J, Van Horn D, editors, Trends in Functional Programming - 17th International Conference, TFP 2016, Revised Selected Papers. Springer Verlag. 2019. p. 24-43. (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)). https://doi.org/10.1007/978-3-030-14805-8_2
Stelle, George ; Stefanovic, Darko ; Olivier, Stephen L. ; Forrest, Stephanie. / Cactus Environment Machine : Shared Environment Call-by-Need. Trends in Functional Programming - 17th International Conference, TFP 2016, Revised Selected Papers. editor / John Hughes ; David Van Horn. Springer Verlag, 2019. pp. 24-43 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)).
@inproceedings{211c20418d7a4ea59bda779f71b3a624,
title = "Cactus Environment Machine: Shared Environment Call-by-Need",
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.",
author = "George Stelle and Darko Stefanovic and Olivier, {Stephen L.} and Stephanie Forrest",
year = "2019",
month = "1",
day = "1",
doi = "10.1007/978-3-030-14805-8_2",
language = "English (US)",
isbn = "9783030148041",
series = "Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)",
publisher = "Springer Verlag",
pages = "24--43",
editor = "John Hughes and {Van Horn}, David",
booktitle = "Trends in Functional Programming - 17th International Conference, TFP 2016, Revised Selected Papers",

}

TY - GEN

T1 - Cactus Environment Machine

T2 - Shared Environment Call-by-Need

AU - Stelle, George

AU - Stefanovic, Darko

AU - Olivier, Stephen L.

AU - Forrest, Stephanie

PY - 2019/1/1

Y1 - 2019/1/1

N2 - 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.

AB - 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.

UR - http://www.scopus.com/inward/record.url?scp=85062529053&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85062529053&partnerID=8YFLogxK

U2 - 10.1007/978-3-030-14805-8_2

DO - 10.1007/978-3-030-14805-8_2

M3 - Conference contribution

SN - 9783030148041

T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

SP - 24

EP - 43

BT - Trends in Functional Programming - 17th International Conference, TFP 2016, Revised Selected Papers

A2 - Hughes, John

A2 - Van Horn, David

PB - Springer Verlag

ER -