skip to main content
research-article
Public Access

Incremental computation with names

Authors Info & Claims
Published:23 October 2015Publication History
Skip Abstract Section

Abstract

Over the past thirty years, there has been significant progress in developing general-purpose, language-based approaches to incremental computation, which aims to efficiently update the result of a computation when an input is changed. A key design challenge in such approaches is how to provide efficient incremental support for a broad range of programs. In this paper, we argue that first-class names are a critical linguistic feature for efficient incremental computation. Names identify computations to be reused across differing runs of a program, and making them first class gives programmers a high level of control over reuse. We demonstrate the benefits of names by presenting Nominal Adapton, an ML-like language for incremental computation with names. We describe how to use Nominal Adapton to efficiently incrementalize several standard programming patterns---including maps, folds, and unfolds---and show how to build efficient, incremental probabilistic trees and tries. Since Nominal Adapton's implementation is subtle, we formalize it as a core calculus and prove it is from-scratch consistent, meaning it always produces the same answer as simply re-running the computation. Finally, we demonstrate that Nominal Adapton can provide large speedups over both from-scratch computation and Adapton, a previous state-of-the-art incremental computation system.

Skip Supplemental Material Section

Supplemental Material

References

  1. U. A. Acar. Self-Adjusting Computation. PhD thesis, Department of Computer Science, Carnegie Mellon University, May 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. U. A. Acar and R. Ley-Wild. Self-adjusting computation with Delta ML. In Advanced Functional Programming. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. U. A. Acar, G. E. Blelloch, and R. Harper. Adaptive memoization. Technical Report CMU-CS-03-208, Carnegie Mellon University, Nov. 2004.Google ScholarGoogle Scholar
  4. 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
  5. J. Allen. Anatomy of LISP. McGraw-Hill, Inc., New York, NY, USA, 1978. ISBN 0-07-001115-X. C. B. Barber, D. P. Dobkin, and H. Huhdanpaa. The quickhull algorithm for convex hulls. ACM Trans. Math. Softw., 22(4), Dec. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. R. Bellman. Dynamic Programming. Princeton Univ. Press, 1957. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Bhatotia, A. Wieder, R. Rodrigues, U. A. Acar, and R. Pasquin. Incoop: MapReduce for incremental computations. SOCC ’11, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Bhatotia, P. Fonseca, U. A. Acar, B. B. Brandenburg, and R. Rodrigues. iThreads: A threading library for parallel incremental computation. ASPLOS ’15, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Y. Cai, P. G. Giarrusso, T. Rendel, and K. Ostermann. A theory of changes for higher-order languages: Incrementalizing λ-calculi by static differentiation. In PLDI, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Y. Chen, U. A. Acar, and K. Tangwongsan. Functional programming for dynamic and large data with self-adjusting computation. In ICFP, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. H. Cooper and S. Krishnamurthi. Embedding dynamic dataflow in a call-by-value language. In ESOP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Czaplicki and S. Chong. Asynchronous functional reactive programming for GUIs. In PLDI, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Demers, T. Reps, and T. Teitelbaum. Incremental evaluation of attribute grammars with application to syntax-directed editors. In POPL, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J.-C. Filliˆatre and S. Conchon. Type-safe modular hash-consing. In Proceedings of the 2006 Workshop on ML, pages 12–19. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Hammer and U. A. Acar. Memory management for selfadjusting computation. In ISMM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Hammer, G. Neis, Y. Chen, and U. A. Acar. Self-adjusting stack machines. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. A. Hammer, U. A. Acar, and Y. Chen. CEAL: a C-based language for self-adjusting computation. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. A. Hammer, Y. P. Khoo, M. Hicks, and J. S. Foster. Adapton: Composable, demand-driven incremental computation. In PLDI, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. A. Hammer, J. Dunfield, K. Headley, N. Labich, J. S. Foster, M. Hicks, and D. Van Horn. Incremental computation with names (extended version). arXiv:1503.07792 {cs.PL}, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. N. R. Krishnaswami and N. Benton. A semantic model for graphical user interfaces. In ICFP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. B. Levy. Call-by-push-value: A subsuming paradigm. In TLCA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. P. B. Levy. Call-By-Push-Value. PhD thesis, Queen Mary and Westfield College, University of London, 2001.Google ScholarGoogle Scholar
  23. Y. A. Liu and T. Teitelbaum. Systematic derivation of incremental programs. Sci. Comput. Program., 24(1):1–39, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Y. A. Liu, S. Stoller, and T. Teitelbaum. Static caching for incremental computation. ACM Transactions on Programming Languages and Systems, 20(3):546–585, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. McCarthy. A basis for a mathematical theory of computation. In Computer Programming and Formal Systems, 1963.Google ScholarGoogle ScholarCross RefCross Ref
  26. D. Michie. “Memo” functions and machine learning. Nature, 218: 19–22, 1968.Google ScholarGoogle ScholarCross RefCross Ref
  27. R. Mitschke, S. Erdweg, M. Köhler, M. Mezini, and G. Salvaneschi. i3QL: Language-integrated live data views. In OOPSLA, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. W. Pugh. Incremental Computation via Function Caching. PhD thesis, Cornell University, 1988.Google ScholarGoogle Scholar
  29. W. Pugh and T. Teitelbaum. Incremental computation via function caching. In POPL, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. T. Reps. Generating Language-Based Environments. PhD thesis, Cornell University, Aug. 1982a. T. Reps. Optimal-time incremental semantic analysis for syntaxdirected editors. In POPL, 1982b. A. Shankar and R. Bod´ık. DITTO: Automatic incrementalization of data structure invariant checks (in Java). In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. H. Vogt, D. Swierstra, and M. Kuiper. Efficient incremental evaluation of higher order attribute grammars. In PLILP, 1991.Google ScholarGoogle ScholarCross RefCross Ref
  32. G. Winskel. The Formal Semantics of Programming Languages: An Introduction. MIT Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Incremental computation with names

          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!