Asymptotic Speedups, Bisimulation and Distillation (Work in Progress)
Distillation is a fully automatic program transformation that can yield superlinear program speedups. Bisimulation is a key to the proof that distillation is correct, i.e., preserves semantics. However the proof, based on observational equivalence, is insensitive to program running times. This paper shows how distillation can give superlinear speedups on some “old chestnut” programs well-known from the early program transformation literature: naive reverse, factorial sum, and Fibonacci.
KeywordsFree Variable Label Transition System Case Expression Partial Evaluator Root State
This paper has been much improved as a result of discussions with Luke Ong and Jonathan Kochems at Oxford University. Referee comments were also very useful. This work was supported, in part, by DIKU at the University of Copenhagen, and by Science Foundation Ireland grant 10/CE/I1855 to Lero - the Irish Software Engineering Research Centre (www.lero.ie).
- 2.Debois, S.: Imperative program optimization by partial evaluation. In: PEPM (ACM SIGPLAN 2004 Workshop on Partial Evaluation and Program Manipulation), pp. 113–122 (2004)Google Scholar
- 3.Ershov, A.P.: On the essence of compilation. In: Neuhold, E. (ed.) Formal Description of Programming Concepts, pp. 391–420. North-Holland, Amsterdam (1978)Google Scholar
- 6.Hamilton, G.W.: Distillation: extracting the essence of programs. In: Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 61–70 (2007)Google Scholar
- 7.Hamilton, G.W., Jones, N.D.: Distillation with labelled transition systems. In: PEPM (ACM SIGPLAN 2012 Workshop on Partial Evaluation and Program Manipulation), pp. 15–24. ACM (2012)Google Scholar
- 17.Wadler, P.: Deforestation: transforming programs to eliminate trees. In: Ganzinger, H. (ed.) ESOP 1988. LNCS, vol. 300, pp. 344–358. Springer, Heidelberg (1988) Google Scholar