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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- U. A. Acar, G. E. Blelloch, and K. Tangwongsan. Non-oblivious retroactive data structures. Technical report, Carnegie Mellon University, 2007.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- R. Bellman. phDynamic Programming. Princeton University Press, 1957. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Y.-J. Chiang and R. Tamassia. Dynamic algorithms in computational geometry. Proceedings of the IEEE, 80 (9): 1412--1434, 1992.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- R. Hoover. phIncremental Graph Evaluation. PhD thesis, Department of Computer Science, Cornell University, May 1987. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- D. Michie. "Memo" Functions and Machine Learning. phNature, 218: 19--22, 1968.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Traceable data types for self-adjusting computation
Recommendations
Traceable data types for self-adjusting computation
PLDI '10Self-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 ...
An experimental analysis of self-adjusting computation
Recent work on adaptive functional programming (AFP) developed techniques for writing programs that can respond to modifications to their data by performing change propagation. To achieve this, executions of programs are represented with dynamic ...
Functional programming for dynamic and large data with self-adjusting computation
ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programmingCombining type theory, language design, and empirical work, we present techniques for computing with large and dynamically changing datasets. Based on lambda calculus, our techniques are suitable for expressing a diverse set of algorithms on large ...







Comments