Nothing Special   »   [go: up one dir, main page]

skip to main content
article
Free access

Efficient compilation of lazy evaluation

Published: 01 June 1984 Publication History

Abstract

This paper describes the principles underlying an efficient implementation of a lazy functional language, compiling to code for ordinary computers. It is based on combinator-like graph reduction: the user defined functions are used as rewrite rules in the graph. Each function is compiled into an instruction sequence for an abstract graph reduction machine, called the G-machine, the code reduces a function application graph to its value. The G-machine instructions are then translated into target code. Speed improvements by almost two orders of magnitude over previous lazy evaluators have been measured; we provide some performance figures.

References

[1]
L. Augustsson, "FC manual", Memo 13, Programming Methodology Group, Chalmers University of Technology, Goteborg (1982).
[2]
J. Backus, "Can Programming be Liberated from the yon Neumann Style? A funtional style and its algebra of programs", Comm. ACM, Vol. 21 no. 8 pp. 613-641 (August 1978).
[3]
L. Cardelli, "ML under UNIX", Polymorphism: The NL/LCF/Hope Newsletter, Vol. I no. 3 (January 1984).
[4]
R. Fenichel and J. Yochelson, "A LISP garbage-collector for virtual memory computer systems", Comm. of the ACM, Vol. 12 no. 11 pp. 611-612 (November 1969).
[5]
D. P. Friedman and D. S. Wise, "Cons should not evaluate its arguments", pp. 257-284 in Automata, la---ages a, Programming, Edinburgh Univ. Press
[6]
M. Gordon, R. Milner, and C. Wadsworth, "Edinburgh LCF", Lecture Notes in Computer Science, Vol. 78, Springer Verlag (1979).
[7]
P. Hudak and D. Kranz, "A Combinatorbased Compiler for a Functional Language", pp. 122-132 in Prec. 11th ACM Syrup. on Principles of Programming languages (1984).
[8]
J. Hughes, "Super Combinators: A New Implementation Method for Applicative Languages", pp. I-I0 in Proceedings of the 1982 ACIq Symposium on Lisp and Functional Programming, Pittsburgh (1982).
[9]
T. Johnsson, "Code Generation for Lazy Evaluation", Memo 22, Programming Methodology Group, Chalmers University of Technology, Goteborg (1981).
[10]
N.D. Jones and S.S. Muchnick, "A Fixed-Program Machine for Combinator Expression Evaluation", pp. 11-20 in Proceedings o f the 1982 ACMSymposium on Lisp and Functional Programming, Pittsburgh (1982).
[11]
P. J. Landin, "The Mechanical Evaluation of Expressions", Computer Journal, No. 6 pp. 308-320 (January 1964).
[12]
P. J. Landin, "The Next 700 Programming Languages", Comm. of the ACM, Vol. 9 no. 3 pp. 157-164 (March 1966).
[13]
R. Milner, "A Theory of Type Polymorphism in Programming", Journal of Computer and System Sciences, Vol. 17 no. 3 pp. 348-375 (1978).
[14]
R. Milner, "Standard ML Proposal", Polymorphism: The /LCF/Hope Newsletter, Vol. I no. 3 (January 1984).
[15]
A. Mycroft, "The Theory and Practice of Transforming Call-by-Need into Callby-Value", pp. 269-281 in Proc. 4th Int. Symp. on Programming, Lecture Notes i n Computer Science, Vol. 83, Springer Verlag, Paris (April 1980).
[16]
D.A. Turner, "An implementation of SASL", TR/75/4, St. Andrews (1975).
[17]
D. A. Turner, "New Implementation Techniques for Applicative Languages", Software Practice and Experience, Vol. 9 PP. 31-49 (1979).

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 19, Issue 6
Proceedings of the SIGPLAN '84 symposium on compiler construction
June 1984
318 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/502949
Issue’s Table of Contents
  • cover image ACM Conferences
    SIGPLAN '84: Proceedings of the 1984 SIGPLAN symposium on Compiler construction
    June 1984
    328 pages
    ISBN:0897911393
    DOI:10.1145/502874

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1984
Published in SIGPLAN Volume 19, Issue 6

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)212
  • Downloads (Last 6 weeks)31
Reflects downloads up to 02 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Formal Verifications of Call-by-Need and Call-by-Name Evaluations with Mutual RecursionProgramming Languages and Systems10.1007/978-3-030-34175-6_10(181-201)Online publication date: 18-Nov-2019
  • (2019)Cactus Environment MachineMicrobial Metabolic Engineering10.1007/978-3-030-14805-8_2(24-43)Online publication date: 21-Feb-2019
  • (2018)Verifiably LazyProceedings of the 30th Symposium on Implementation and Application of Functional Languages10.1145/3310232.3310236(49-58)Online publication date: 5-Sep-2018
  • (2017)A greedy approach for a rolling stock management problem using multi-interval constraint propagationAnnals of Operations Research10.1007/s10479-017-2543-y271:2(1165-1183)Online publication date: 7-Jun-2017
  • (2014)The Impact of the Lambda Calculus in Logic and Computer ScienceBulletin of Symbolic Logic10.2307/4210133:02(181-215)Online publication date: 15-Jan-2014
  • (2013)On graph rewriting, reduction, and evaluation in the presence of cyclesHigher-Order and Symbolic Computation10.1007/s10990-014-9103-926:1-4(63-84)Online publication date: 1-Dec-2013
  • (2012)A First-Order Functional LanguageProgramming Language Concepts10.1007/978-1-4471-4156-3_4(57-76)Online publication date: 2012
  • (2010)Functional Programming LanguagesCompiler Design10.1007/978-3-642-14909-2_3(57-104)Online publication date: 2-Nov-2010
  • (2008)Algorithmic debugging for lazy functional languagesJournal of Functional Programming10.1017/S095679680000109X4:03(337-369)Online publication date: 7-Nov-2008
  • (2008)An incremental, exploratory and transformational environment for lazy functional programmingJournal of Functional Programming10.1017/S09567968000006293:01(93-115)Online publication date: 7-Nov-2008
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media