Skip to main content

Higher-Order Pattern Matching for Automatically Applying Fusion Transformations

  • Conference paper
  • First Online:
Programs as Data Objects (PADO 2001)

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

Included in the following conference series:

Abstract

We give an algorithm for higher-order pattern matching in the context of automatic program transformation. In particular, we show how accumulating parameter optimisations of functional programs can be automatically derived with the aid of programmer annotations. These techniques have been successfully applied to some complex manual derivations in the literature, such as Bird’s “longest path-sequence”.

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. H. P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. Studies in Logic and the Foundations of Mathematics. North-Holland, 1984.

    MATH  Google Scholar 

  2. R. S Bird. The promotion and accumulation strategies in transformational programming. ACM Transactions on Programming Languages and Systems, 6(4):487–504, 1984.

    Article  MATH  MathSciNet  Google Scholar 

  3. R. S Bird. Introduction to Functional Programming in Haskell. International Series in Computer Science. Prentice Hall, 1998.

    Google Scholar 

  4. R. S. Bird and John Hughes. An alpha-beta algorithm: an exercise in program transformation. Information Processing Letters, 24(1):53–57, 1987.

    Article  Google Scholar 

  5. O. Chitil. Type-inference based short cut deforestation (nearly) without inlining. In C. Clack and P. Koopman, editors, Eleventh International Workshop on Implementation of Functional Languages, Lecture Notes in Computer Science. Springer-Verlag, 2000.

    Google Scholar 

  6. H. Comon. Higher-order matching and tree automata. In M. Nielsen and W. Thomas, editors, Proc. Conf. on Computer Science Logic, volume 1414 of Lecture Notes in Computer Science, pages 157–176. Springer-Verlag, 1997.

    Chapter  Google Scholar 

  7. O. de Moor and G. Sittampalam. Generic program transformation. In Third International Summer School on Advanced Functional Programming, volume 1608 of Lecture Notes in Computer Science, pages 116–149. Springer-Verlag, 1998.

    Google Scholar 

  8. O. de Moor and G. Sittampalam. Higher-order matching for program transformation (full report). Theoretical Computer Science, To appear, 2001. Available from URL: http://www.comlab.ox.ac.uk/oucl/users/oege.demoor/pubs.htm.

  9. A. Gill, Launchbury J., and Peyton Jones S.L. A short cut to deforestation. In Conference on Functional Programming Languages and Computer Architecture, pages 223–232, June 1993.

    Google Scholar 

  10. G. Huet and B. Lang. Proving and applying program transformations expressed with second-order patterns. Acta Informatica, 11:31–55, 1978.

    Article  MATH  MathSciNet  Google Scholar 

  11. B. Krieg-Brückner, J. Liu, H. Shi, and B. Wolff. Towards correct, efficient and reusable transformational developments. In M. Broy and S. Jähnichen, editors, KORSO: Methods, Languages, and Tools for the Construction of Correct Software, volume 1009 of Lecture Notes in Computer Science, pages 270–284. Springer-Verlag, 1995.

    Chapter  Google Scholar 

  12. D. Miller. A logic programming language with lambda-abstraction, function variables, and simple unification. Journal of Logic and Computation, 1:479–536, 1991.

    Article  Google Scholar 

  13. T. Nipkow. Functional unification of higher-order patterns. In 8th IEEE Symposium on Logic in Computer Science, pages 64–74. IEEE Computer Society Press, 1993.

    Google Scholar 

  14. Y. Onoue, Z. Hu, H. Iwasaki, and M. Takeichi. A calculational fusion system hylo. In R. S. Bird and L. Meertens, editors, IFIP TC2 Working Conference on Algorithmic Languages and Calculi, pages 76–106. Chapman and Hall, 1997.

    Google Scholar 

  15. S. L. Peyton-Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3–48, 1998.

    Article  Google Scholar 

  16. F. Pfenning and C. Elliott. Higher-order abstract syntax. In Proc. SIGPLAN’ 88 Conf. on Programming Language Design and Implementation, pages 199–208. ACM, 1988.

    Google Scholar 

  17. D. R. Smith. KIDS: A semiautomatic program development system. IEEE Transactions on Software Engineering, 16(9):1024–1043, 1990.

    Article  Google Scholar 

  18. D. A. Wolfram. The Clausal Theory of Types, volume 21 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sittampalam, G., de Moor, O. (2001). Higher-Order Pattern Matching for Automatically Applying Fusion Transformations. In: Danvy, O., Filinski, A. (eds) Programs as Data Objects. PADO 2001. Lecture Notes in Computer Science, vol 2053. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44978-7_13

Download citation

  • DOI: https://doi.org/10.1007/3-540-44978-7_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-44978-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics