skip to main content
10.1145/1542476.1542513acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Proving optimizations correct using parameterized program equivalence

Authors Info & Claims
Published:15 June 2009Publication History

ABSTRACT

Translation validation is a technique for checking that, after an optimization has run, the input and output of the optimization are equivalent. Traditionally, translation validation has been used to prove concrete, fully specified programs equivalent. In this paper we present Parameterized Equivalence Checking (PEC), a generalization of translation validation that can prove the equivalence of parameterized programs. A parameterized program is a partially specified program that can represent multiple concrete programs. For example, a parameterized program may contain a section of code whose only known property is that it does not modify certain variables. By proving parameterized programs equivalent, PEC can prove the correctness of transformation rules that represent complex optimizations once and for all, before they are ever run. We implemented our PEC technique in a tool that can establish the equivalence of two parameterized programs. To highlight the power of PEC, we designed a language for implementing complex optimizations using many-to-many rewrite rules, and used this language to implement a variety of optimizations including software pipelining, loop unrolling, loop unswitching, loop interchange, and loop fusion. Finally, to demonstrate the effectiveness of PEC, we used our PEC implementation to verify that all the optimizations we implemented in our language preserve program behavior.

References

  1. Nick Benton. Simple relational correctness proofs for static analyses and and program transformations. In POPL, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. David Cachera, Thomas Jensen, David Pichardie, and Vlad Rusu. Extracting a data flow analyser in constructive logic. In ESOP, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  3. Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Patrick Cousot and Radhia Cousot. Systematic design of program transformation frameworks by abstract interpretation. In POPL, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Detlefs, G. Nelson, and J. Saxe. Simplify: A theorem prover for program checking. Journal of the Association for Computing Machinery, 52(3):365--473, May 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Benjamin Goldberg, Lenore Zuck, and Clark Barrett. Into the loops: Practical issues in translation validation for optimizing compilers. Electronic Notes in Theoretical Computer Science, 132(1):53--71, May 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Guttman, J. Ramsdell, and M. Wand. VLISP: a verified implementation of Scheme. Lisp and Symbolic Compucation, 8(1-2):33--110, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Kauffmann and R.S. Boyer. The Boyer-Moore theorem prover and its interactive enhancement. Computers and Mathematics with Applications, 29(2):27--62, 1995.Google ScholarGoogle ScholarCross RefCross Ref
  9. Wayne Kelly and William Pugh. Finding legal reordering transformations using mappings. In Languages and Compilers for Parallel Computing, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dexter Kozen. Kleene algebra with tests. ACM Transactions on Programming Langauges and Systems, 19(3):427--443, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Sudipta Kundu, Sorin Lerner, and Rajesh Gupta. Automated refinement checking of concurrent systems. In ICCAD, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Sudipta Kundu, Sorin Lerner, and Rajesh Gupta. Validating high-level synthesis. In Computer Aided Vefification (CAV), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. David Lacey, Neil D. Jones, Eric Van Wyk, and Carl Christian. Proving correctness of compiler optimizations by temporal logic. In POPL, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Sorin Lerner, Todd Millstein, and Craig Chambers. Automatically proving the correctness of compiler optimizations. In PLDI, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Sorin Lerner, Todd Millstein, Erika Rice, and Craig Chambers. Automated soundness proofs for dataflow analyses and transformations via local rules. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Xavier Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In POPL, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. Milner. Communication and concurrency. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. Muchnick. Advanced Compiler Design And Implementation. Morgan Kaufmann Publishers, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. Necula. Translation validation for an optimizing compiler. In PLDI, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In TACAS, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. William Pugh. The omega test: a fast and practical integer programming algorithm for dependence analysis. Communications of the ACM, 8:4--13, 1992.Google ScholarGoogle Scholar
  22. Martin Rinard and Darko Marinov. Credible compilation. In Proceedings of the FLoC Workshop Run-Time Result Verification, July 1999.Google ScholarGoogle Scholar
  23. Martin C. Rinard and Pedro C. Diniz. Commutativity analysis: a new analysis framework for parallelizing compilers. In PLDI, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Ganesh Sittampalam, Oege de Moor, and Ken Friis Larsen. Incremental execution of transformation specifications. In POPL, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Bernhard Steffen. Data flow analysis as model checking. In Theoretical Aspects of Computer Science, volume 526 of Lecture Notes in Computer Science, pages 346--364. Springer-Verlag, September 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Steven W. K. Tjiang and John L. Hennessy. Sharlit -- a tool for building optimizers. In PLDI, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Jean-Baptiste Tristan and Xavier Leroy. Verified validation of lazy code motion. In POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Jean-Baptiste Tristan and Xavier Leroy. Formal verification of translation validators: a case study on instruction scheduling optimizations. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Deborah L. Whitfield and Mary Lou Soffa. An approach for exploring code improving transformations. ACM Transactions on Programming Languages and Systems, 19(6):1053--1084, November 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Kwangkeun Yi and Williams Ludwell Harrison III. Automatic generation and management of interprocedural program analyses. In POPL, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. William D. Young. A mechanically verified code generator. Journal of Automated Reasoning, 5(4):493--518, December 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Lenore Zuck, Amir Pnueli, Benjamin Goldberg, Clark Barrett, Yi Fang, and Ying Hu. Translation and run-time validation of loop transformations. Form. Methods Syst. Des., 27(3):335--360, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Proving optimizations correct using parameterized program equivalence

                  Recommendations

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in
                  • Published in

                    cover image ACM Conferences
                    PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation
                    June 2009
                    492 pages
                    ISBN:9781605583921
                    DOI:10.1145/1542476
                    • cover image ACM SIGPLAN Notices
                      ACM SIGPLAN Notices  Volume 44, Issue 6
                      PLDI '09
                      June 2009
                      478 pages
                      ISSN:0362-1340
                      EISSN:1558-1160
                      DOI:10.1145/1543135
                      Issue’s Table of Contents

                    Copyright © 2009 ACM

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 15 June 2009

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • research-article

                    Acceptance Rates

                    Overall Acceptance Rate406of2,067submissions,20%

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader
                  About Cookies On This Site

                  We use cookies to ensure that we give you the best experience on our website.

                  Learn more

                  Got it!