The Essence of Dataflow Programming

We propose a novel, comonadic approach to dataflow (stream-based) computation. This is based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads and on the intuition that comonads in general must be a good means to structure context-dependent computation. In particular, we develop a generic comonadic interpreter of languages for context-dependent computation and instantiate it for stream-based computation. We also discuss distributive laws of a comonad over a monad as a means to structure combinations of effectful and context-dependent computation. We apply the latter to analyse clocked dataflow (partial stream based) computation.

[1]  R. Jagannathan,et al.  Multidimensional programming , 1995 .

[2]  Edmund Robinson,et al.  Premonoidal categories and notions of computation , 1997, Mathematical Structures in Computer Science.

[3]  Marc Pouzet,et al.  A Co-iterative Characterization of Synchronous Stream Functions , 1998, CMCS.

[4]  Venanzio Capretta,et al.  Recursive Coalgebras from Comonads , 2004, CMCS.

[5]  Marc Pouzet,et al.  Towards a higher-order synchronous data-flow language , 2004, EMSOFT '04.

[6]  Peter Aczel,et al.  Infinite trees and completely iterative theories: a coalgebraic view , 2003, Theor. Comput. Sci..

[7]  Tarmo Uustalu,et al.  Recursion Schemes from Comonads , 2001, Nord. J. Comput..

[8]  Nick Benton,et al.  Monads and Effects , 2000, APPSEM.

[9]  John Launchbury,et al.  Recursive monadic bindings , 2000, ICFP '00.

[10]  John Power,et al.  Combining a monad and a comonad , 2002, Theor. Comput. Sci..

[11]  Valeria de Paiva,et al.  On an Intuitionistic Modal Logic , 2000, Stud Logica.

[12]  John Hughes,et al.  Generalising monads to arrows , 2000, Sci. Comput. Program..

[13]  Tarmo Uustalu,et al.  Signals and Comonads , 2005, J. Univers. Comput. Sci..

[14]  Marc Pouzet,et al.  Clocks as First Class Abstract Types , 2003, EMSOFT.

[15]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[16]  Philip Wadler Monads for Functional Programming , 1995, Advanced Functional Programming.

[17]  Jan J. M. M. Rutten,et al.  Universal coalgebra: a theory of systems , 2000, Theor. Comput. Sci..

[18]  S. Brookes,et al.  Applications of Categories in Computer Science: Computational comonads and intensional semantics , 1992 .

[19]  Chris Heunen,et al.  Arrows, like Monads, are Monoids , 2006, MFPS.

[20]  Tarmo Uustalu,et al.  The Essence of Dataflow Programming , 2005, APLAS.

[21]  Marc Pouzet,et al.  Synchronous Kahn networks , 1996, ICFP '96.

[22]  Jan J. M. M. Rutten,et al.  Behavioural differential equations: a coinductive calculus of streams, automata, and power series , 2003, Theor. Comput. Sci..

[23]  John Hughes Programming with Arrows , 2004, Advanced Functional Programming.

[24]  Paul Caspi Clocks in Dataflow Languages , 1992, Theor. Comput. Sci..

[25]  Henrik Nilsson,et al.  Functional reactive programming, continued , 2002, Haskell '02.

[26]  Ichiro Hasuo,et al.  Freyd is Kleisli, for Arrows , 2006, MSFP@MPC.

[27]  Tarmo Uustalu,et al.  The Dual of Substitution is Redecoration , 2001, Scottish Functional Programming Workshop.

[28]  John Launchbury,et al.  Implicit parameters: dynamic scoping with static types , 2000, POPL '00.

[29]  Nick Benton,et al.  Linear Lambda-Calculus and Categorial Models Revisited , 1992, CSL.

[30]  Ross Paterson,et al.  A new notation for arrows , 2001, ICFP '01.

[31]  Paul Hudak,et al.  Arrows, Robots, and Functional Reactive Programming , 2002, Advanced Functional Programming.

[32]  Alberto Pardo Generic Accumulations , 2002, Generic Programming.

[33]  Pascal Raymond,et al.  The synchronous data flow programming language LUSTRE , 1991, Proc. IEEE.

[34]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.