Results 1 -
3 of
3
Stream Fusion. From Lists to Streams to Nothing at All
- ICFP’07
, 2007
"... This paper presents an automatic deforestation system, stream fusion, based on equational transformations, that fuses a wider range of functions than existing short-cut fusion systems. In particular, stream fusion is able to fuse zips, left folds and functions over nested lists, including list compr ..."
Abstract
-
Cited by 29 (5 self)
- Add to MetaCart
This paper presents an automatic deforestation system, stream fusion, based on equational transformations, that fuses a wider range of functions than existing short-cut fusion systems. In particular, stream fusion is able to fuse zips, left folds and functions over nested lists, including list comprehensions. A distinguishing feature of the framework is its simplicity: by transforming list functions to expose their structure, intermediate values are eliminated by general purpose compiler optimisations. We have reimplemented the Haskell standard List library on top of our framework, providing stream fusion for Haskell lists. By allowing a wider range of functions to fuse, we see an increase in the number of occurrences of fusion in typical Haskell programs. We present benchmarks documenting time and space improvements.
Program Representation Size in an Intermediate Language with Intersection and Union Types
- In Proceedings of the Third Workshop on Types in Compilation (TIC 2000
, 2000
"... The CIL compiler for core Standard ML compiles whole programs using a novel typed intermediate language (TIL) with intersection and union types and ow labels on both terms and types. The CIL term representation duplicates portions of the program where intersection types are introduced and union ..."
Abstract
-
Cited by 9 (7 self)
- Add to MetaCart
The CIL compiler for core Standard ML compiles whole programs using a novel typed intermediate language (TIL) with intersection and union types and ow labels on both terms and types. The CIL term representation duplicates portions of the program where intersection types are introduced and union types are eliminated. This duplication makes it easier to represent type information and to introduce customized data representations. However, duplication incurs compiletime space costs that are potentially much greater than are incurred in TILs employing type-level abstraction or quanti cation. In this paper, we present empirical data on the compile-time space costs of using CIL as an intermediate language. The data shows that these costs can be made tractable by using suciently ne-grained ow analyses together with standard hash-consing techniques. The data also suggests that nonduplicating formulations of intersection (and union) types would not achieve signi cantly better space complexity.
Constructed Product Result Analysis for Haskell
"... Compilers for ML and Haskell typically go to a good deal of trouble to arrange that multiple arguments can be passed eciently to a procedure. For some reason, less effort seems to be invested in ensuring that multiple results can also be returned efficiently. In the context ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
Compilers for ML and Haskell typically go to a good deal of trouble to arrange that multiple arguments can be passed eciently to a procedure. For some reason, less effort seems to be invested in ensuring that multiple results can also be returned efficiently. In the context

