Skip to main content

Fusion in Practice

  • Conference paper
  • First Online:
Implementation of Functional Languages (IFL 2002)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2670))

Included in the following conference series:

Abstract

Deforestation was introduced to eliminate intermediate data structures used to connect separate parts of a functional program together. Fusion is a more sophisticated technique, based on a producer-consumer model, to eliminate intermediate data structures. It achieves better results. In this paper we extend this fusion algorithm by refining this model, and by adding new transformation rules. The extended fusion algorithm is able to deal with standard deforestation, but also with higher-order function removal and dictionary elimination. We have implemented this extended algorithm in the Clean 2.0 compiler.

This work was supported by STW as part of project NWI.4411

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. P. Achten, A. Alimarine, R. Plasmeijer. When Generic Functions Use Dynamic Values. Post-workshop submission: 14th International Workshop on the Implementation of Functional Languages, IFL 2002, Madrid, Spain, September 2002.

    Google Scholar 

  2. A. Alimarine and R. Plasmeijer. A Generic Programming Extension for Clean. In: Arts, Th., Mohnen M., eds. Proceedings of the 13th International Workshop on the Implementation of Functional Languages, IFL 2001, Selected Papers, Älvsjö, Sweden, September 24–26, 2001, Springer-Verlag, LNCS 2312, pages 168–185.

    Chapter  Google Scholar 

  3. W.-N. Chin. Safe fusion of functional expressions II: Further improvements Journal of Functional Programming, Volume 6, Part 4, pp 515–557, 1994.

    Article  Google Scholar 

  4. R. Plasmeijer, M. van Eekelen. Language Report Concurrent Clean. Version 1.3. Technical Report CSI R9816, NIII, University of Nijmegen, June 1998. Also available at http://www.cs.kun.nl/~clean/contents/contents.html

  5. R. Plasmeijer, M. van Eekelen. Language Report Concurrent Clean. Version 2.0. DRAFT!, NIII, University of Nijmegen, December 2001. Also available at http://www.cs.kun.nl/~clean/contents/contents.html

  6. L. Fegaras, T. Sheard, and T. Zhou. Improving Programs which Recurse over Multiple Inductive Structures. In Proc. of ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, Orlando, FL, USA, June 1994

    Google Scholar 

  7. A. Ferguson and P. Wadler. When will Deforestation Stop. In Proc. of 1988 Glasgow Workshop on Functional Programming, pp 39–56, Rothasay, Isle of Bute, August 1988.

    Google Scholar 

  8. J. Fokker. Functional Specification of the JPEG algorithm, and an Implementation for Free, In Programming Paradigms in Graphics, Proceedings of the Eurographics workshop in Maastricht, the Netherlands, september 1995, Wien, Springer 1995, pp102–120.

    Google Scholar 

  9. A. Gill. Cheap Deforestation for Non-strict Functional Languages, PhD Thesis, Department of Computing Science, Glasgow University, 1996.

    Google Scholar 

  10. A. Gill, S. Peyton Jones, J. Launchbury. A Short Cut to Deforestation, Proc. Functional Programming Languages and Computer Architecture (FPCA’93), Copenhagen, June 1993, pp223–232.

    Google Scholar 

  11. P. Hartel, K. Langendoen. Benchmarking Implementations of Lazy Functional Languages, In Proc. of Functional Programming Languages and Computer Architecture, 1993, pp341–349.

    Google Scholar 

  12. P. Hartel, et al. Pseudoknot: A Float-Intensive Benchmark for Functional Compilers, 6th Implementation of Functional Languages, School of Information Systems, University of East Anglia, Norwich, UK, 1994, pp13.1–13.34.

    Google Scholar 

  13. P. Hudak, S. Peyton Jones, P. Wadler, B. Boutel, J. Fairbairn, J. Fasel, K. Hammond, J. Hughes, Th. Johnsson, D. Kieburtz, R. Nikhil, W. Partain, J. Peterson. Report on the programming language Haskell, In ACM SigPlan Notices, 27 (5): 1–164. May 1992.

    Google Scholar 

  14. R. Hinze and S. Peyton Jones. Derivable Type Classes. In Graham Hutton, editor, Proceedings of the Fourth Haskell Workshop, Canada, 2000.

    Google Scholar 

  15. S. Marlow. Deforestation for Higher-Order Functional Programs PhD Thesis, Department of Computer Science, University of Glasgow, 1995.

    Google Scholar 

  16. S. Peyton Jones, S. Marlow. Secrets of the Glasgow Haskell Compiler inliner Workshop on Implementing Declarative Languages, 1999.

    Google Scholar 

  17. C. Okasaki. Purely Functional Data Structures Cambridge University Press, ISBN 0-521-63124-6, 1998.

    Google Scholar 

  18. H. Seidl, M.H. Sørensen. Constraints to Stop Higher-Order Deforestation In 24th ACM Symp. on Principles of Programming Languages, pages 400–413, 1997.

    Google Scholar 

  19. A. Takano, E. Meijer. Shortcut to Deforestation in Calculational form, Proc. Functional Programming Languages and Computer Architecture (FPCA’95), La Jolla, June 1995, pp 306–313.

    Google Scholar 

  20. S. Taylor.Optimization of Mercury programs Honours report, Department of Computer Science, University of Melbourne, Australia, November 1998.

    Google Scholar 

  21. P. Wadler. Deforestation: Transforming Programs to Eliminate Trees Proceedings of the 2nd European Symposium on Programming, Nancy, France, March 1988. Lecture Notes in Computer Science 300.

    Google Scholar 

  22. P. Wadler, S. Blott. How to make ad-hoc polymorphism less ad hoc In Proceedings 16th ACM Symposium on Principles of Programming Languages, pages 60–76, 1989.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

van Arkel, D., van Groningen, J., Smetsers, S. (2003). Fusion in Practice. In: Peña, R., Arts, T. (eds) Implementation of Functional Languages. IFL 2002. Lecture Notes in Computer Science, vol 2670. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44854-3_4

Download citation

  • DOI: https://doi.org/10.1007/3-540-44854-3_4

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40190-2

  • Online ISBN: 978-3-540-44854-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics