Abstract
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
To avoid non-termination of the program transformer itself, we assume the input does not contain nonproductive loops such as \(f \ 0 \mathbf{\ where\ } f \ x = f \ x\).
References
Burstall, R., Darlington, J.: A transformation system for developing recursive programs. J. ACM 24(1), 44–67 (1977)
Debois, S.: Imperative program optimization by partial evaluation. In: PEPM (ACM SIGPLAN 2004 Workshop on Partial Evaluation and Program Manipulation), pp. 113–122 (2004)
Ershov, A.P.: On the essence of compilation. In: Neuhold, E. (ed.) Formal Description of Programming Concepts, pp. 391–420. North-Holland, Amsterdam (1978)
Futamura, Y.: Partial evaluation of computation process - an approach to a compiler-compiler. High. Order Symb. Comput. 12(4), 381–391 (1999)
Gordon, A.D.: Bisimilarity as a theory of functional programming. Theor. Comput. Sci. 228(1–2), 5–47 (1999)
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)
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)
Hamilton, G.W., Jones, N.D.: Proving the correctness of unfold/fold program transformations using bisimulation. In: Clarke, E., Virbitskaite, I., Voronkov, A. (eds.) PSI 2011. LNCS, vol. 7162, pp. 153–169. Springer, Heidelberg (2012)
Jones, N., Gomard, C., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall, New York (1993)
Jones, N.D.: Computability and Complexity - From a Programming Perspective. Foundations of Computing Series. MIT Press, Cambridge (1997)
Jones, N.D.: Transformation by interpreter specialisation. Sci. Comput. Program. 52, 307–339 (2004)
Lacey, D., Jones, N.D., Wyk, E.V., Frederiksen, C.C.: Compiler optimization correctness by temporal logic. High. Order Symb. Comput. 17(3), 173–206 (2004)
Milner, R.: Communication and Concurrency. PHI Series in Computer Science. Prentice Hall, Upper Saddle River (1989)
Sørensen, M.H., Glück, R., Jones, N.: A positive supercompiler. J. Funct. Program. 6(6), 811–838 (1996)
Turchin, V.F.: Supercompilation: techniques and results. In: Bjorner, D., Broy, M., Pottosin, I.V. (eds.) PSI 1996. LNCS, vol. 1181, pp. 227–248. Springer, Heidelberg (1996)
Turchin, V.: The concept of a supercompiler. ACM Trans. Program. Lang. Syst. 8(3), 90–121 (1986)
Wadler, P.: Deforestation: transforming programs to eliminate trees. In: Ganzinger, H. (ed.) ESOP 1988. LNCS, vol. 300, pp. 344–358. Springer, Heidelberg (1988)
Acknowledgement
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).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Jones, N.D., Hamilton, G.W. (2015). Asymptotic Speedups, Bisimulation and Distillation (Work in Progress). In: Voronkov, A., Virbitskaite, I. (eds) Perspectives of System Informatics. PSI 2014. Lecture Notes in Computer Science(), vol 8974. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-46823-4_15
Download citation
DOI: https://doi.org/10.1007/978-3-662-46823-4_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-46822-7
Online ISBN: 978-3-662-46823-4
eBook Packages: Computer ScienceComputer Science (R0)