Skip to main content

Improving Full Laziness

  • Conference paper
Book cover Functional Programming, Glasgow 1990

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

Abstract

The aim of transforming programs into fully-lazy form is to avoid recomputations by sharing as much computation as possible. In this paper we shall see how to improve programs, such that even more computation can be shared when the programs are transformed into fully-lazy form. This is done by treating control constructs specially. The idea is that when the condition in a conditional can be evaluated then the conditional should be reduced away (if True t e) should reduce to t even if t cannot be computed. We achieve this by transforming the conditionals such that the branches always can be evaluated when the condition can be evaluated. The results we achieve using this technique compares well with the results achieved by partial evaluation.

Supported by University of Copenhagen, The Danish Research Academy

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Carsten Kehler Holst. Program specialization for compiler generation. Master’s thesis, Department of Computer Science, University of Copenhagen (DIKU), Denmark, May 1989.

    Google Scholar 

  2. Carsten Kehler Holst and John Hughes. Towards improving binding time for free! In 3rd Glasgow Functional Programming Workshop,Ullapool, Scotland, 1990. Springer-Verlag.

    Google Scholar 

  3. Paul Hudak and Philip Wadler (editors). Report on the programming language Haskell. Tecnical report, Yale University and Glasgow University, April 1990.

    Google Scholar 

  4. John Hughes. The Design and Implementation of Programming Languages. PhD thesis, Oxford, 1983.

    Google Scholar 

  5. Neil D. Jones, Peter A. Sestoft, and Harald Sondergaard. Mix: A self-applicable partial evaluator for experiments in compiler generation. Lisp and Symbolic Computation, 2 (1): 9–50, 1989.

    Article  Google Scholar 

  6. Torben Æ. Mogensen. The application of partial evaluation to ray-tracing. Master’s thesis, DIKU, University of Copenhagen, Denmark, 1986.

    Google Scholar 

  7. Torben Æ. Mogensen. Separating binding times in language specifications. In Functional Programming Languages and Computer Architecture,pages 14–25, London, England, September 1989. ACM, ACM Press and Addison-Wesley.

    Google Scholar 

  8. Hanne Rus Nielson and Flemming Nielson. Eureka definitions for free! or disagreement points for fold/unfold transformations. In Neil D. Jones, editor, ESOP ‘80 3rd European Symposium on Programming, volume 432 of Lecture Notes in Computer Science, pages 291–305, Copenhagen, Denmark, May 1990. Springer-Verlag.

    Google Scholar 

  9. Simon L. Peyton Jones and David Lester. A modular fully-lazy lambda lifter in Haskell. CS Report CSC 90/R17, Department of Computing Science, University of Glasgow, June 1990.

    Google Scholar 

  10. Peter Sestoft. The structure of a self-applicable partial evaluator. In Harald Ganzinger and Neil D. Jones, editors, Programs as Data Objects, volume 217 of Lecture Notes in Computer Science, pages 236–256, Copenhagen, Denmark, 1986. Springer-Verlag.

    Google Scholar 

  11. David Turner. An overview of Miranda. Sigplan Notices, 21 (12): 158–166, December 1986.

    Article  Google Scholar 

  12. Philip Wadler. Theorems for free! In Functional Programming Languages and Computer Architectures,pages 347–359, London, September 1989. ACM.

    Google Scholar 

  13. Philip Wadler and Quentin Miller. An introduction to Orwell, 1985. Programming Research Group, Oxford.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Simon L. Peyton Jones Graham Hutton Carsten Kehler Holst

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Holst, C.K. (1991). Improving Full Laziness. In: Jones, S.L.P., Hutton, G., Holst, C.K. (eds) Functional Programming, Glasgow 1990. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3810-5_7

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3810-5_7

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19667-9

  • Online ISBN: 978-1-4471-3810-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics