Abstract
Many applications have to maintain evolving data sources as well as views on these sources. If sources change, the corresponding views have to be adapted. Complete recomputation of views is typically too expensive. An alternative is to convert source changes into view changes and apply these to the views. This is the key idea of incremental computing. In this paper, we use Haskell to develop an incremental computing framework. We illustrate the concepts behind this framework by implementing several example computations on sequences. Our framework allows the user to implement incremental computations using arbitrary monad families that encapsulate mutable state. This makes it possible to use highly efficient algorithms for core computations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Acar, U.A.: Self-adjusting computation. Ph.D. thesis, Carnegie Mellon University, Pittsburgh, Pennsylvania, May 2005
Acar, U.A., Blelloch, G., Ley-Wild, R., Tangwongsan, K., Turkoglu, D.: Traceable data types for self-adjusting computation. In: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2010), pp. 483–496. ACM, New York (2010)
Cai, Y., Giarrusso, P.G., Rendel, T., Ostermann, K.: A theory of changes for higher-order languages: incrementalizing \(\lambda \)-calculi by static differentiation. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 145–155. ACM, New York (2014)
Carlsson, M.: Monads for incremental computing. In: Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Programming, pp. 26–35. ACM, New York (2002)
Dietz, P.F., Sleator, D.D.: Two algorithms for maintaining order in a list. Technical report CMU-CS-88-113, Carnegie Mellon University, Pittsburgh, Pennsylvania (1988)
Firsov, D., Jeltsch, W.: incremental-computing-0.0.0.0, Haskell Cabal package, Feburary 2015. http://hackage.haskell.org/package/incremental-computing-0.0.0.0
Firsov, D., Jeltsch, W.: order-maintenance-0.1.1.0, Haskell Cabal package, November 2015. http://hackage.haskell.org/package/order-maintenance-0.1.1.0
Hammer, M.A., Phang, K.Y., Hicks, M., Foster, J.S.: Adapton: composable, demand-driven incremental computation. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2014), pp. 156–166. ACM, New York (2014)
Launchbury, J., Peyton Jones, S.: State in Haskell. LISP Symbol. Comput. 8(4), 293–341 (1995)
Maier, I., Odersky, M.: Higher-order reactive programming with incremental lists. In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920, pp. 707–731. Springer, Heidelberg (2013)
Acknowledgements
We want to thank Umut Acar, Yan Chen, Paolo Giarrusso, Magnús Halldórsson, Giuseppe Italiano, and Tarmo Uustalu for helpful discussions about the topics of this paper. This research was supported by the Estonian Research Council through the individual research grant PUT763, by the ERDF through the national ICTP project Coinduction for Semantics, Analysis, and Verification of Communicating and Concurrent Reactive Software, and by the Estonian Science Foundation through Grant 9398.
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Firsov, D., Jeltsch, W. (2016). Purely Functional Incremental Computing. In: Castor, F., Liu, Y. (eds) Programming Languages. SBLP 2016. Lecture Notes in Computer Science(), vol 9889. Springer, Cham. https://doi.org/10.1007/978-3-319-45279-1_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-45279-1_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-45278-4
Online ISBN: 978-3-319-45279-1
eBook Packages: Computer ScienceComputer Science (R0)