Shortcut Fusion of Monadic Programs

Cecilia Manzino, Alberto Pardo · Zenodo (CERN European Organization for Nuclear Research) · 2008

Abstract. Functional programs often combine separate parts of the program using intermediate data structures for communicating results. Programs so de-fined are easier to understand and maintain, but suffer from inefficiency prob-lems due to the generation of those data structures. In response to this problem-atic, some program transformation techniques have been studied with the aim to eliminate the intermediate data structures that arise in function compositions. One of these techniques is known as shortcut fusion. This technique has usually been studied in the context of purely functional programs. In this work we pro-pose an extension of shortcut fusion that is able to eliminate intermediate data structures generated in the presence of monadic effects. The extension to be presented can be uniformly defined for a wide class of data types and monads. 1.

Read the paper · More papers on PaperTik