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

skip to main content
10.5555/2050135.2050137guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Theory and practice of fusion

Published: 01 September 2010 Publication History

Abstract

There are a number of approaches for eliminating intermediate data structures in functional programs--this elimination is commonly known as fusion. Existing fusion strategies are built upon various, but related, recursion schemes, such as folds and unfolds. We use the concept of recursive coalgebras as a unifying theoretical and notational framework to explore the foundations of these fusion techniques. We first introduce the calculational properties of recursive coalgebras and demonstrate their use with proofs and derivations in a calculational style, then provide an overview of fusion techniques by bringing them together in this setting. We also showcase these developments with examples in Haskell.

References

[1]
Capretta, V.: General recursion via coinductive types. Logical Methods in Computer Science 1(2), 1-28 (2005).
[2]
Capretta, V., Uustalu, T., Vene, V.: Recursive coalgebras from comonads. Information and Computation 204(4), 437-468 (2006).
[3]
Chin, W.N.: Safe Fusion of Functional Expressions. In: LISP and functional programming, pp. 11-20 (1992).
[4]
Church, A.: The calculi of lambda-conversion. Annals of Mathematics Studies, vol. 6. Princeton University Press, Princeton (1941).
[5]
Coutts, D., Leshchinskiy, R., Stewart, D.: Stream Fusion: From Lists to Streams to Nothing At All. In: ICFP 2007, pp. 315-326 (2007).
[6]
Fegaras, L., Sheard, T., Zhou, T.: Improving Programs which Recurse over Multiple Inductive Structures. In: PEPM 1994 (June 1994).
[7]
Fokkinga, M.M., Meijer, E.: Program calculation properties of continuous algebras. Technical Report CS-R9104. CWI, Amsterdam (January 1991).
[8]
Freyd, P.J.: Remarks on algebraically compact categories. In: Fourman, M.P., Johnstone, P.T., Pitts, A.M. (eds.) Applications of Categories in Computer Science. LMS Lecture Note Series, vol. 177, pp. 95-106. Cambridge University Press, Cambridge (1992).
[9]
Gill, A., Launchbury, J., Peyton Jones, S.L.: A Short Cut to Deforestation. Functional programming languages and computer architecture, 223-232 (1993).
[10]
Hinze, R., Harper, T., James, D.W.H.: Theory and Practice of Fusion. Tech. Rep. CS-RR-11-01. Oxford University Computing Laboratory (2011).
[11]
Hu, Z., Iwasaki, H., Takeichi, M.: An Extension of The Acid Rain Theorem. Functional and Logic Programming, 91-105 (1996).
[12]
Johann, P., Ghani, N.: Initial algebra semantics is enough! In: Della Rocca, S.R. (ed.) TLCA 2007. LNCS, vol. 4583, pp. 207-222. Springer, Heidelberg (2007).
[13]
Lambek, J.: A fixpoint theorem for complete categories. Math. Zeitschr. 103, 151- 161 (1968).
[14]
Mac Lane, S.: Categories for the Working Mathematician, 2nd edn. Graduate Texts in Mathematics. Springer, Berlin (1998).
[15]
Meijer, E., Fokkinga, M., Paterson, R.: Functional programming with bananas, lenses, envelopes and barbed wire. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 124-144. Springer, Heidelberg (1991).
[16]
Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: Mason, R.E.A. (ed.) Information Processing 1983, pp. 513-523. North-Holland, Amsterdam (1983).
[17]
Sheard, T., Fegaras, L.: A Fold for All Seasons. Functional programming languages and computer architecture, 233-242 (1993).
[18]
Svenningsson, J.: Shortcut fusion for Accumulating Parameters & Zip-like Functions. In: ICFP 2002, pp. 124-132 (2002).
[19]
Takano, A., Meijer, E.: Shortcut deforestation in calculational form. Functional programming languages and computer architecture, 306-313 (1995).
[20]
Voigtländer, J.: Proving correctness via free theorems: the case of the destroy/- build-rule. Partial Eval. and Semantics-Based Prog. Manip. 13-20 (2008).
[21]
Wadler, P.: Theorems for free! In: FPCA, pp. 347-359 (1989).
[22]
Wadler, P.: Deforestation: transforming programs to eliminate trees. Theoretical Computer Science 73(2), 231-248 (1990).
[23]
Wang, M., Gibbons, J., Matsuda, K., Hu, Z.: Gradual refinement: Blending pattern matching with data abstraction. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 397-425. Springer, Heidelberg (2010).

Cited By

View all
  • (2015)Fold-based fusion as a library: a generative programming pearlProceedings of the 6th ACM SIGPLAN Symposium on Scala10.1145/2774975.2774981(41-50)Online publication date: 13-Jun-2015
  • (2014)The HERMIT in the streamProceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation10.1145/2543728.2543736(97-108)Online publication date: 11-Jan-2014
  • (2013)Histo- and dynamorphisms revisitedProceedings of the 9th ACM SIGPLAN workshop on Generic programming10.1145/2502488.2502496(1-12)Online publication date: 28-Sep-2013
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Guide Proceedings
IFL'10: Proceedings of the 22nd international conference on Implementation and application of functional languages
September 2010
217 pages
ISBN:9783642242755
  • Editors:
  • Jurriaan Hage,
  • Marco T. Morazán

Sponsors

  • Utrecht University: Utrecht University
  • Microsoft Research: Microsoft Research
  • KNAW: Koninklijke Nederlandse Academie van Wetenschappen

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 01 September 2010

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2015)Fold-based fusion as a library: a generative programming pearlProceedings of the 6th ACM SIGPLAN Symposium on Scala10.1145/2774975.2774981(41-50)Online publication date: 13-Jun-2015
  • (2014)The HERMIT in the streamProceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation10.1145/2543728.2543736(97-108)Online publication date: 11-Jan-2014
  • (2013)Histo- and dynamorphisms revisitedProceedings of the 9th ACM SIGPLAN workshop on Generic programming10.1145/2502488.2502496(1-12)Online publication date: 28-Sep-2013
  • (2012)Sorting with bialgebras and distributive lawsProceedings of the 8th ACM SIGPLAN workshop on Generic programming10.1145/2364394.2364405(69-80)Online publication date: 12-Sep-2012
  • (2011)A library writer's guide to shortcut fusionACM SIGPLAN Notices10.1145/2096148.203468246:12(47-58)Online publication date: 22-Sep-2011
  • (2011)A library writer's guide to shortcut fusionProceedings of the 4th ACM symposium on Haskell10.1145/2034675.2034682(47-58)Online publication date: 22-Sep-2011

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media