Abstract
Stream-based programming has been around for a long time, but it is typically restricted to static data-flow networks. By introducing first-class streams that implement the monad interface, we can describe arbitrary dynamic networks in an elegant and consistent way using only two extra primitives besides the monadic operations. This paper presents an efficient stream implementation and demonstrates the compositionality of the constructs by mapping them to functions over natural numbers.
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
Colaço, J.-L., Girault, A., Hamon, G., Pouzet, M.: Towards a Higher-Order Synchronous Data-Flow Language. In: Proceedings of the 4th ACM International Conference on Embedded Software, Pisa, Italy, pp. 230–239. ACM, New York (2004)
Cooper, G.H., Adsul, B.: Embedding dynamic dataflow in a call-by-value language. In: Sestoft, P. (ed.) ESOP 2006. LNCS, vol. 3924, pp. 294–308. Springer, Heidelberg (2006)
Courtney, A., Nilsson, H., Peterson, J.: The Yampa Arcade. In: Proceedings of the 2003 ACM SIGPLAN Haskell Workshop (Haskell 2003), pp. 7–18. ACM Press, New York (2003)
Elliott, C.: Denotational design with type class morphisms, extended version (2009), http://conal.net/papers/type-class-morphisms/
Elliott, C.: Push-pull functional reactive programming. In: Haskell 2009: Proceedings of the 2nd ACM SIGPLAN symposium on Haskell, Edinburgh, Scotland, pp. 25–36. ACM, New York (2009)
Elliott, C., Hudak, P.: Functional reactive animation. In: International Conference on Functional Programming, pp. 263–273 (June 1997)
Erkök, L.: Value Recursion in Monadic Computations. PhD Dissertation, Oregon Graduate Institute School of Science Engineering, OHSU (October 2002)
Halbwachs, N., Caspi, P., Raymond, P., Pilaud, D.: The Synchronous Data-Flow Programming Language LUSTRE. Proceedings of the IEEE 79(9), 1305–1320 (1991)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.: Aspect-oriented programming. In: Liu, Y., Auletta, V. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Liu, H., Cheng, E., Hudak, P.: Causal Commutative Arrows and Their Optimization. In: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, Edinburgh, Scotland, pp. 35–46. ACM, New York (2009)
McBride, C.: The Strathclyde Haskell Enhancement (2009), http://personal.cis.strath.ac.uk/~conor/pub/she/
McBride, C., Paterson, R.: Applicative programming with effects. Journal of Functional Programming 18(1), 1–13 (2008)
Patai, G.: Eventless Reactivity from Scratch. In: Morazán, M.T. (ed.) Draft Proceedings of the 21st International Symposium on Implementation and Application of Functional Languages, South Orange, NJ, USA, pp. 126–140. Seton Hall University (2009)
Uustalu, T., Vene, V.: The Essence of Dataflow Programming. In: Horváth, Z. (ed.) CEFP 2005. LNCS, vol. 4164, pp. 135–167. Springer, Heidelberg (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Patai, G. (2011). Efficient and Compositional Higher-Order Streams. In: Mariño, J. (eds) Functional and Constraint Logic Programming. WFLP 2010. Lecture Notes in Computer Science, vol 6559. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-20775-4_8
Download citation
DOI: https://doi.org/10.1007/978-3-642-20775-4_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-20774-7
Online ISBN: 978-3-642-20775-4
eBook Packages: Computer ScienceComputer Science (R0)