skip to main content
research-article

Adapton: composable, demand-driven incremental computation

Published:09 June 2014Publication History
Skip Abstract Section

Abstract

Many researchers have proposed programming languages that support incremental computation (IC), which allows programs to be efficiently re-executed after a small change to the input. However, existing implementations of such languages have two important drawbacks. First, recomputation is oblivious to specific demands on the program output; that is, if a program input changes, all dependencies will be recomputed, even if an observer no longer requires certain outputs. Second, programs are made incremental as a unit, with little or no support for reusing results outside of their original context, e.g., when reordered.

To address these problems, we present λiccdd, a core calculus that applies a demand-driven semantics to incremental computation, tracking changes in a hierarchical fashion in a novel demanded computation graph. λiccdd also formalizes an explicit separation between inner, incremental computations and outer observers. This combination ensures λiccdd programs only recompute computations as demanded by observers, and allows inner computations to be reused more liberally. We present Adapton, an OCaml library implementing λiccdd. We evaluated Adapton on a range of benchmarks, and found that it provides reliable speedups, and in many cases dramatically outperforms state-of-the-art IC approaches.

References

  1. M. Abadi, B. W. Lampson, and J.-J. Lévy. Analysis and caching of dependencies. In ICFP, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. U. A. Acar, G. E. Blelloch, M. Blume, R. Harper, and K. Tangwongsan. A library for self-adjusting computation. ENTCS, 148(2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. U. A. Acar, G. E. Blelloch, M. Blume, and K. Tangwongsan. An experimental analysis of self-adjusting computation. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. U. A. Acar, G. E. Blelloch, and R. Harper. Adaptive functional programming. TOPLAS, 28(6), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. U. A. Acar, A. Ihler, R. Mettu, and O. Sümer. Adaptive Bayesian inference. In NIPS, 2007.Google ScholarGoogle Scholar
  6. U. A. Acar, G. E. Blelloch, K. Tangwongsan, and D. Türkoğlu. Robust kinetic convex hulls in 3D. In ESA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. U. A. Acar, A. Cotter, B. Hudson, and D. Türkoğlu. Dynamic well-spaced point sets. In SoCG, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Bellman. Dynamic Programming. Princeton Univ. Press, 1957.Google ScholarGoogle Scholar
  9. M. A. Bender, R. Cole, E. D. Demaine, M. Farach-Colton, and J. Zito. Two simplified algorithms for maintaining order in a list. In ESA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Carlsson. Monads for incremental computing. In ICFP, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Y. Chen, J. Dunfield, M. A. Hammer, and U. A. Acar. Implicit self-adjusting computation for purely functional programs. In ICFP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Y. Chen, J. Dunfield, and U. A. Acar. Type-directed automatic incrementalization. In PLDI, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. H. Cooper and S. Krishnamurthi. Embedding dynamic dataflow in a call-by-value language. In ESOP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Czaplicki and S. Chong. Asynchronous functional reactive programming for GUIs. In PLDI, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. F. Dietz and D. D. Sleator. Two algorithms for maintaining order in a list. In STOC, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Field and T. Teitelbaum. Incremental reduction in the lambda calculus. In LFP, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Hammer and U. A. Acar. Memory management for self-adjusting computation. In ISMM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Hammer, U. A. Acar, M. Rajagopalan, and A. Ghuloum. A proposal for parallel self-adjusting computation. In DAMP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Hammer, G. Neis, Y. Chen, and U. A. Acar. Self-adjusting stack machines. In OOPSLA, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. A. Hammer, U. A. Acar, and Y. Chen. CEAL: a C-based language for self-adjusting computation. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. A. Hammer, Y. P. Khoo, M. Hicks, and J. S. Foster. Adapton: Composable, demand-driven incremental computation. Technical Report CS-TR-5027, Computer Science Department, University of Maryland, College Park, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Heydon, R. Levin, and Y. Yu. Caching function calls using precise dependencies. In PLDI, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Hoover. Alphonse: Incremental computation as a programming abstraction. In PLDI, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. Hoover and T. Teitelbaum. Efficient incremental evaluation of aggregate values in attribute grammars. In CC, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. E. Hudson. Incremental attribute evaluation: A flexible algorithm for lazy update. TOPLAS, 13(3), 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. N. R. Krishnaswami and N. Benton. A semantic model for graphical user interfaces. In ICFP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Levy. Call-by-push-value: A subsuming paradigm. In TLCA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. P. B. Levy. Call-by-push-value: A Functional/imperative Synthesis. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. R. Ley-Wild. Programmable Self-Adjusting Computation. PhD thesis, Computer Science Department, Carnegie Mellon University, Oct. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. R. Ley-Wild, U. A. Acar, and M. Fluet. A cost semantics for self-adjusting computation. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. Ley-Wild, U. A. Acar, and G. E. Blelloch. Non-monotonic self-adjusting computation. In ESOP, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Y. A. Liu and T. Teitelbaum. Systematic derivation of incremental programs. SOCP, 24(1), 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J. McCarthy. A basis for a mathematical theory of computation. In P. Braffort and D. Hirschberg, editors, Computer Programming and Formal Systems. North-Holland, Amsterdam, 1963.Google ScholarGoogle ScholarCross RefCross Ref
  34. L. A. Meyerovich, A. Guha, J. Baskin, G. H. Cooper, M. Greenberg, A. Bromfield, and S. Krishnamurthi. Flapjax: A programming language for ajax applications. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. D. Michie. "Memo" functions and machine learning. Nature, 218, 1968.Google ScholarGoogle Scholar
  36. W. Pugh and T. Teitelbaum. Incremental computation via function caching. In POPL, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. G. Ramalingam and T. Reps. A categorized bibliography on incremental computation. In POPL, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. A. Shankar and R. Bodik. DITTO: Automatic incrementalization of data structure invariant checks (in Java). In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Adapton: composable, demand-driven incremental computation

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!