Skip to main content

Stream Fusion for Isabelle’s Code Generator

Rough Diamond

  • Conference paper
  • First Online:
Interactive Theorem Proving (ITP 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9236))

Included in the following conference series:

  • 762 Accesses

Abstract

Stream fusion eliminates intermediate lists in functional code. We formalise stream fusion for finite and coinductive lists in Isabelle/HOL and implement the transformation in the code preprocessor. Our initial results show that optimisations during code extraction can boost the performance of the generated code, but the transformation requires further engineering to be usable in practice.

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 EPUB and 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

References

  1. Coutts, D.: Stream fusion: practical shortcut fusion for coinductive sequence types. Ph.D. thesis, University of Oxford (2010)

    Google Scholar 

  2. Coutts, D., Leshchinskiy, R., Stewart, D.: Stream fusion: from lists to streams to nothing at all. In: ICFP 2007, pp. 315–326. ACM (2007)

    Google Scholar 

  3. Farmer, A., Höner zu Siederdissen, C., Gill, A.: The HERMIT in the stream. In: PEPM 2014, pp. 97–108. ACM (2014)

    Google Scholar 

  4. Gill, A., Launchbury, J., Peyton Jones, S.L.: A short cut to deforestation. In: FPCA 1993, pp. 223–232. ACM (1993)

    Google Scholar 

  5. Haftmann, F., Krauss, A., Kunčar, O., Nipkow, T.: Data refinement in Isabelle/HOL. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 100–115. Springer, Heidelberg (2013)

    Google Scholar 

  6. Huffman, B.: Stream fusion. Archive of Formal Proofs, formal proof development (2009). http://afp.sf.net/entries/Stream-Fusion.shtml

  7. Kanav, S., Lammich, P., Popescu, A.: A conference management system with verified document confidentiality. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 167–183. Springer, Heidelberg (2014)

    Google Scholar 

  8. Lammich, P.: Automatic data refinement. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 84–99. Springer, Heidelberg (2013)

    Google Scholar 

  9. Lochbihler, A.: Light-weight containers for Isabelle: efficient, extensible, nestable. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 116–132. Springer, Heidelberg (2013)

    Google Scholar 

  10. Lochbihler, A., Hölzl, J.: Recursive functions on lazy lists via domains and topologies. In: Klein, G., Gamboa, R. (eds.) ITP 2014. LNCS, vol. 8558, pp. 341–357. Springer, Heidelberg (2014)

    Google Scholar 

  11. Lochbihler, A., Maximova, A.: Stream fusion in HOL with code generation. Archive of Formal Proofs, formal proof development (2014). http://afp.sf.net/entries/Stream_Fusion_Code.shtml

  12. Sternagel, C., Thiemann, R.: Ceta 2.18. http://cl-informatik.uibk.ac.at/software/ceta/ (2014)

  13. Svenningsson, J.: Shortcut fusion for accumulating parameters & zip-like functions. In: ICFP 2002, pp. 124–132. ACM (2002)

    Google Scholar 

Download references

Acknowledgements

We thank Joachim Breitner for helping with analysing the GHC compilation. He, Ralf Sasse, and David Basin helped to improve the presentation.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andreas Lochbihler .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Lochbihler, A., Maximova, A. (2015). Stream Fusion for Isabelle’s Code Generator. In: Urban, C., Zhang, X. (eds) Interactive Theorem Proving. ITP 2015. Lecture Notes in Computer Science(), vol 9236. Springer, Cham. https://doi.org/10.1007/978-3-319-22102-1_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-22102-1_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-22101-4

  • Online ISBN: 978-3-319-22102-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics