Non-monotonic Self-Adjusting Computation

  • Ruy Ley-Wild
  • Umut A. Acar
  • Guy Blelloch
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7211)

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.

Keywords

Edit Distance Execution Trace Synchronization Mode Dynamic Semantic Trace Distance 
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

  1. 1.
    Acar, U.A., Blelloch, G.E., Blume, M., Tangwongsan, K.: An experimental analysis of self-adjusting computation. In: PLDI (2006)Google Scholar
  2. 2.
    Acar, U.A., Blelloch, G.E., Harper, R.: Adaptive functional programming. ACM TOPLAS 28(6), 990–1034 (2006)CrossRefGoogle Scholar
  3. 3.
    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)Google Scholar
  4. 4.
    Acar, U.A., Cotter, A., Hudson, B., Türkoğlu, D.: Dynamic well-spaced point sets. In: Symposium on Computational Geometry (2010)Google Scholar
  5. 5.
    Acar, U.A., Ihler, A., Mettu, R., Sümer, Ö.: Adaptive Bayesian inference. In: Neural Information Processing Systems, NIPS (2007)Google Scholar
  6. 6.
    Carlsson, M.: Monads for incremental computing. In: ICFP (2002)Google Scholar
  7. 7.
    Chiang, Y.-J., Tamassia, R.: Dynamic algorithms in computational geometry. Proceedings of the IEEE 80(9), 1412–1434 (1992)CrossRefGoogle Scholar
  8. 8.
    Demers, A., Reps, T., Teitelbaum, T.: Incremental evaluation of attribute grammars with application to syntax-directed editors. In: POPL (1981)Google Scholar
  9. 9.
    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)Google Scholar
  10. 10.
    Hammer, M.A., Acar, U.A., Chen, Y.: CEAL: a C-based language for self-adjusting computation. In: PLDI (2009)Google Scholar
  11. 11.
    Ley-Wild, R.: Programmable Self-Adjusting Computation. PhD thesis, CSD, CMU (2010)Google Scholar
  12. 12.
    Ley-Wild, R., Acar, U.A., Fluet, M.: A cost semantics for self-adjusting computation. In: POPL (2009)Google Scholar
  13. 13.
    Ley-Wild, R., Fluet, M., Acar, U.A.: Compiling self-adjusting programs with continuations. In: ICFP (2008)Google Scholar
  14. 14.
    Liu, Y.A., Stoller, S., Teitelbaum, T.: Static caching for incremental computation. ACM TOPLAS 20(3), 546–585 (1998)CrossRefGoogle Scholar
  15. 15.
    Michie, D.: “Memo” functions and machine learning. Nature 218, 19–22 (1968)CrossRefGoogle Scholar
  16. 16.
    Pugh, W., Teitelbaum, T.: Incremental computation via function caching. In: POPL (1989)Google Scholar
  17. 17.
    Ramalingam, G., Reps, T.: A categorized bibliography on incremental computation. In: POPL (1993)Google Scholar
  18. 18.
    Shankar, A., Bodik, R.: DITTO: Automatic incrementalization of data structure invariant checks (in Java). In: PLDI (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Ruy Ley-Wild
    • 1
  • Umut A. Acar
    • 2
  • Guy Blelloch
    • 3
  1. 1.IMDEA Software InstituteSpain
  2. 2.Max-Planck Institute for Software SystemsGermany
  3. 3.Carnegie Mellon UniversityUS

Personalised recommendations