skip to main content
10.1145/1806596.1806650acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Traceable data types for self-adjusting computation

Published:05 June 2010Publication History

ABSTRACT

Self-adjusting computation provides an evaluation model where computations can respond automatically to modifications to their data by using a mechanism for propagating modifications through the computation. Current approaches to self-adjusting computation guarantee correctness by recording dependencies in a trace at the granularity of individual memory operations. Tracing at the granularity of memory operations, however, has some limitations: it can be asymptotically inefficient (\eg, compared to optimal solutions) because it cannot take advantage of problem-specific structure, it requires keeping a large computation trace (often proportional to the runtime of the program on the current input), and it introduces moderately large constant factors in practice.

In this paper, we extend dependence-tracing to work at the granularity of the query and update operations of arbitrary (abstract) data types, instead of just reads and writes on memory cells. This can significantly reduce the number of dependencies that need to be kept in the trace and followed during an update. We define an interface for supporting a traceable version of a data type, which reports the earliest query that depends on (is changed by) revising operations back in time, and implement several such structures, including priority queues, queues, dictionaries, and counters. We develop a semantics for tracing, extend an existing self-adjusting language, ΔML, and its implementation to support traceable data types, and present an experimental evaluation by considering a number of benchmarks. Our experiments show dramatic improvements on space and time, sometimes by as much as two orders of magnitude.

References

  1. M. Abadi, B. W. Lampson, and J.-J. Lévy. Analysis and Caching of Dependencies. In Proceedings of the International Conference on Functional Programming, pages 83--91, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. U. A. Acar, G. E. Blelloch, and R. Harper. Adaptive functional programming. ACM Transactions on Programming Languages and Systems, 28 (6): 990--1034, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. U. A. Acar, G. E. Blelloch, and K. Tangwongsan. Non-oblivious retroactive data structures. Technical report, Carnegie Mellon University, 2007.Google ScholarGoogle Scholar
  4. U. A. Acar, G. E. Blelloch, K. Tangwongsan, and D. Türkouglu. Robust Kinetic Convex Hulls in 3D. In Proceedings of the 16th Annual European Symposium on Algorithms, September 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. U. A. Acar, G. E. Blelloch, M. Blume, R. Harper, and K. Tangwongsan. An experimental analysis of self-adjusting computation. phACM Transactions on Programming Languages and Systems (TOPLAS), 32 (1): 3:1--3:53, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. U. A. Acar, A. Cotter, B. Hudson, and D. Türkouglu. Dynamic well-spaced point sets. In SCG '10: Proceedings of the 26th Annual Symposium on Computational Geometry, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. K. Agarwal, L. J. Guibas, H. Edelsbrunner, J. Erickson, M. Isard, S. Har-Peled, J. Hershberger, C. Jensen, L. Kavraki, P. Koehl, M. Lin, D. Manocha, D. Metaxas, B. Mirtich, D. Mount, S. Muthukrishnan, D. Pai, E. Sacks, J. Snoeyink, S. Suri, and O. Wolefson. Algorithmic issues in modeling motion. ACM Comput. Surv., 34 (4): 550--572, 2002. ISSN 0360-0300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. B. Barber, D. P. Dobkin, and H. Huhdanpaa. The Quickhull Algorithm for Convex Hulls. ACM Trans. Math. Softw., 22 (4): 469--483, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. Bellman. phDynamic Programming. Princeton University Press, 1957. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Carlsson. Monads for Incremental Computing. In Proceedings of the 7th ACM SIGPLAN International Conference on Functional programming, pages 26--35. ACM Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Y.-J. Chiang and R. Tamassia. Dynamic algorithms in computational geometry. Proceedings of the IEEE, 80 (9): 1412--1434, 1992.Google ScholarGoogle Scholar
  12. A. Demers, T. Reps, and T. 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
  13. P. F. Dietz and D. D. Sleator. Two algorithms for maintaining order in a list. In Proceedings of the 19th ACM Symposium on Theory of Computing, pages 365--372, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Eppstein, Z. Galil, and G. F. Italiano. Dynamic graph algorithms. In M. J. Atallah, editor, Algorithms and Theory of Computation Handbook, chapter 8. CRC Press, 1999.Google ScholarGoogle Scholar
  15. J. Field and T. Teitelbaum. Incremental reduction in the lambda calculus. In Proceedings of the ACM '90 Conference on LISP and Functional Programming, pages 307--322, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. A. Hammer, U. A. Acar, and Y. Chen. CEAL: A C-based language for self-adjusting computation. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, June 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Heydon, R. Levin, and Y. Yu. Caching Function Calls Using Precise Dependencies. In Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 311--320, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Hoover. phIncremental Graph Evaluation. PhD thesis, Department of Computer Science, Cornell University, May 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Ley-Wild, M. Fluet, and U. A. Acar. Compiling self-adjusting programs with continuations. In Proceedings of the International Conference on Functional Programming, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Ley-Wild, U. A. Acar, and M. Fluet. A cost semantics for self-adjusting computation. In Proceedings of the 26th Annual ACM Symposium on Principles of Programming Languages, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. McCarthy. A Basis for a Mathematical Theory of Computation. In P. Braffort and D. Hirschberg, editors, Computer Programming and Formal Systems, pages 33--70. North-Holland, Amsterdam, 1963.Google ScholarGoogle ScholarCross RefCross Ref
  22. D. Michie. "Memo" Functions and Machine Learning. phNature, 218: 19--22, 1968.Google ScholarGoogle ScholarCross RefCross Ref
  23. W. Pugh and T. 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
  24. G. Ramalingam and T. Reps. A Categorized Bibliography on Incremental Computation. In Proceedings of the 20th Annual ACM Symposium on Principles of Programming Languages, pages 502--510, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. A. Shankar and R. 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, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. S. Sundaresh and P. Hudak. Incremental compilation via partial evaluation. In Conference Record of the 18th Annual ACM Symposium on Principles of Programming Languages, pages 1--13, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. D. M. Yellin and R. E. Strom. INC: A Language for Incremental Computations. ACM Transactions on Programming Languages and Systems, 13 (2): 211--236, Apr. 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Traceable data types 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
    • Published in

      cover image ACM Conferences
      PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2010
      514 pages
      ISBN:9781450300193
      DOI:10.1145/1806596
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 45, Issue 6
        PLDI '10
        June 2010
        496 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1809028
        Issue’s Table of Contents

      Copyright © 2010 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 5 June 2010

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate406of2,067submissions,20%

    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!