Purely Functional Incremental Computing

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9889)

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.

Notes

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.

References

  1. 1.
    Acar, U.A.: Self-adjusting computation. Ph.D. thesis, Carnegie Mellon University, Pittsburgh, Pennsylvania, May 2005Google Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    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)Google Scholar
  4. 4.
    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)Google Scholar
  5. 5.
    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)Google Scholar
  6. 6.
    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
  7. 7.
    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
  8. 8.
    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)Google Scholar
  9. 9.
    Launchbury, J., Peyton Jones, S.: State in Haskell. LISP Symbol. Comput. 8(4), 293–341 (1995)CrossRefGoogle Scholar
  10. 10.
    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)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.Institute of Cybernetics at Tallinn University of TechnologyTallinnEstonia

Personalised recommendations