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

Bringing extensibility to verified compilers

Published:05 June 2010Publication History

ABSTRACT

Verified compilers, such as Leroy's CompCert, are accompanied by a fully checked correctness proof. Both the compiler and proof are often constructed with an interactive proof assistant. This technique provides a strong, end-to-end correctness guarantee on top of a small trusted computing base. Unfortunately, these compilers are also challenging to extend since each additional transformation must be proven correct in full formal detail.

At the other end of the spectrum, techniques for compiler correctness based on a domain-specific language for writing optimizations, such as Lerner's Rhodium and Cobalt, make the compiler easy to extend: the correctness of additional transformations can be checked completely automatically. Unfortunately, these systems provide a weaker guarantee since their end-to-end correctness has not been proven fully formally.

We present an approach for compiler correctness that provides the best of both worlds by bridging the gap between compiler verification and compiler extensibility. In particular, we have extended Leroy's CompCert compiler with an execution engine for optimizations written in a domain specific and proved that this execution engine preserves program semantics, using the Coq proof assistant. We present our CompCert extension, XCert, including the details of its execution engine and proof of correctness in Coq. Furthermore, we report on the important lessons learned for making the proof development manageable.

References

  1. N. Benton and N. Tabareau. Compiling functional types to relational specifications for low level imperative code. In TLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Chlipala. A certified type-preserving compiler from lambda calculus to assembly language. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Chlipala. A verified compiler for an impure functional language. In POPL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. de Moura and N. Bjørner. Z3: An efficient SMT solver. In TACAS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Detlefs, G. Nelson, and J. B. Saxe. Simplify: a theorem prover for program checking. J. ACM, 52(3):365--473, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Z. Guyer and C. Lin. Broadway: A compiler for exploiting the domain-specific semantics of software libraries. Proceedings of IEEE, 93(2), 2005.Google ScholarGoogle ScholarCross RefCross Ref
  7. S. Kundu, Z. Tatlock, and S. Lerner. Proving optimizations correct using parameterized program equivalence. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Lerner, T. Millstein, E. Rice, and C. Chambers. Automated soundness proofs for dataflow analyses and transformations via local rules. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. X. Leroy. Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In POPL, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. G. C. Necula. Translation validation for an optimizing compiler. In PLDI, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In TACAS, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Rinard and D. Marinov. Credible compilation with pointers. In Workshop on Run-Time Result Verification, 1999.Google ScholarGoogle Scholar
  13. S. Sarkar, P. Sewell, F. Z. Nardelli, S. Owens, T. Ridge, T. Braibant, M. O. Myreen,, and J. Alglave. The semantics of x86-cc multiprocessor machine code. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J.-B. Tristan and X. Leroy. Formal verification of translation validators: A case study on instruction scheduling optimizations. In POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J.-B. Tristan and X. Leroy. Verified validation of lazy code motion. In PLDI, 2009 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J.-B. Tristan and X. Leroy. A simple, verified validator for software pipelining. In POPL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. L. Whitfield and M. L. Soffa. An approach for exploring code improving transformations. ACM Transactions on Programming Languages and Systems, 19(6):1053--1084, Nov. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. L. Zuck, A. Pnueli, B. Goldberg, C. Barrett, Y. Fang, and Y. Hu. Translation and runtime validation of loop transformations. Form. Methods Syst. Des., 27(3):335--360, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bringing extensibility to verified compilers

          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 '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
            June 2010
            514 pages
            ISBN:9781450300193
            DOI:10.1145/1806596
            • cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 45, Issue 6
              PLDI '10
              June 2010
              496 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/1809028
              Issue’s Table of Contents

            Copyright © 2010 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 5 June 2010

            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!