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 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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Ashcroft, E.A., Wadge, W.W.: LUCID, The Dataflow Programming Language. Academic Press, New York (1985)
Ashcroft, E.A., Faustini, A.A., Jagannathan, R., Wadge, W.W.: Multidimensional Programming. Oxford University Press, New York (1995)
Barbier, B.: Solving stream equation systems. In: Actes 13mes Journées Francophones des Langages Applicatifs, JFLA 2002, pp. 117–139 (2002)
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)
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)
Bierman, G., de Paiva, V.: On an intuitionistic modal logic. Studia Logica 65(3), 383–416 (2000)
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)
Capretta, V., Uustalu, T., Vene, V.: Recursive coalgebras from comonads. Inform. and Comput. 204(4), 437–468 (2006)
Caspi, P.: Clocks in dataflow languages. Theoret. Comput. Sci. 94(1), 125–140 (1992)
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 ACM SIGPLAN Notices, 31(6), pp. 226–238 (1996)
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)
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)
Colaço, J.-L., Pouzet, M.: Clocks as first class abstract types. In: Alur, R., Lee, I. (eds.) EMSOFT 2003. LNCS, vol. 2855, pp. 134–155. Springer, Heidelberg (2003)
Davies, R., Pfenning, F.: A modal analysis of staged computation. J. of ACM 48(3), 555–604 (2001)
Erkök, L., Launchbury, J.: Monadic recursive bindings. In: Proc. of 5th ACM SIGPLAN Int. Conf. on Functional Programming, ICFP 2000, pp. 174–185. ACM Press, New York (2000); Also in ACM SIGPLAN Notices,vol. 35(9), pp. 174–185 (2000)
Halbwachs, N., Caspi, P., Raymond, P., Pilaud, D.: The synchronous data flow programming language LUSTRE. Proc. of the IEEE 79(9), 1305–1320 (1991)
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)
Hughes, J.: Generalising monads to arrows. Sci. of Comput. Program 37(1–3), 67–111 (2000)
Hughes, J.: Programming with arrows. In: Vene, V., Uustalu, T. (eds.) AFP 2004. LNCS, vol. 3622, pp. 73–129. Springer, Heidelberg (2005)
Heunen, C., Jacobs, B.: Arrows, like monads, are monoids. In: Brookes, S., Mislove, M. (eds.) Proc. of 22nd Ann. Conf. on Mathematical Foundations of Programming Semantics, MFPS XXII. Electron. Notes in Theoret. Comput. Sci, vol. 158, pp. 219–236. Elsevier, Amsterdam (2006)
Jacobs, B., Hasuo, I.: Freyd is Kleisli, for arrows. In: McBride, C., Uustalu, T. (eds.) Proc. of Wksh. on Mathematically Structured Programming, MSFP 2006. Electron. Wkshs. in Computing. BCS (2006)
Kieburtz, R.B.: Codata and comonads in Haskell (unpublished) (manuscript, 2001)
Kieburtz, R.B.: Coalgebraic techniques for reactive functional programming. In: Actes 11mes Journées Francophones des Langages Applicatifs, JFLA 2000, pp. 131–157 (2000)
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)
Moggi, E.: Notions of computation and monads. Inform. and Comput. 93(1), 55–92 (1991)
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)
Pardo, A.: Generic accumulations. In: Gibbons, J., Jeuring, J. (eds.) Proc. of IFIP TC2/WG2.1 Working Conf. on Generic Programming. IFIP Conf. Proc., vol. 243, pp. 49–78. Kluwer, Dordrecht (2003)
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 ACM SIGPLAN Notices, vol. 36(10), pp. 229–240 (2001)
Paterson, R.: Arrows and computation. In: Gibbons, J., de Moor, O. (eds.) The Fun of Programming, Cornerstones of Computing, pp. 201–222. Palgrave MacMillan, Basingstoke / New York (2003)
Pouzet, M.: Lucid Synchrone: tutorial and reference manual (unpublished) (manuscript, 2001)
Power, J., Robinson, E.: Premonoidal categories and notions of computation. Math. Structures in Comput. Sci. 7(5), 453–468 (1997)
Power, J., Watanabe, H.: Combining a monad and a comonad. Theoret. Comput. Sci. 280(1–2), 137–162 (2002)
Rutten, J.J.M.M.: Universal coalgebra: a theory of systems. Theoret. Comput. Sci. 249(1), 3–80 (2000)
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)
Uustalu, T., Vene, V.: The dual of substitution is redecoration. In: Hammond, K., Curtis, S. (eds.) Trends in Functional Programming, vol. 3, pp. 99–110. Intellect, Bristol / Portland (2002)
Uustalu, T., Vene, V.: Signals and comonads. J. of Univ. Comput. Sci. 11(7), 1310–1326 (2005)
Uustalu, T., Vene, V.: The Essence of Dataflow Programming (short version). In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 2–18. Springer, Heidelberg (2005)
Uustalu, T., Vene, V., Pardo, A.: Recursion schemes from comonads. Nordic J. of Computing 8(3), 366–390 (2001)
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)
Wadler, P.: Monads for functional programming. In: Broy, M. (ed.), Program Design Calculi: Proc. of Marktoberdorf Summer School 1992. NATO ASI Series F, vol. 118, pp. 233–264. Springer, Berlin (1993); Also in Jeuring, J., Meijer, E. (eds.) AFP 1995. LNCS, vol. 925, pp. 24–52. Springer, Heidelberg (1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Uustalu, T., Vene, V. (2006). The Essence of Dataflow Programming. In: Horváth, Z. (eds) Central European Functional Programming School. CEFP 2005. Lecture Notes in Computer Science, vol 4164. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11894100_5
Download citation
DOI: https://doi.org/10.1007/11894100_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-46843-1
Online ISBN: 978-3-540-46845-5
eBook Packages: Computer ScienceComputer Science (R0)