Non-monotonic self-adjusting computation

  • Authors:
  • Ruy Ley-Wild;Umut A. Acar;Guy Blelloch

  • Affiliations:
  • IMDEA Software Institute, Spain;Max-Planck Institute for Software Systems, Germany;Carnegie Mellon University

  • Venue:
  • ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

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.