## The essence of dataflow programming (short version (2005)

Venue: | Proc. of 3rd Asian Symp. on Programming Languages and Systems, APLAS 2005, v. 3780 of Lect. Notes in Comput. Sci |

Citations: | 2 - 1 self |

### BibTeX

@INPROCEEDINGS{Uustalu05theessence,

author = {Tarmo Uustalu and Varmo Vene},

title = {The essence of dataflow programming (short version},

booktitle = {Proc. of 3rd Asian Symp. on Programming Languages and Systems, APLAS 2005, v. 3780 of Lect. Notes in Comput. Sci},

year = {2005},

pages = {2--18},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

Abstract. 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 contextdependent 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

### Citations

1344 | Introduction to Functional Programming
- Bird, Wadler
(Show Context)
Citation Context ...combinations of effectful and context-dependent computation. We apply the latter to analyse clocked dataflow (partial stream based) computation. 1 Introduction Ever since the work by Moggi and Wadler =-=[22,35]-=-, we know how to reduce impure computations with errors and non-determinism to purely functional computations in a structured fashion using the maybe and list monads.Wealsoknowhow to explain other typ... |

759 | Notions of computation and monads
- Moggi
- 1991
(Show Context)
Citation Context ...combinations of effectful and context-dependent computation. We apply the latter to analyse clocked dataflow (partial stream based) computation. 1 Introduction Ever since the work by Moggi and Wadler =-=[22,35]-=-, we know how to reduce impure computations with errors and non-determinism to purely functional computations in a structured fashion using the maybe and list monads.Wealsoknowhow to explain other typ... |

532 | The synchronous dataflow programming language Lustre
- Halbwachs, Caspi, et al.
- 1991
(Show Context)
Citation Context ...discrete-time signals or streams: the enumeration of the naturals and the graph of the factorial function. The syntax is essentially that of Lucid [2], which is an old intensional language, or Lustre =-=[15]-=- or Lucid Synchrone [10,27], the newer French synchronous dataflow languages. The operator fby reads ‘followed by’ and means initialized unit delay of a discrete-time signal (cons of a stream). K. Yi ... |

316 | Universal coalgebra: A theory of systems
- Rutten
(Show Context)
Citation Context ...oduced a number of papers exploiting the final coalgebraic structure of streams [11,20,4], but apparently nothing on stream functions and comonads. The same is true about works in universal coalgebra =-=[30,31]-=-. 5 Conclusions and Future Work We have shown that notions of dataflow computation can be structured by suitable comonads, thus reinforcing the old idea that one should be able to use comonads to stru... |

195 | A modal Analysis of Staged Computation
- Davies, Pfenning
(Show Context)
Citation Context ... not carry out the project. Comonads have also been used in the semantics of intuitionistic linear logic and modal logics [5,7], with their applications in staged computation and elsewhere, see e.g., =-=[14]-=-,s16 T. Uustalu and V. Vene and to analyse structured recursion schemes, see e.g., [34,24]. In the semantics of intuitionistic linear and modal logics, comonads are symmetric monoidal. Our comonadic a... |

174 | Generalising monads to arrows
- Hughes
- 2000
(Show Context)
Citation Context ... dataflow computation cannot be structured by monads. As a substitute, one can use the laxer framework of Freyd categories or arrow types, proposed independently by Power and Robinson [28] and Hughes =-=[17]-=-. The message of this paper is that while this works, one can alternatively use something much more simple and standard, namely comonads, the formal dual of comonads. Moreover, comonads are even bette... |

102 | Premonoidal categories and notions of computation
- Power, Robinson
- 1997
(Show Context)
Citation Context ...ing 3 Notions of dataflow computation cannot be structured by monads. As a substitute, one can use the laxer framework of Freyd categories or arrow types, proposed independently by Power and Robinson =-=[28]-=- and Hughes [17]. The message of this paper is that while this works, one can alternatively use something much more simple and standard, namely comonads, the formal dual of comonads. Moreover, comonad... |

84 | Implicit parameters: Dynamic scoping with static types
- Lewis, Launchbury, et al.
- 2000
(Show Context)
Citation Context ...omputation have been very few. Brookes and Geva [8] were the first to suggest this application. Kieburtz [19] made an attempt to draw the attention of functional programmers to comonads. Lewis et al. =-=[21]-=- must have contemplated employing the product comonad to handle implicit parameters, but did not carry out the project. Comonads have also been used in the semantics of intuitionistic linear logic and... |

66 |
the data-flow programming language
- Ashcroft, Wadge, et al.
(Show Context)
Citation Context ...represents a dataflow computation which produces two discrete-time signals or streams: the enumeration of the naturals and the graph of the factorial function. The syntax is essentially that of Lucid =-=[2]-=-, which is an old intensional language, or Lustre [15] or Lucid Synchrone [10,27], the newer French synchronous dataflow languages. The operator fby reads ‘followed by’ and means initialized unit dela... |

61 | Synchronous Kahn Networks
- Caspi, Pouzet
- 1996
(Show Context)
Citation Context ... streams: the enumeration of the naturals and the graph of the factorial function. The syntax is essentially that of Lucid [2], which is an old intensional language, or Lustre [15] or Lucid Synchrone =-=[10,27]-=-, the newer French synchronous dataflow languages. The operator fby reads ‘followed by’ and means initialized unit delay of a discrete-time signal (cons of a stream). K. Yi (Ed.): APLAS 2005, LNCS 378... |

56 |
Functional reactive programming, continued
- Nilsson, Courtney, et al.
- 2002
(Show Context)
Citation Context ...t only a de facto standardized arrow library in Haskell, but even specialized syntax [25]. The main application is functional reactive programming with its specializations to animation, robotics etc. =-=[23,16]-=-. Functional reactive programming is continuous-time event-based dataflow programming. Uses of comonads to structure notions of computation have been very few. Brookes and Geva [8] were the first to s... |

54 | The Mozart Effect - Hughes - 2001 |

52 | A new notation for arrows
- Paterson
- 2001
(Show Context)
Citation Context ...en picked up very well by the functional programming community (for overviews, see [26,18]). There exists by now not only a de facto standardized arrow library in Haskell, but even specialized syntax =-=[25]-=-. The main application is functional reactive programming with its specializations to animation, robotics etc. [23,16]. Functional reactive programming is continuous-time event-based dataflow programm... |

52 | Behavioural differential equations: a coinductive calculus of streams, automata, and power series. Theoret
- Rutten
(Show Context)
Citation Context ...oduced a number of papers exploiting the final coalgebraic structure of streams [11,20,4], but apparently nothing on stream functions and comonads. The same is true about works in universal coalgebra =-=[30,31]-=-. 5 Conclusions and Future Work We have shown that notions of dataflow computation can be structured by suitable comonads, thus reinforcing the old idea that one should be able to use comonads to stru... |

50 | Infinite Trees and Completely Iterative Theories: A Coalgebraic View, Theoret - Aczel, Adámek, et al. |

36 |
Clocks in dataflow languages
- Caspi
- 1992
(Show Context)
Citation Context ...ing :< ... 4 Related Work Semantic studies of Lucid, Lustre and Lucid Synchrone-like languages are not many and concentrate largely on the so-called clock calculus for static wellclockedness checking =-=[9,10,13]-=-. Relevantly for us, however, Colaço et al. [12] have very recently proposed a higher-order synchronous dataflow language extending Lucid Synchrone, with two type constructors of function spaces. Hugh... |

29 | Computational comonads and intensional semantics
- Brookes, Geva
- 1991
(Show Context)
Citation Context ...nd reasoning about notions of functions that produce effects, comonads can handle context-dependent functions and are hence highly relevant. This has been suggested earlier, e.g., by Brookes and Geva =-=[8]-=- and Kieburtz [19], but never caught on because of a lack of compelling examples. But now dataflow computation provides clear examples and it hints at a direction in which there are more. Technically,... |

28 | Towards a higher-order synchronous dataflow language
- Colao, Girault, et al.
- 2004
(Show Context)
Citation Context ...Lustre and Lucid Synchrone-like languages are not many and concentrate largely on the so-called clock calculus for static wellclockedness checking [9,10,13]. Relevantly for us, however, Colaço et al. =-=[12]-=- have very recently proposed a higher-order synchronous dataflow language extending Lucid Synchrone, with two type constructors of function spaces. Hughes’s arrows [17] have been picked up very well b... |

23 | Linear lambda calculus and categorical models revisited
- Benton, Bierman, et al.
- 1993
(Show Context)
Citation Context ...templated employing the product comonad to handle implicit parameters, but did not carry out the project. Comonads have also been used in the semantics of intuitionistic linear logic and modal logics =-=[5,7]-=-, with their applications in staged computation and elsewhere, see e.g., [14],s16 T. Uustalu and V. Vene and to analyse structured recursion schemes, see e.g., [34,24]. In the semantics of intuitionis... |

23 | Recursion schemes from comonads
- Uustalu, Vene, et al.
(Show Context)
Citation Context ...stic linear logic and modal logics [5,7], with their applications in staged computation and elsewhere, see e.g., [14],s16 T. Uustalu and V. Vene and to analyse structured recursion schemes, see e.g., =-=[34,24]-=-. In the semantics of intuitionistic linear and modal logics, comonads are symmetric monoidal. Our comonadic approach to stream-based programming is, to the best of our knowledge, entirely new. This i... |

22 | On an intuitionistic modal logic
- Bierman, Paiva
(Show Context)
Citation Context ...templated employing the product comonad to handle implicit parameters, but did not carry out the project. Comonads have also been used in the semantics of intuitionistic linear logic and modal logics =-=[5,7]-=-, with their applications in staged computation and elsewhere, see e.g., [14],s16 T. Uustalu and V. Vene and to analyse structured recursion schemes, see e.g., [34,24]. In the semantics of intuitionis... |

19 | A Co-iterative Characterization of Synchronous Stream Functions
- Caspi, Pouzet
- 1998
(Show Context)
Citation Context ...st of our knowledge, entirely new. This is surprising, given how elementary it is. Workers in dataflow languages have produced a number of papers exploiting the final coalgebraic structure of streams =-=[11,20,4]-=-, but apparently nothing on stream functions and comonads. The same is true about works in universal coalgebra [30,31]. 5 Conclusions and Future Work We have shown that notions of dataflow computation... |

17 |
Clocks as first class abstract types
- Colao, Pouzet
- 2003
(Show Context)
Citation Context ...ing :< ... 4 Related Work Semantic studies of Lucid, Lustre and Lucid Synchrone-like languages are not many and concentrate largely on the so-called clock calculus for static wellclockedness checking =-=[9,10,13]-=-. Relevantly for us, however, Colaço et al. [12] have very recently proposed a higher-order synchronous dataflow language extending Lucid Synchrone, with two type constructors of function spaces. Hugh... |

14 | Arrows and computation
- Paterson
- 2003
(Show Context)
Citation Context ...aflow language extending Lucid Synchrone, with two type constructors of function spaces. Hughes’s arrows [17] have been picked up very well by the functional programming community (for overviews, see =-=[26,18]-=-). There exists by now not only a de facto standardized arrow library in Haskell, but even specialized syntax [25]. The main application is functional reactive programming with its specializations to ... |

13 | Generic accumulations
- Pardo
- 2003
(Show Context)
Citation Context ...stic linear logic and modal logics [5,7], with their applications in staged computation and elsewhere, see e.g., [14],s16 T. Uustalu and V. Vene and to analyse structured recursion schemes, see e.g., =-=[34,24]-=-. In the semantics of intuitionistic linear and modal logics, comonads are symmetric monoidal. Our comonadic approach to stream-based programming is, to the best of our knowledge, entirely new. This i... |

10 |
Programming with arrows
- Hughes
- 2004
(Show Context)
Citation Context ...aflow language extending Lucid Synchrone, with two type constructors of function spaces. Hughes’s arrows [17] have been picked up very well by the functional programming community (for overviews, see =-=[26,18]-=-). There exists by now not only a de facto standardized arrow library in Haskell, but even specialized syntax [25]. The main application is functional reactive programming with its specializations to ... |

8 |
Combining a monad and a comonad. Theoret
- Power, Watanabe
- 2002
(Show Context)
Citation Context ...mputation, a solution is still close at hand. General and causal partialstream functions turn out to be describable in terms of distributive combinations of a comonad and a monad considered, e.g., in =-=[8,29]-=-. For reasons of space, we will only discuss causal partial-stream functions as more relevant. General partialstream functions are handled completely analogously. Givenacomonad(D,ε,− † ) and a monad (... |

7 | The dual of substitution is redecoration
- Uustalu, Vene
- 2002
(Show Context)
Citation Context ... the identity comonad, – DA = A × E, the product comonad, – DA = StrA = νX.A× X, the streams comonad, – DA = νX.A× FX, the cofree comonad over F, – DA = µX.A × FX, the cofree recursive comonad over F =-=[32]-=-. Accidentally, the pragmatics of the product comonad is the same as that of the exponent monad, viz. representation of functions reading an environment. The reason is simple: the Kleisli arrows of th... |

6 |
Codata and comonads
- Kieburtz
- 1999
(Show Context)
Citation Context ...t notions of functions that produce effects, comonads can handle context-dependent functions and are hence highly relevant. This has been suggested earlier, e.g., by Brookes and Geva [8] and Kieburtz =-=[19]-=-, but never caught on because of a lack of compelling examples. But now dataflow computation provides clear examples and it hints at a direction in which there are more. Technically, we show that gene... |

5 | Signals and comonads
- Uustalu, Vene
- 2005
(Show Context)
Citation Context ... Synchrone) will be of additional help. Monads and arrow types are not introduced in this short version of the paper, but comonads and distributive laws are. The paper is related to our earlier paper =-=[33]-=-, which discussed the relevance of comonads for dataflow computation but did not treat comonad-based processing of dataflow languages.s4 T. UustaluandV. Vene 2 Comonads 2.1 Comonads and Context-Depend... |

4 |
Solving stream equation systems
- Barbier
- 2002
(Show Context)
Citation Context ...st of our knowledge, entirely new. This is surprising, given how elementary it is. Workers in dataflow languages have produced a number of papers exploiting the final coalgebraic structure of streams =-=[11,20,4]-=-, but apparently nothing on stream functions and comonads. The same is true about works in universal coalgebra [30,31]. 5 Conclusions and Future Work We have shown that notions of dataflow computation... |

2 |
Arrows, robots, and functional programming.InJ.Jeuring,S.PeytonJones,eds.,Revised Lectures from
- Hudak, Courtney, et al.
- 2003
(Show Context)
Citation Context ...t only a de facto standardized arrow library in Haskell, but even specialized syntax [25]. The main application is functional reactive programming with its specializations to animation, robotics etc. =-=[23,16]-=-. Functional reactive programming is continuous-time event-based dataflow programming. Uses of comonads to structure notions of computation have been very few. Brookes and Geva [8] were the first to s... |

2 |
Coalgebraic techniques for reactive functional programming
- Kieburtz
- 2000
(Show Context)
Citation Context ...st of our knowledge, entirely new. This is surprising, given how elementary it is. Workers in dataflow languages have produced a number of papers exploiting the final coalgebraic structure of streams =-=[11,20,4]-=-, but apparently nothing on stream functions and comonads. The same is true about works in universal coalgebra [30,31]. 5 Conclusions and Future Work We have shown that notions of dataflow computation... |

2 |
Lucid Synchrone: tutorial and reference manual. Unpublished manuscript
- Pouzet
- 2001
(Show Context)
Citation Context ... streams: the enumeration of the naturals and the graph of the factorial function. The syntax is essentially that of Lucid [2], which is an old intensional language, or Lustre [15] or Lucid Synchrone =-=[10,27]-=-, the newer French synchronous dataflow languages. The operator fby reads ‘followed by’ and means initialized unit delay of a discrete-time signal (cons of a stream). K. Yi (Ed.): APLAS 2005, LNCS 378... |