Abstract
Self-adjusting computation is a language-based approach to writing programs that respond dynamically to input changes by maintaining a trace of the computation consistent with the input, thus also updating the output. For monotonic programs, ie where localized input changes cause localized changes in the computation, the trace can be repaired efficiently by insertions and deletions. However, non-local input changes can cause major reordering of the trace. In such cases, updating the trace can be asymptotically equal to running from scratch.
In this paper, we eliminate the monotonicity restriction by generalizing the update mechanism to use trace slices, which are partial fragments of the computation that can be reordered with some bookkeeping. We provide a high-level source language for pure programs, equipped with a notion of trace distance for comparing two runs of a program modulo reordering. The source language is translated into a low-level target language with intrinsic support for non-monotonic update (ie, with reordering). We show that the translation asymptotically preserves the semantics and trace distance, that the cost of update coincides with trace distance, and that updating produces the same answer as a from-scratch run. We describe a concrete algorithm for implementing change-propagation with asymptotic bounds on running time. The concrete algorithm achieves running time bounds which are within O(logn) of the trace distance, where n is the trace length.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Acar, U.A., Blelloch, G.E., Blume, M., Tangwongsan, K.: An experimental analysis of self-adjusting computation. In: PLDI (2006)
Acar, U.A., Blelloch, G.E., Harper, R.: Adaptive functional programming. ACM TOPLAS 28(6), 990–1034 (2006)
Acar, U.A., Blelloch, G.E., Tangwongsan, K., Türkoğlu, D.: Robust kinetic convex hulls in 3D. In: European Symposium on Algorithms (September 2008)
Acar, U.A., Cotter, A., Hudson, B., Türkoğlu, D.: Dynamic well-spaced point sets. In: Symposium on Computational Geometry (2010)
Acar, U.A., Ihler, A., Mettu, R., Sümer, Ö.: Adaptive Bayesian inference. In: Neural Information Processing Systems, NIPS (2007)
Carlsson, M.: Monads for incremental computing. In: ICFP (2002)
Chiang, Y.-J., Tamassia, R.: Dynamic algorithms in computational geometry. Proceedings of the IEEE 80(9), 1412–1434 (1992)
Demers, A., Reps, T., Teitelbaum, T.: Incremental evaluation of attribute grammars with application to syntax-directed editors. In: POPL (1981)
Eppstein, D., Galil, Z., Italiano, G.F.: Dynamic graph algorithms. In: Atallah, M.J. (ed.) Algorithms and Theory of Computation Handbook, ch.8, CRC Press (1999)
Hammer, M.A., Acar, U.A., Chen, Y.: CEAL: a C-based language for self-adjusting computation. In: PLDI (2009)
Ley-Wild, R.: Programmable Self-Adjusting Computation. PhD thesis, CSD, CMU (2010)
Ley-Wild, R., Acar, U.A., Fluet, M.: A cost semantics for self-adjusting computation. In: POPL (2009)
Ley-Wild, R., Fluet, M., Acar, U.A.: Compiling self-adjusting programs with continuations. In: ICFP (2008)
Liu, Y.A., Stoller, S., Teitelbaum, T.: Static caching for incremental computation. ACM TOPLAS 20(3), 546–585 (1998)
Michie, D.: “Memo” functions and machine learning. Nature 218, 19–22 (1968)
Pugh, W., Teitelbaum, T.: Incremental computation via function caching. In: POPL (1989)
Ramalingam, G., Reps, T.: A categorized bibliography on incremental computation. In: POPL (1993)
Shankar, A., Bodik, R.: DITTO: Automatic incrementalization of data structure invariant checks (in Java). In: PLDI (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ley-Wild, R., Acar, U.A., Blelloch, G. (2012). Non-monotonic Self-Adjusting Computation. In: Seidl, H. (eds) Programming Languages and Systems. ESOP 2012. Lecture Notes in Computer Science, vol 7211. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28869-2_24
Download citation
DOI: https://doi.org/10.1007/978-3-642-28869-2_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-28868-5
Online ISBN: 978-3-642-28869-2
eBook Packages: Computer ScienceComputer Science (R0)