Abstract
Shortcut fusion is a well-known optimization technique for functional programs. Its aim is to transform multi-pass algorithms into single pass ones, achieving deforestation of the intermediate structures that multi-pass algorithms need to construct. Shortcut fusion has already been extended in several ways. It can be applied to monadic programs, maintaining the global effects, and also to obtain circular and higher-order programs. The techniques proposed so far, however, only consider programs defined as the composition of a single producer with a single consumer. In this paper, we analyse shortcut fusion laws to deal with programs consisting of an arbitrary number of function compositions.
This work is funded by ERDF - European Regional Development Fund through the COMPETE Programme (operational programme for competitiveness) and by National Funds through the FCT - Fundação para a Ciência e a Tecnologia (Portuguese Foundation for Science and Technology) within projects FCOMP-01-0124-FEDER-020532 and FCOMP-01-0124-FEDER-022701.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Gill, A., Launchbury, J., Peyton Jones, S.: A short cut to deforestation. In: Functional Programming Languages and Computer Architecture. ACM (1993)
Bird, R.: Using circular programs to eliminate multiple traversals of data. Acta Informatica 21, 239–250 (1984)
Pardo, A., Fernandes, J.P., Saraiva, J.: Shortcut fusion rules for the derivation of circular and higher-order programs. Higher-Order and Symbolic Computation 24(1-2), 115–149 (2011)
Voigtländer, J.: Semantics and pragmatics of new shortcut fusion rules. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 163–179. Springer, Heidelberg (2008)
Swierstra, D., Chitil, O.: Linear, bounded, functional pretty-printing. Journal of Functional Programming 19(1), 1–16 (2009)
Onoue, Y., Hu, Z., Iwasaki, H., Takeichi, M.: A Calculational Fusion System HYLO. In: IFIP TC 2 Working Conference on Algorithmic Languages and Calculi, pp. 76–106. Chapman & Hall (1997)
Launchbury, J., Sheard, T.: Warm fusion: Deriving build-catas from recursive definitions. In: Funct. Prog. Lang. and Computer Architecture. ACM (1995)
Johnsson, T.: Attribute grammars as a functional programming paradigm. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 154–173. Springer, Heidelberg (1987)
de Moor, O., Backhouse, K., Swierstra, S.D.: First-class attribute grammars. Informatica (Slovenia) 24(3) (2000)
Fernandes, J.P., Saraiva, J.: Tools and Libraries to Model and Manipulate Circular Programs. In: Workshop on Partial Eval. and Program Manipulation. ACM (2007)
Fernandes, J.P., Saraiva, J., Seidel, D., Voigtländer, J.: Strictification of circular programs. In: Workshop on Partial Eval. and Program Manipulation. ACM (2011)
Johann, P., Voigtländer, J.: Free theorems in the presence of seq. In: Symposium on Principles of Programming Languages, pp. 99–110. ACM (2004)
Wadler, P.: Theorems for free! In: Functional Programming Languages and Computer Architecture. ACM (1989)
Bird, R., de Moor, O.: Algebra of Programming. Prentice-Hall Inernational Series in Computer Science, vol. 100. Prentice-Hall (1997)
Manzino, C., Pardo, A.: Shortcut Fusion of Monadic Programs. Journal of Universal Computer Science 14(21), 3431–3446 (2008)
Ghani, N., Johann, P.: Short cut fusion for effects. In: TFP 2008. Trends in Functional Programming, vol. 9, pp. 113–128. Intellect (2009)
Pettorossi, A., Skowron, A.: The lambda abstraction strategy for program derivation. Fundamenta Informaticae 12(4), 541–561 (1989)
Takano, A., Meijer, E.: Shortcut deforestation in calculational form. In: Functional Programming Languages and Computer Architecture, pp. 306–313. ACM (1995)
Fernandes, J.P.: Desing, Implementation and Calculation of Circular Programs. PhD thesis, Dept. of Informatics, Univ. of Minho, Portugal (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Pardo, A., Fernandes, J.P., Saraiva, J. (2013). Multiple Intermediate Structure Deforestation by Shortcut Fusion. In: Du Bois, A.R., Trinder, P. (eds) Programming Languages. SBLP 2013. Lecture Notes in Computer Science, vol 8129. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40922-6_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-40922-6_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-40921-9
Online ISBN: 978-3-642-40922-6
eBook Packages: Computer ScienceComputer Science (R0)