The Essence of Dataflow Programming

  • Tarmo Uustalu
  • Varmo Vene
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3780)


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.


Modal Logic Stream Function Functional Programming Recursion Scheme Type Constructor 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aczel, P., Adámek, J., Milius, S., Velebil, J.: Infinite trees and completely iterative theories: A coalgebraic view. Theoret. Comput. Sci. 300(1-3), 1–45 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Ashcroft, E.A., Wadge, W.W.: LUCID, The Dataflow Programming Language. Academic Press, New York (1985)zbMATHGoogle Scholar
  3. 3.
    Ashcroft, E.A., Faustini, A.A., Jagannathan, R., Wadge, W.W.: Multidimensional Programming. Oxford University Press, New York (1995)zbMATHGoogle Scholar
  4. 4.
    Barbier, B.: Solving stream equation systems. In: Actes 13mes Journées Francophones des Langages Applicatifs, JFLA 2002, pp. 117–139 (2002)Google Scholar
  5. 5.
    Benton, N., Bierman, G., de Paiva, V., Hyland, M.: Linear lambda-calculus and categorical models revisited. In: Martini, S., Börger, E., Kleine Büning, H., Jäger, G., Richter, M.M. (eds.) CSL 1992. LNCS, vol. 702, pp. 61–84. Springer, Heidelberg (1993)Google Scholar
  6. 6.
    Benton, N., Hughes, J., Moggi, E.: Monads and effects. In: Barthe, G., Dybjer, P., Pinto, L., Saraiva, J. (eds.) APPSEM 2000. LNCS, vol. 2395, pp. 42–122. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  7. 7.
    Bierman, G., de Paiva, V.: On an intuitionistic modal logic. Studia Logica 65(3), 383–416 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Brookes, S., Geva, S.: Computational comonads and intensional semantics. In: Fourman, M.P., Johnstone, P.T., Pitts, A.M. (eds.) Applications of Categories in Computer Science. London Math. Society Lecture Note Series, vol. 177, pp. 1–44. Cambridge Univ. Press, Cambridge (1992)CrossRefGoogle Scholar
  9. 9.
    Caspi, P.: Clocks in dataflow languages. Theoret. Comput. Sci. 94(1), 125–140 (1992)zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Caspi, P., Pouzet, M.: Synchronous Kahn networks. In: Proc. of 1st ACM SIGPLAN Int. Conf. on Functional Programming, ICFP 1996, pp. 226–238. ACM Press, New York (1996); Also in SIGPLAN Notices 31(6), 226–238 (1996)CrossRefGoogle Scholar
  11. 11.
    Caspi, P., Pouzet, M.: A co-iterative characterization of synchronous stream functions. In: Jacobs, B., Moss, L., Reichel, H., Rutten, J. (eds.) Proc. of 1st Wksh. on Coalgebraic Methods in Computer Science, CMCS 1998. Electron. Notes in Theoret. Comput. Sci., vol. 11. Elsevier, Amsterdam (1998)Google Scholar
  12. 12.
    Colaço, J.-L., Girault, A., Hamon, G., Pouzet, M.: Towards a higher-order synchronous data-flow language. In: Proc. of 4th ACM Int. Conf. on Embedded Software, EMSOFT 2004, pp. 230–239. ACM Press, New York (2004)CrossRefGoogle Scholar
  13. 13.
    Colaço, J.-L., Pouzet, M.: Clocks and first class abstract types. In: Alur, R., Lee, I. (eds.) EMSOFT 2003. LNCS, vol. 2855, pp. 134–155. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  14. 14.
    Davies, R., Pfenning, F.: A modal analysis of staged computation. J. of ACM 48(3), 555–604 (2001)CrossRefMathSciNetGoogle Scholar
  15. 15.
    Halbwachs, N., Caspi, P., Raymond, P., Pilaud, D.: The synchronous data flow programming language LUSTRE. Proc. of the IEEE 79(9), 1305–1320 (1991)CrossRefGoogle Scholar
  16. 16.
    Hudak, P., Courtney, A., Nilsson, H., Peterson, J.: Arrows, robots, and functional programming. In: Jeuring, J., Jones, S.L.P. (eds.) AFP 2002. LNCS, vol. 2638, pp. 159–187. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  17. 17.
    Hughes, J.: Generalising monads to arrows. Sci. of Comput. Program. 37(1-3), 67–111 (2000)zbMATHCrossRefGoogle Scholar
  18. 18.
    Hughes, J.: Programming with arrows. In: Vene, V., Uustalu, T. (eds.) AFP 2004. LNCS, vol. 3622, pp. 73–129. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  19. 19.
    Kieburtz, R.B.: Codata and comonads in Haskell. Unpublished manuscript (1999)Google Scholar
  20. 20.
    Kieburtz, R.B.: Coalgebraic techniques for reactive functional programming. In: Actes 11mes Journées Francophones des Langages Applicatifs, JFLA 2000, pp. 131–157 (2000)Google Scholar
  21. 21.
    Lewis, J.R., Shields, M.B., Meijer, E., Launchbury, J.: Implicit parameters: Dynamic scoping with static types. In: Proc. of 27th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL 2000, pp. 108–118. ACM Press, New York (2000)CrossRefGoogle Scholar
  22. 22.
    Moggi, E.: Notions of computation and monads. Inform. and Comput. 93(1), 55–92 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  23. 23.
    Nilsson, H., Courtney, A., Peterson, J.: Functional reactive programming, continued. In: Proc. of 2002 ACM SIGPLAN Wksh. on Haskell, Haskell 2002, pp. 51–64. ACM Press, New York (2002)CrossRefGoogle Scholar
  24. 24.
    Pardo, A.: Generic accumulations. In: Gibbons, J., Jeuring, J. (eds.) Proc. of IFIP TC2/WG2.1 Working Conference on Generic Programming. IFIP Conf. Proc., vol. 243, pp. 49–78. Kluwer, Dordrecht (2003)Google Scholar
  25. 25.
    Paterson, R.: A new notation for arrows. In: Proc. of 6th ACM SIGPLAN Int. Conf. on Functional Programming, ICFP 2001, pp. 229–240. ACM Press, New York (2001); Also in SIGPLAN Notices 36(10), 229–240 (2001)CrossRefGoogle Scholar
  26. 26.
    Paterson, R.: Arrows and computation. In: Gibbons, J., de Moor, O. (eds.) The Fun of Programming, Cornerstones of Computing, pp. 201–222. Palgrave Macillan, Basingstoke (2003)Google Scholar
  27. 27.
    Pouzet, M.: Lucid Synchrone: tutorial and reference manual. Unpublished manuscript (2001)Google Scholar
  28. 28.
    Power, J., Robinson, E.: Premonoidal categories and notions of computation. Math. Structures in Comput. Sci. 7(5), 453–468 (1997)zbMATHCrossRefMathSciNetGoogle Scholar
  29. 29.
    Power, J., Watanabe, H.: Combining a monad and a comonad. Theoret. Comput. Sci. 280(1-2), 137–162 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  30. 30.
    Rutten, J.J.M.M.: Universal coalgebra: a theory of systems. Theoret. Comput. Sci. 249(1), 3–80 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  31. 31.
    Rutten, J.J.M.M.: Behavioural differential equations: a coinductive calculus of streams, automata, and power series. Theoret. Comput. Sci. 308(1-3), 1–53 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  32. 32.
    Uustalu, T., Vene, V.: The dual of substitution is redecoration. In: Hammond, K., Curtis, S. (eds.) Trends in Functional Programming 3, pp. 99–110. Intellect, Bristol (2002)Google Scholar
  33. 33.
    Uustalu, T., Vene, V.: Signals and comonads. In: Musicante, M.A., Lima, R.M.F. (eds.) Proc. of 9th Brazilian Symp. on Programming Languages, SBLP 2005, pp. 215–228. Univ. de Pernambuco, Recife (2005)Google Scholar
  34. 34.
    Uustalu, T., Vene, V., Pardo, A.: Recursion schemes from comonads. Nordic J. of Computing 8(3), 366–390 (2001)zbMATHMathSciNetGoogle Scholar
  35. 35.
    Wadler, P.: The essence of functional programming. In: Conf. Record of 19th Ann. ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL 1992, pp. 1–14. ACM Press, New York (1992)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Tarmo Uustalu
    • 1
  • Varmo Vene
    • 2
  1. 1.Inst. of Cybernetics at Tallinn Univ. of TechnologyTallinnEstonia
  2. 2.Dept. of Computer ScienceUniv. of Tartu, J. Liivi 2TartuEstonia

Personalised recommendations