skip to main content
10.1145/1480881.1480907acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

A cost semantics for self-adjusting computation

Authors Info & Claims
Published:21 January 2009Publication History

ABSTRACT

Self-adjusting computation is an evaluation model in which programs can respond efficiently to small changes to their input data by using a change-propagation mechanism that updates computation by re-building only the parts affected by changes. Previous work has proposed language techniques for self-adjusting computation and showed the approach to be effective in a number of application areas. However, due to the complex semantics of change propagation and the indirect nature of previously proposed language techniques, it remains difficult to reason about the efficiency of self-adjusting programs and change propagation.

In this paper, we propose a cost semantics for self-adjusting computation that enables reasoning about its effectiveness. As our source language, we consider a direct-style λ-calculus with first-class mutable references and develop a notion of trace distance for source programs. To facilitate asymptotic analysis, we propose techniques for composing and generalizing concrete distances via trace contexts (traces with holes). We then show how to translate the source language into a self-adjusting target language such that the translation (1) preserves the extensional semantics of the source programs and the cost of from-scratch runs, and (2) ensures that change propagation between two evaluations takes time bounded by their relative distance. We consider several examples and analyze their effectiveness by considering upper and lower bounds.

References

  1. Martín Abadi, Butler W. Lampson, and Jean-Jacques Lévy. Analysis and Caching of Dependencies. In Proceedings of the International Conference on Functional Programming (ICFP), pages 83--91, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Umut A. Acar, Guy E. Blelloch, Robert Harper, Jorge L. Vittes, and Maverick Woo. Dynamizing static algorithms with applications to dynamic trees and history independence. In ACM-SIAM Symposium on Discrete Algorithms (SODA), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Umut A. Acar, Guy E. Blelloch, and Jorge L. Vittes. An experimental analysis of change propagation in dynamic trees. In Workshop on Algorithm Engineering and Experimentation (ALENEX), 2005.Google ScholarGoogle Scholar
  4. Umut A. Acar, Guy E. Blelloch, Matthias Blume, and Kanat Tangwongsan. An experimental analysis of self-adjusting computation. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Umut A. Acar, Guy E. Blelloch, and Robert Harper. Adaptive functional programming. ACM Transactions on Programming Languages and Systems (TOPLAS), 28 (6): 990--1034, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Umut A. Acar, Guy E. Blelloch, Kanat Tangwongsan, and Jorge L. Vittes. Kinetic Algorithms via Self-Adjusting Computation. In Proceedings of the 14th Annual European Symposium on Algorithms (ESA), pages 636--647, September 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Umut A. Acar, Amal Ahmed, and Matthias Blume. Imperative self-adjusting computation. In Proceedings of the 25th Annual ACM Symposium on Principles of Programming Languages (POPL), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Umut A. Acar, Guy E. Blelloch, Kanat Tangwongsan, and Duru Türkoglu. Robust Kinetic Convex Hulls in 3D. In Proceedings of the 16th Annual European Symposium on Algorithms (ESA), September 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Umut A. Acar, Alexander Ihler, Ramgopal Mettu, and Özgür Sümer. Adaptive Inference on General Graphical Models. In Uncertainty in Artificial Intelligence (UAI), 2008.Google ScholarGoogle Scholar
  10. Pankaj K. Agarwal, Leonidas J. Guibas, Herbert Edelsbrunner, Jeff Erickson, Michael Isard, Sariel Har-Peled, John Hershberger, Christian Jensen, Lydia Kavraki, Patrice Koehl, Ming Lin, Dinesh Manocha, Dimitris Metaxas, Brian Mirtich, David Mount, S. Muthukrishnan, Dinesh Pai, Elisha Sacks, Jack Snoeyink, Subhash Suri, and Ouri Wolefson. Algorithmic issues in modeling motion. ACM Comput. Surv., 34 (4): 550--572, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Guy Blelloch and John Greiner. Parallelism in sequential functional languages. In FPCA '95: Proceedings of the seventh international conference on Functional programming languages and computer architecture, pages 226--237, 1995. ISBN 0-89791-719-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Guy E. Blelloch and John Greiner. A provable time and space efficient implementation of nesl. In ICFP '96: Proceedings of the first ACM SIGPLAN international conference on Functional programming, pages 213--225. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Magnus Carlsson. Monads for Incremental Computing. In Proceedings of the 7th ACM SIGPLAN International Conference on Functional programming (ICFP), pages 26--35. ACM Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Y.-J. Chiang and R. Tamassia. Dynamic algorithms in computational geometry. Proceedings of the IEEE, 80 (9): 1412--1434, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  15. Gregory H. Cooper and Shriram Krishnamurthi. Embedding Dynamic Dataflow in a Call-by-Value Language. In Proceedings of the 15th Annual European Symposium on Programming (ESOP), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Alan Demers, Thomas Reps, and Tim Teitelbaum. Incremental Evaluation of Attribute Grammars with Application to Syntax-directed Editors. In Proceedings of the 8th Annual ACM Symposium on Principles of Programming Languages, pages 105--116, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Conal Elliott and Paul Hudak. Functional Reactive Animation. In ICFP '97: Proceedings of the second ACM SIGPLAN international conference on Functional programming, pages 263--273. ACM, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. David Eppstein, Zvi Galil, and Giuseppe F. Italiano. Dynamic graph algorithms. In Mikhail J. Atallah, editor, Algorithms and Theory of Computation Handbook, chapter 8. CRC Press, 1999.Google ScholarGoogle Scholar
  19. Leonidas J. Guibas. Kinetic data structures: a state of the art report. In WAFR '98: Proceedings of the third workshop on the algorithmic foundations of robotics, pages 191--209, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Matthew Hammer and Umut A. Acar. Memory Management for Self-Adjusting Computation. In the 2008 International Symposium on Memory Management, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Allan Heydon, Roy Levin, and Yuan Yu. Caching Function Calls Using Precise Dependencies. In Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 311--320, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Ruy Ley-Wild, Umut A. Acar, and Matthew Fluet. A Cost Semantics for Self-Adjusting Computation. Technical Report CMU-CS-08-141, Department of Computer Science, Carnegie Mellon University, July 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ruy Ley-Wild, Matthew Fluet, and Umut A. Acar. Compiling self-adjusting programs with continuations. In Proceedings of the International Conference on Functional Programming (ICFP), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. William Pugh and Tim Teitelbaum. Incremental computation via function caching. In Proceedings of the 16th Annual ACM Symposium on Principles of Programming Languages, pages 315--328, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. G. Ramalingam and T. Reps. A Categorized Bibliography on Incremental Computation. In Proceedings of the 20th Annual ACM Symposium on Principles of Programming Languages (POPL), pages 502--510, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Thomas Reps. Optimal-time incremental semantic analysis for syntax-directed editors. In Proceedings of the 9th Annual Symposium on Principles of Programming Languages (POPL), pages 169--176, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Mads Rosendahl. Automatic complexity analysis. In FPCA '89: Proceedings of the fourth international conference on Functional programming languages and computer architecture, pages 144--156. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. David Sands. Calculi for Time Analysis of Functional Programs. PhD thesis, University of London, Imperial College, September 1990.Google ScholarGoogle Scholar
  29. David Sands. Complexity analysis for a lazy higher-order language. In ESOP '90: Proceedings of the 3rd European Symposium on Programming, pages 361--376. Springer-Verlag, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Patrick M. Sansom and Simon L. Peyton Jones. Time and space profiling for non-strict, higher-order functional languages. In POPL '95: Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 355--366, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Ajeet Shankar and Rastislav Bodik. DITTO: Automatic Incrementalization of Data Structure Invariant Checks (in Java). In Proceedings of the ACM SIGPLAN 2007 Conference on Programming language Design and Implementation (PLDI), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Daniel Spoonhower, Guy E. Blelloch, Robert Harper, and Phillip B. Gibbons. Space profiling for parallel functional programs. In Proceedings of the International Conference on Functional Programming (ICFP), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Philip Wadler and R. J. M. Hughes. Projections for strictness analysis. In Proc. of Functional programming languages and computer architecture, pages 385--407. Springer-Verlag, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. D. M. Yellin and R. E. Strom. INC: A Language for Incremental Computations. ACM Transactions on Programming Languages and Systems, 13 (2): 211--236, April 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A cost semantics for self-adjusting 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

    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!