Spivey has recently presented a novel functional representation that supports the efficient composition, or merging, of coroutine pipelines for processing streams of data. This representation was inspired by Shivers and Might's three-continuation approach and is shown to be equivalent to a simple yet inefficient executable specification. Unfortunately, neither Shivers and Might's original work nor the equivalence proof sheds much light on the underlying principles allowing the derivation of this efficient representation from its specification. This paper gives the missing insight by reconstructing a systematic derivation in terms of known transformation steps from the simple specification to the efficient representation. This derivation sheds light on the limitations of the representation and on its applicability to other settings. In particular, it has enabled us to obtain a similar representation for pipes featuring two-way communication, similar to the Haskell pipes library. Our benchmarks confirm that this two-way representation retains the same improved performance characteristics. ispartof: pages:133-149 ispartof: Lecture Notes in Computer Science vol:11372 pages:133-149 ispartof: PADL 2019 - 21st International Symposium on Practical Aspects of Declarative Languages location:Cascais/Lisbon, Portugal date:14 Jan - 15 Jan 2019 status: Published online
The different versions of the original document can be found in:
DOIS: 10.1017/s0956796820000192 10.1007/978-3-030-05998-9_9
Published on 01/01/2018
Volume 2018, 2018
DOI: 10.1017/s0956796820000192
Licence: Other
Are you one of the authors of this document?