Abstract
This article describes an approach to program optimization based on transformations, where temporal logic is used to specify side conditions, and strategies are created which expand the repertoire of transformations and provide a suitable level of abstraction. We demonstrate the power of this approach by developing a set of optimizations using our transformation language and showing how the transformations can be converted into a form which makes it easier to apply them, while maintaining trust in the resulting optimizing steps. The approach is illustrated through a transformational case study where we apply several optimizations to a small program.
- Aho, A. V., Lam, M. S., Sethi, R., and Ullman, J. D. 2007. Compilers: Principles, Techniques, and Tools, 2nd ed. Pearson Education. Google Scholar
Digital Library
- Akers, S. B. 1978. Binary decision diagrams. IEEE Trans. Comput. 27, 6, 509--516. Google Scholar
Digital Library
- Appel, A. W. 1998. Modern Compiler Implementation in ML. Cambridge University Press. Google Scholar
Digital Library
- Assmann, U. 1996. How to uniformly specify program analyses and transformation with graph rewrite systems. In Conference on Compiler Construction, P. Fritzson, Ed. Lecture Notes in Computer Science, vol. 1060. Springer. Google Scholar
Digital Library
- Assmann, U. 1999. OPTIMIX, A tool for rewriting and optimizing programs. In Graph Grammar Handbook, Vol. II. Chapman-Hall. Google Scholar
Digital Library
- Berndl, M., Lhoták, O., Qian, F., Hendren, L., and Umanee, N. 2003. Points-To analysis using bdds. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'03). ACM, New York, 103--114. Google Scholar
Digital Library
- Boyle, J. M. 1970. A transformational component for programming languages grammar. Tech. rep. ANL-7690, Argonne National Laboratory, Illinois.Google Scholar
- Boyle, J. M. 1989. Abstract programming and program transformation. In Software Reusability Volume 1. Addison-Wesley, 361--413. Google Scholar
Digital Library
- Bryant, R. E. 1986. Graph-Based algorithms for boolean function manipulation. IEEE Trans. Comput. C-35 12, 1035--1044. Google Scholar
Digital Library
- Clarke, E. M., Emerson, E. A., and Sistla, A. P. 1996. Automatic verification of finite-state concurrent systems using temporal logic specifications. ACM Trans. Program. Lang. Syst. 8, 244--263. Google Scholar
Digital Library
- Cleaveland, R. and Steffen, B. 1992. A linear--time model--checking algorithm for the alternation--free modal mu--calculus. In Proceedings of Computer Aided Verification (CAV'91), K. G. Larsen and A. Skou, Eds. Vol. 575. Springer, Berlin, Germany, 48--58. Google Scholar
Digital Library
- Cordy, J. R., Carmichael, I. H., and Halliday, R. 1995. The TXL programming language, version 8. Legasys Corporation.Google Scholar
- Dawson, S., Ramakrishnan, C. R., and Warren, D. S. 1996. Practical program analyses using general purpose logic programming systems—A case study. ACM SIGPLAN Not. 31, 5, 117--126. Google Scholar
Digital Library
- de Moor, O., Drape, S., Lacey, D., and Sittampalam, G. 2003. Incremental program analyses via language factors. Program Tools Group, Oxford.Google Scholar
- de Moor, O. and Sittampalam, G. 2001. Higher-Order matching for program transformation. Theor. Comput. Sci. 269, 1-2, 135--162.Google Scholar
Cross Ref
- Faith, R. E., Nyland, L. S., and Prins, J. F. 1997. KHEPERA: A system for rapid implementation of domain-specific languages. In Proceedings of the USENIX Conference on Domain-Specific Languages, 243--255. Google Scholar
Digital Library
- Fraser, C. W. and Hanson, D. R. 1991. A retargetable compiler for ANSI C. Tech. rep. CS--TR--303--91, Princeton, New Jersey.Google Scholar
- Heckmann, R. 1988. A functional language for the specification of complex tree transformations. In ESOP '88. Lecture Notes in Computer Science. Springer-Verlag, 175--190. Google Scholar
Digital Library
- Jones, S. P., Tolmach, A., and Hoare, T. 2001. Playing by the rules: Rewriting as a practical optimization technique in ghc. In Proceedings of the Haskell Workshop, 203--233.Google Scholar
- Kanade, A., Sanyal, A., and Khedker, U. 2006. A PVS based framework for validating compiler optimizations. In Proceedings of the 4th IEEE International Conference on Software Engineering and Formal Methods (SEFM'06). IEEE Computer Society, 108--117. Google Scholar
Digital Library
- Kanade, A., Sanyal, A., and Khedker, U. 2007. Structuring optimizing transformations and proving them sound. In Proceedings of the 5th International Workshop on Compiler Optimization Meets Compiler Verification (COCV'06).Google Scholar
- Klein, M., Knoop, D., Koschutzki, D., and Steffen, B. 1996. DFA & OPT-METAFrame: A toolkit for program analyses and optimization. In Proceedings of the 2nd International Workshop on Tools and Algorithms for the Construction and Analysis of Systems (TACAS'96). Lecture Notes in Computer Science, vol. 1055. Springer, 422--426. Google Scholar
Digital Library
- Knoop, J. 1998. Optimal interprocedural program optimization: A new framework and its application. Lecture Notes in Computer Science, Tutorial No. 1428. Springer-Verlag. Google Scholar
Digital Library
- Knoop, J., Ruething, O., and Steffen, B. 1992. Lazy code motion. In Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation, 224--234. Google Scholar
Digital Library
- Kozen, D. 1983. Results on the proposition mu-calculus. Theoret. Comput. Sci. 27.Google Scholar
- Lacey, D. 2003. Program transformation using temporal logic specifications. Ph.D. thesis, Oxford University Computing Laboratory.Google Scholar
- Lacey, D. and de Moor, O. 2001. Imperative program transformation by rewriting. In Compiler Construction, R. Wilhelm, Ed. Lecture Notes in Computer Science, vol. 2027. Springer Verlag, 52--68. Google Scholar
Digital Library
- Lacey, D., Jones, N., Wyk, E. V., and Frederikson, C. C. 2004. Proving correctness of compiler optimizations by temporal logic. Higher-Order Symbol. Comput. 17, 2. Google Scholar
Digital Library
- Landi, W. and Ryder, B. 1991. Pointer induced aliasing: A problem classification. In ACM Symposium on Principles of Programming Languages, 93--103. Google Scholar
Digital Library
- Lerner, S., Grove, D., and Chambers, C. 2002. Combining dataflow analyses and transformations. In Conference Record of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'02). Google Scholar
Digital Library
- Lerner, S., Millstein, T., and Chambers, C. 2003. Automatically proving the correctness of compiler optimizations. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Optimization, 220--231. Google Scholar
Digital Library
- Lerner, S., Millstein, T., Rice, E., and Chambers, C. 2005. Automated soundness proofs for dataflow analyses and transformations via local rules. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'05). ACM Press, New York, 364--377. Google Scholar
Digital Library
- Lipps, P., Mönke, U., and Wilhelm, R. 1988. OPTRAN—A language/system for the specification of program transformations: System overview and experiences. In Proceedings of the 2nd Workshop on Compiler Compilers and High Speed Compilation. Lecture Notes in Computer Science, vol. 371. Springer, 52--65. Google Scholar
Digital Library
- McMillan, K. L. 1993. Symbolic Model Checking. Kluwer Academic. Google Scholar
Digital Library
- Muchnick, S. 1997. Advanced Compiler Design and Implementation. Morgan Kaufmann. Google Scholar
Digital Library
- Müller-Olm, M. and Rüthing, O. 2001. On the complexity of constant propagation. In ESOP, D. Sands, Ed. LNCS, vol. 2028. Springer-Verlag.Google Scholar
- Padua, D. A. and Wolfe, M. J. 1986. Advanced compiler optimizations for supercomputers. Commun. ACM 29, 12, 1184--1201. Google Scholar
Digital Library
- Paige, R. 1994. Viewing a program transformation system at work. In Proceedings of the Programming Language Implementation and Logic Programming (PLILP), and Algebraic and Logic Programming (ALP). Lecture Notes in Computer Science, vol. 844. Springer, 5--24. Google Scholar
Digital Library
- Pollock, L. L. and Soffa, M.-L. 1989. An incremental version of iterative data flow analyses. IEEE Trans. Softw. Eng. 15, 12, 1537--1549. Google Scholar
Digital Library
- Sokolsky, O. and Smolka, S. 1994. Incremental model checking in the modal μ-calculus. In Computer Aided Verification, D. Dill, Ed. LNCS, vol. 818. Springer-Verlag, 351--363. Google Scholar
Digital Library
- Steffen, B. 1991. Data flow analyses as model checking. In Proceedings of Theoretical Aspects of Computer Science. 346--364. Google Scholar
Digital Library
- Steffen, B. 1993. Generating data flow analyses algorithms from modal specifications. Sci. Comput. Program. 21, 115--139. Google Scholar
Digital Library
- Steffen, B., Classen, A., Klein, M., Knoop, J., and Margaria, T. 1995. The fixpoint-analyses machine. In Concurrency Theory, 6th International Conference (CONCUR'95). Vol. 962. LNCS, Springer-Verlag. Google Scholar
Digital Library
- Tarjan, R. 1973. Testing flow graph reducibility. In Proceedings of the 5th Annual ACM Symposium on Theory of Computing (STOC'73). ACM, New York, 96--107. Google Scholar
Digital Library
- Tjiang, S. W. K. and Hennessy, J. L. 1992. Sharlit: A tool for building optimizers. SIGPLAN Not. 27, 7, 82--93. Google Scholar
Digital Library
- Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., and Sundaresan, V. 1999. Soot—A java bytecode optimization framework. In Proceedings of the Conference of the Centre for Advanced Studies on Collaborative Research (CASCON'99). IBM Press, 13. Google Scholar
Digital Library
- van Engelen, R. 1998. Ctadel: A generator of efficient codes. Ph.D. thesis, Leiden University.Google Scholar
- van Engelen, R. A. 2001. Efficient symbolic analyses for optimizing compilers. In Compiler Construction, R. Wilhelm, Ed. Lecture Notes in Computer Science, vol. 2027. Springer Verlag. Google Scholar
Digital Library
- Visser, E., Benaissa, Z., and Tolmach, A. 1998. Building program optimizers with rewriting strategies. In International Conference on Functional Programming '98. ACM Press, 13--26. Google Scholar
Digital Library
- Wegman, M. N. and Zadeck, F. K. 1991. Constant propagation with conditional branches. ACM Trans. Program. Lang. Syst. 13, 2, 181--210. Google Scholar
Digital Library
- Whaley, J. and Lam, M. S. 2004. Cloning-Based context-sensitive pointer alias analyses using binary decision diagrams. SIGPLAN Not. 39, 6, 131--144. Google Scholar
Digital Library
- Whitfield, D. 1991. A unifying framework for optimizing transformations. Ph.D. thesis, University of Pittsburgh. Google Scholar
Digital Library
- Whitfield, D. L. and Soffa, M. L. 1997. An approach for exploring code improving transformations. ACM Trans. Program. Lang. Syst. 19, 6, 1053--1084. Google Scholar
Digital Library
- Zhao, W., Cai, B., Whalley, D., W.Bailey, M., Engelen, R. V., Yuan, X., Hiser, J. D., Davidson, J. W., Gallivan, K., and Jones, D. L. 2002. Vista: A system for interactive code improvement. In Proceedings of the ACM SIGPLAN Joint Conference on Languages, Compilers and Tools for Embedded Systems (LCTES'02-SCOPES'02). ACM. Google Scholar
Digital Library
Index Terms
Program transformations using temporal logic side conditions
Recommendations
Compiler Optimization Correctness by Temporal Logic
Rewrite rules with side conditions can elegantly express many classical compiler optimizations for imperative programming languages. In this paper, programs are written in an intermediate language and transformation-enabling side conditions are ...
An unfold/fold transformation framework for definite logic programs
Given a logic program P, an unfold/fold program transformation system derives a sequence of programs P = P0, P1, …, Pn, such that Pi+1 is derived from Pi by application of either an unfolding or a folding step. Unfold/fold transformations have been ...
Completeness of Unfolding for Rewriting Logic Theories
SYNASC '10: Proceedings of the 2010 12th International Symposium on Symbolic and Numeric Algorithms for Scientific ComputingMany transformation systems for program optimization, program synthesis, and program specialization are based on fold/unfold transformations. In this paper, we investigate the semantic properties of a narrowing-based unfolding transformation that is ...






Comments