Self-adjusting stack machines

Self-adjusting computation offers a language-based approach to writing programs that automatically respond to dynamically changing data. Recent work made significant progress in developing sound semantics and associated implementations of self-adjusting computation for high-level, functional languages. These techniques, however, do not address issues that arise for low-level languages, i.e., stack-based imperative languages that lack strong type systems and automatic memory management. In this paper, we describe techniques for self-adjusting computation which are suitable for low-level languages. Necessarily, we take a different approach than previous work: instead of starting with a high-level language with additional primitives to support self-adjusting computation, we start with a low-level intermediate language, whose semantics is given by a stack-based abstract machine. We prove that this semantics is sound: it always updates computations in a way that is consistent with full reevaluation. We give a compiler and runtime system for the intermediate language used by our abstract machine. We present an empirical evaluation that shows that our approach is efficient in practice, and performs favorably compared to prior proposals.

[1]  Pramod Bhatotia,et al.  Incoop: MapReduce for incremental computations , 2011, SoCC.

[2]  Umut A. Acar,et al.  Fast Parallel and Adaptive Updates for Dual-Decomposition Solvers , 2011, AAAI.

[3]  Roger Hoover Incremental Graph Evaluation , 1987 .

[4]  George C. Necula,et al.  CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs , 2002, CC.

[5]  Tim Teitelbaum,et al.  Incremental reduction in the lambda calculus , 1990, LISP and Functional Programming.

[6]  Andrew W. Appel,et al.  SSA is functional programming , 1998, SIGP.

[7]  William Pugh,et al.  Incremental computation via function caching , 1989, POPL '89.

[8]  Guy E. Blelloch,et al.  An experimental analysis of self-adjusting computation , 2006, PLDI '06.

[9]  ChenYan,et al.  Self-adjusting stack machines , 2011 .

[10]  Leonidas J. Guibas,et al.  Algorithmic issues in modeling motion , 2002, CSUR.

[11]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[12]  X. Liy Dynamic Algorithms in Computational Geometry , 2007 .

[13]  Umut A. Acar,et al.  Compiling self-adjusting programs with continuations , 2008, ICFP.

[14]  Umut A. Acar Self-adjusting computation: (an overview) , 2009, PEPM '09.

[15]  Guy E. Blelloch,et al.  Robust Kinetic Convex Hulls in 3D , 2008, ESA.

[16]  Magnus Carlsson Monads for incremental computing , 2002, ICFP '02.

[17]  Umut A. Acar,et al.  A proposal for parallel self-adjusting computation , 2007, DAMP '07.

[18]  Amr Sabry,et al.  The essence of compiling with continuations , 1993, PLDI '93.

[19]  Thomas W. Reps,et al.  A categorized bibliography on incremental computation , 1993, POPL '93.

[20]  Sean R Eddy,et al.  What is dynamic programming? , 2004, Nature Biotechnology.

[21]  Umut A. Acar,et al.  Imperative self-adjusting computation , 2008, POPL '08.

[22]  Paul F. Dietz,et al.  Two algorithms for maintaining order in a list , 1987, STOC.

[23]  Thomas W. Reps,et al.  Incremental evaluation for attribute grammars with application to syntax-directed editors , 1981, POPL '81.

[24]  Daniel M. Yellin,et al.  INC: a language for incremental computations , 1988, PLDI '88.

[25]  Allan Heydon,et al.  Caching function calls using precise dependencies , 2000, PLDI '00.

[26]  Thorsten Altenkirch,et al.  for Data: Differentiating Data Structures , 2005, Fundam. Informaticae.

[27]  Rastislav Bodík,et al.  DITTO: automatic incrementalization of data structure invariant checks (in Java) , 2007, PLDI '07.

[28]  Umut A. Acar,et al.  CEAL: a C-based language for self-adjusting computation , 2009, PLDI '09.

[29]  R. Hoover Incremental graph evaluation (attribute grammar) , 1987 .

[30]  DONALD MICHIE,et al.  “Memo” Functions and Machine Learning , 1968, Nature.

[31]  Umut A. Acar,et al.  Parallelism in dynamic well-spaced point sets , 2011, SPAA '11.

[32]  Umut A. Acar,et al.  Adaptive Bayesian inference , 2007, NIPS 2007.

[33]  Raman Srinivas Sundaresh Incremental computation via partial evaluation , 1992 .

[34]  Umut A. Acar,et al.  Dynamic well-spaced point sets , 2010, Comput. Geom..

[35]  Analysis and caching of dependencies , 1996, ICFP '96.

[36]  John McCarthy,et al.  A basis for a mathematical theory of computation, preliminary report , 1899, IRE-AIEE-ACM '61 (Western).

[37]  Gérard P. Huet,et al.  The Zipper , 1997, Journal of Functional Programming.

[38]  David Eppstein,et al.  Dynamic graph algorithms , 2010 .

[39]  Umut A. Acar,et al.  Memory management for self-adjusting computation , 2008, ISMM '08.

[40]  Paul Hudak,et al.  A theory of incremental computation and its application , 1991, POPL '91.