Abstract
Self-adjusting computation offers a language-centric approach to writing programs that can automatically respond to modifications to their data (e.g., inputs). Except for several domain-specific implementations, however, all previous implementations of self-adjusting computation assume mostly functional, higher-order languages such as Standard ML. Prior to this work, it was not known if self-adjusting computation can be made to work with low-level, imperative languages such as C without placing undue burden on the programmer.
We describe the design and implementation of CEAL: a C-based language for self-adjusting computation. The language is fully general and extends C with a small number of primitives to enable writing self-adjusting programs in a style similar to conventional C programs. We present efficient compilation techniques for translating CEAL programs into C that can be compiled with existing C compilers using primitives supplied by a run-time library for self-adjusting computation. We implement the proposed compiler and evaluate its effectiveness. Our experiments show that CEAL is effective in practice: compiled self-adjusting programs respond to small modifications to their data by orders of magnitude faster than recomputing from scratch while slowing down a from-scratch run by a moderate constant factor. Compared to previous work, we measure significant space and time improvements.
- MLton. http://mlton.org/.Google Scholar
- Martín Abadi, Butler W. Lampson, and Jean-Jacques Lévy. Analysis and Caching of Dependencies. In Proceedings of the International Conference on Functional Programming, pages 83--91, 1996. Google Scholar
Digital Library
- Umut A. Acar. Self-adjusting computation (an overview). In Proceedings of ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, 2009. Google Scholar
Digital Library
- Umut A. Acar, Amal Ahmed, and Matthias Blume. Imperative self-adjusting computation. In Proceedings of the 25th Annual ACM Symposium on Principles of Programming Languages, 2008. Google Scholar
Digital Library
- Umut A. Acar, Guy E. Blelloch, Kanat Tangwongsan, and Duru Türkoglu. Robust Kinetic Convex Hulls in 3D. In Proceedings of the 16th Annual European Symposium on Algorithms, September 2008. Google Scholar
Digital Library
- Umut A. Acar, Guy E. Blelloch, and Jorge L. Vittes. An experimental analysis of change propagation in dynamic trees. In Workshop on Algorithm Engineering and Experimentation, 2005.Google Scholar
- Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers: principles, techniques, and tools. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1986. Google Scholar
Digital Library
- Andrew W. Appel. SSA is functional programming. SIGPLAN Not., 33(4):17--20, 1998. Google Scholar
Digital Library
- Henry G. Baker. Cons should not cons its arguments, part II: Cheney on the MTA. SIGPLAN Not., 30(9):17--20, 1995. Google Scholar
Digital Library
- J. A. Bergstra, T. B. Dinesh, and J. Heering. A complete transformational toolkit for compilers. ACM Transactions on Programming Languages and Systems, 19:639--684, 1996. Google Scholar
Digital Library
- Gerth Stolting Brodal and Riko Jacob. Dynamic planar convex hull. In Proceedings of the 43rd Annual IEEE Symposium on Foundations of Computer Science, pages 617--626, 2002. Google Scholar
Digital Library
- Magnus 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
Cross Ref
- Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy. A simple, fast dominance algorithm.Google Scholar
- Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. Efficiently computing static single assignment form and the control dependence graph ACM Transactions on Programming Languages and Systems, 13(4):451--490, 1991. Google Scholar
Digital Library
- Alan Demers, Thomas Reps, and Tim 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
- David Eppstein, Zvi Galil, and Giuseppe F. Italiano. Dynamic graph algorithms. In Mikhail J. Atallah, editor, Algorithms and Theory of Handbook, chapter 8. CRC Press, 1999.Google Scholar
- Matthew Fluet and Stephen Weeks. Contification using dominators. In Proceedings of the International Conference on Functional Programming, pages 2--13, 2001. Google Scholar
Digital Library
- Loukas Georgiadis and Robert E. Tarjan. Finding dominators revisited: extended abstract. In Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms, pages 869--878, 2004. Google Scholar
Digital Library
- Jr. Guy L. Steele. Rabbit: A compiler for scheme. Technical report, Cambridge, MA, USA, 1978. Google Scholar
Digital Library
- Matthew A. Hammer and Umut A. Acar. Memory management for self-adjusting computation. In ISMM '08: Proceedings of the 7th international symposium on Memory management, pages 51--60, 2008. Google Scholar
Digital Library
- Matthew A. Hammer, Umut A. Acar, and Yan Chen. CEAL: A C-based language for self-adjusting computation. Technical Report TTIC-TR-2009-2, Toyota Technological Institute, 2009.Google Scholar
Digital Library
- Simon L Peyton Jones. Implementing lazy functional languages on stock hardware: The spineless tagless g-machine. Journal of Functional Programming, 2:127--202, 1992.Google Scholar
Cross Ref
- Simon Peyton Jones. C--: A portable assembly language. In Proceedings of the 1997 Workshop on Implementing Functional Languages. Springer Verlag, 1998. Google Scholar
Digital Library
- Richard A. Kelsey. A correspondence between continuation passing style and static single assignment form. In Papers from the 1995 ACM SIGPLAN workshop on Intermediate representations, pages 13--22, New York, NY, USA, 1995. ACM. Google Scholar
Digital Library
- Thomas Lengauer and Robert Endre Tarjan. A fast algorithm for finding dominators in a flowgraph. ACM Transactions on Programming Languages and Systems, 1(1):121--141, 1979. Google Scholar
Digital Library
- Ruy Ley-Wild, Matthew Fluet, and Umut A. Acar. Compiling self-adjusting programs with continuations. In Proceedings of the International Conference on Functional Programming, 2008. Google Scholar
Digital Library
- Gary L. Miller and John H. Reif. Parallel tree contraction, part I: Fundamentals Advances in Computing Research, 5:47--72, 1989.Google Scholar
- Gary L. Miller and John H. Reif. Parallel tree contraction, part 2: Further applications. SIAM Journal on Computing, 20(6):1128--1147, 1991. Google Scholar
Digital Library
- Steven S. Muchnick. Advanced compiler design and implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1997. Google Scholar
Digital Library
- George C. Necula, Scott Mcpeak, S. P. Rahul, and Westley Weimer. Cil: Intermediate language and tools for analysis and transformation of C programs. In In International Conference on Compiler Construction, pages 213---228, 2002. Google Scholar
Digital Library
- Mark H. Overmars and Jan van Leeuwen. Maintenance of configurations in the plane. Journal of Computer and System Sciences, 23: 166--204, 1981.Google Scholar
- William Pugh and Tim 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
- Ajeet Shankar and Rastislav 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
- David Tarditi, Peter Lee, and Anurag Acharya. No assembly required: compiling standard ML to C. ACM Letters on Programming Languages and Systems, 1(2):161--177, 1992. Google Scholar
Digital Library
- Andrew Tolmach and Dino P. Oliva. From ML to Ada: Strongly-typed language interoperability via source translation. Journal of Functional Programming, 8(4):367--412, 1998. Google Scholar
Digital Library
Index Terms
CEAL: a C-based language for self-adjusting computation
Recommendations
CEAL: a C-based language for self-adjusting computation
PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and ImplementationSelf-adjusting computation offers a language-centric approach to writing programs that can automatically respond to modifications to their data (e.g., inputs). Except for several domain-specific implementations, however, all previous implementations of ...
Type-directed automatic incrementalization
PLDI '12Application data often changes slowly or incrementally over time. Since incremental changes to input often result in only small changes in output, it is often feasible to respond to such changes asymptotically more efficiently than by re-running the ...
Type-directed automatic incrementalization
PLDI '12: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and ImplementationApplication data often changes slowly or incrementally over time. Since incremental changes to input often result in only small changes in output, it is often feasible to respond to such changes asymptotically more efficiently than by re-running the ...







Comments