ABSTRACT
Translation validation establishes a posteriori the correctness of a run of a compilation pass or other program transformation. In this paper, we develop an efficient translation validation algorithm for the Lazy Code Motion (LCM) optimization. LCM is an interesting challenge for validation because it is a global optimization that moves code across loops. Consequently, care must be taken not to move computations that may fail before loops that may not terminate. Our validator includes a specific check for anticipability to rule out such incorrect moves. We present a mechanically-checked proof of correctness of the validation algorithm, using the Coq proof assistant. Combining our validator with an unverified implementation of LCM, we obtain a LCM pass that is provably semantics-preserving and was integrated in the CompCert formally verified compiler.
- Clark W. Barret, Yi Fang, Benjamin Goldberg, Ying Hu, Amir Pnueli, and Lenore Zuck. TVOC: A translation validator for optimizing compilers. In phComputer Aided Verification, 17th Int. Conf., CAV 2005, volume 3576 of Lecture Notes in Computer ScienceLNCS, pages 291---295. Springer, 2005. Google Scholar
Digital Library
- Yves Bertot and Pierre Castéran. phInteractive Theorem Proving and Program Development --- Coq'Art: The Calculus of Inductive Constructions. EATCS Texts in Theoretical Computer Science. Springer, 2004. Google Scholar
Digital Library
- Rastislav Bodík, Rajiv Gupta, and Mary Lou Soffa. Complete removal of redundant expressions. In phPLDI'98: Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, pages 1--14. ACM, 1998. Google Scholar
Digital Library
- CoqCoq development team. The Coq proof assistant. Software and documentation available at http://coq.inria.fr/, 1989--2009.Google Scholar
- Sumit Gulwani and George C. Necula. A polynomial-time algorithm for global value numbering. In phStatic Analysis, 11th Int. Symp., SAS 2004, volume 3148 of Lecture Notes in Computer Science, pages 212--227. Springer, 2004.Google Scholar
- Yuqiang Huang, Bruce R. Childers, and Mary Lou Soffa. Catching and identifying bugs in register allocation. In phStatic Analysis, 13th Int. Symp., SAS 2006, volume 4134 of Lecture Notes in Computer Science, pages 281--300. Springer, 2006. Google Scholar
Digital Library
- Aditya Kanade, Amitabha Sanyal, and Uday Khedker. A PVS based framework for validating compiler optimizations. In phSEFM'06: Proceedings of the Fourth IEEE International Conference on Software Engineering and Formal Methods, pages 108--117. IEEE Computer Society, 2006. Google Scholar
Digital Library
- Gerwin Klein and Tobias Nipkow. A machine-checked model for a Java-like language, virtual machine and compiler. ACM Transactions on Programming Languages and Systems Trans. Prog. Lang. Syst., 28 (4): 619--695, 2006. Google Scholar
Digital Library
- Jens Knoop, Oliver Rüthing, and Bernhard Steffen. Lazy code motion. In phProgramming Languages Design and Implementation 1992, pages 224--234. ACM Press, 1992. Google Scholar
Digital Library
- Jens Knoop, Oliver Rüthing, and Bernhard Steffen. Optimal code motion: Theory and practice. ACM Transactions on Programming Languages and Systems, 16 (4): 1117--1155, 1994. Google Scholar
Digital Library
- Dirk Leinenbach, Wolfgang Paul, and Elena Petrova. Towards the formal verification of a C0 compiler: Code generation and implementation correctness. In phInt. Conf. on Software Engineering and Formal Methods (SEFM 2005), pages 2--11. IEEE Computer Society Press, 2005. Google Scholar
Digital Library
- Sorin Lerner, Todd Millstein, and Craig Chambers. Automatically proving the correctness of compiler optimizations. In phProgramming Language Design and Implementation 2003, pages 220--231. ACM Press, 2003. Google Scholar
Digital Library
- Xavier Leroy. A formally verified compiler back-end. arXiv:0902.2137 {cs}. Submitted, July 2008.Google Scholar
- Xavier Leroy. Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In 33rd symposium Principles of Programming Languages. Principles of Progr. Lang, pages 42--54. ACM Press, 2006. Google Scholar
Digital Library
- Xavier Leroy and Sandrine Blazy. Formal verification of a C-like memory model and its uses for verifying program transformations. Journal of Automated Reasoning, 41 (1): 1--31, 2008. Google Scholar
Digital Library
- Xavier Leroy et al. The CompCert verified compiler. Development available at http://compcert.inria.fr, 2004--2009.Google Scholar
- Etienne Morel and Claude Renvoise. Global optimization by suppression of partial redundancies. Communication of the ACM, 22 (2): 96--103, 1979. Google Scholar
Digital Library
- George C. Necula. Translation validation for an optimizing compiler. In Programming Language Design and Implementation 2000, pages 83--95. ACM Press, 2000. Google Scholar
Digital Library
- Amir Pnueli, Ofer Shtrichman, and Michael Siegel. The code validation tool (CVT) -- automatic verification of a compilation process. phInternational Journal on Software Tools for Technology Transfer, 2: 192--201, 1998a.Google Scholar
- Amir Pnueli, Michael Siegel, and Eli Singerman. Translation validation. In phTools and Algorithms for Construction and Analysis of Systems, TACAS'98, volume 1384 of Lecture Notes in Computer Science, pages 151--166. Springer, 1998 Google Scholar
Digital Library
- Martin Rinard and Darko Marinov. Credible compilation with pointers. In phWorkshop on Run-Time Result Verification, 1999.Google Scholar
- Xavier Rival. Symbolic transfer function-based approaches to certified compilation. In 31st Principles of Programming Languagessymp. Principles of Progr. Lang, pages 1-13. ACM Press, 2004. Google Scholar
Digital Library
- Bernhard Steffen. Property-oriented expansion. In Static Analysis, Third International Symposium, SAS'96, volume 1145 of Lecture Notes in Computer ScienceLNCS, pages 22--41. Springer, 1996. Google Scholar
Digital Library
- Jean-Baptiste Tristan and Xavier Leroy. Formal verification of translation validators: A case study on instruction scheduling optimizations. In ph35th symposium Principles of Programming Languages, pages 17--27. ACM Press, 2008. Google Scholar
Digital Library
- Anna Zaks and Amir Pnueli. Covac: Compiler validation by program analysis of the cross-product. In phFM 2008: Formal Methods, 15th International Symposium on Formal Methods, volume 5014 of Lecture Notes in Computer Science, pages 35--51. Springer, 2008. Google Scholar
Digital Library
- Lenore Zuck, Amir Pnueli, and Raya Leviathan. Validation of optimizing compilers. Technical Report MCS01-12, Weizmann institute of Science, 2001. Google Scholar
Digital Library
- Lenore Zuck, Amir Pnueli, Yi Fang, and Benjamin Goldberg. VOC: A methodology for translation validation of optimizing compilers. phJournal of Universal Computer Science, 9 (3): 223--247, 2003.Google Scholar
Index Terms
Verified validation of lazy code motion
Recommendations
Formal verification of translation validators: a case study on instruction scheduling optimizations
POPL '08Translation validation consists of transforming a program and a posteriori validating it in order to detect a modification of itssemantics. This approach can be used in a verified compiler, provided that validation is formally proved to be correct. We ...
Verified validation of lazy code motion
PLDI '09Translation validation establishes a posteriori the correctness of a run of a compilation pass or other program transformation. In this paper, we develop an efficient translation validation algorithm for the Lazy Code Motion (LCM) optimization. LCM is ...
Formal verification of translation validators: a case study on instruction scheduling optimizations
POPL '08: Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesTranslation validation consists of transforming a program and a posteriori validating it in order to detect a modification of itssemantics. This approach can be used in a verified compiler, provided that validation is formally proved to be correct. We ...







Comments