Higher-Order Pattern Matching for Automatically Applying Fusion Transformations
- 150 Downloads
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”.
KeywordsFusion Rule Minimum Depth Side Condition Program Transformation General Match
Unable to display preview. Download preview PDF.
- R. S Bird. Introduction to Functional Programming in Haskell. International Series in Computer Science. Prentice Hall, 1998.Google Scholar
- 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
- 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
- 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.
- 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
- 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.CrossRefGoogle Scholar
- 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
- 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
- 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
- D. A. Wolfram. The Clausal Theory of Types, volume 21 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1993.Google Scholar