skip to main content
10.1145/2837614.2837642acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Lightweight verification of separate compilation

Published:11 January 2016Publication History

ABSTRACT

Major compiler verification efforts, such as the CompCert project, have traditionally simplified the verification problem by restricting attention to the correctness of whole-program compilation, leaving open the question of how to verify the correctness of separate compilation. Recently, a number of sophisticated techniques have been proposed for proving more flexible, compositional notions of compiler correctness, but these approaches tend to be quite heavyweight compared to the simple "closed simulations" used in verifying whole-program compilation. Applying such techniques to a compiler like CompCert, as Stewart et al. have done, involves major changes and extensions to its original verification. In this paper, we show that if we aim somewhat lower---to prove correctness of separate compilation, but only for a *single* compiler---we can drastically simplify the proof effort. Toward this end, we develop several lightweight techniques that recast the compositional verification problem in terms of whole-program compilation, thereby enabling us to largely reuse the closed-simulation proofs from existing compiler verifications. We demonstrate the effectiveness of these techniques by applying them to CompCert 2.4, converting its verification of whole-program compilation into a verification of separate compilation in less than two person-months. This conversion only required a small number of changes to the original proofs, and uncovered two compiler bugs along the way. The result is SepCompCert, the first verification of separate compilation for the full CompCert compiler.

References

  1. Andrew W. Appel. Program Logics for Certified Compilers. Cambridge University Press, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Nick Benton and Chung-Kil Hur. Biorthogonality, step-indexing and compiler correctness. In ICFP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Lennart Beringer, Gordon Stewart, Robert Dockins, and Andrew W. Appel. Verified compilation for shared-memory C. In ESOP, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. The CompCert C compiler. http://compcert.inria.fr/.Google ScholarGoogle Scholar
  5. Ronghui Gu, Jérémie Koenig, Tahina Ramananandro, Zhong Shao, Xiongnan (Newman) Wu, Shu-Chun Weng, Haozhong Zhang, and Yu Guo. Deep specifications and certified abstraction layers. In POPL, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Chung-Kil Hur and Derek Dreyer. A Kripke logical relation between ML and assembly. In POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Chung-Kil Hur, Derek Dreyer, Georg Neis, and Viktor Vafeiadis. The marriage of bisimulations and Kripke logical relations. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Chung-Kil Hur, Georg Neis, Derek Dreyer, and Viktor Vafeiadis. The transitive composability of relation transition systems. Technical Report MPI-SWS-2012-002, MPI-SWS, 2012.Google ScholarGoogle Scholar
  9. Ramana Kumar, Magnus Myreen, Michael Norrish, and Scott Owens. CakeML: A verified implementation of ML. In POPL, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Xavier Leroy. Formal verification of a realistic compiler. Communications of the ACM, 52(7):107–115, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Xavier Leroy. A formally verified compiler back-end. Journal of Automated Reasoning, 43(4):363–446, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Georg Neis, Chung-Kil Hur, Jan-Oliver Kaiser, Craig McLaughlin, Derek Dreyer, and Viktor Vafeiadis. Pilsner: A compositionally verified compiler for a higher-order imperative language. In ICFP, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. James T. Perconti and Amal Ahmed. Verifying an open compiler using multi-language semantics. In ESOP, 2014.Google ScholarGoogle Scholar
  14. Tahina Ramananandro, Zhong Shao, Shu-Chun Weng, Jérémie Koenig, and Yuchen Fu. A compositional semantics for verified separate compilation and linking. In CPP, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. SepCompCert. http://sf.snu.ac.kr/sepcompcert/.Google ScholarGoogle Scholar
  16. J. Souyris. Industrial use of CompCert on a safety-critical software product, February 2014. Talk slides available at: http://projects. laas.fr/IFSE/FMF/J3/slides/P05_Jean_Souyiris.pdf.Google ScholarGoogle Scholar
  17. Gordon Stewart, Lennart Beringer, Santiago Cuellar, and Andrew W. Appel. Compositional CompCert. In POPL, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Peng Wang, Santiago Cuellar, and Adam Chlipala. Compiler verification meets cross-language linking via data abstraction. In OOPSLA, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Lightweight verification of separate compilation

        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
          POPL '16: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
          January 2016
          815 pages
          ISBN:9781450335492
          DOI:10.1145/2837614
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 51, Issue 1
            POPL '16
            January 2016
            815 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2914770
            • Editor:
            • Andy Gill
            Issue’s Table of Contents

          Copyright © 2016 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 11 January 2016

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate824of4,130submissions,20%

          Upcoming Conference

          POPL '25

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader