skip to main content
research-article
Public Access

Compiler verification meets cross-language linking via data abstraction

Authors Info & Claims
Published:15 October 2014Publication History
Skip Abstract Section

Abstract

Many real programs are written in multiple different programming languages, and supporting this pattern creates challenges for formal compiler verification. We describe our Coq verification of a compiler for a high-level language, such that the compiler correctness theorem allows us to derive partial-correctness Hoare-logic theorems for programs built by linking the assembly code output by our compiler and assembly code produced by other means. Our compiler supports such tricky features as storable cross-language function pointers, without giving up the usual benefits of being able to verify different compiler phases (including, in our case, two classic optimizations) independently. The key technical innovation is a mixed operational and axiomatic semantics for the source language, with a built-in notion of abstract data types, such that compiled code interfaces with other languages only through axiomatically specified methods that mutate encapsulated private data, represented in whatever formats are most natural for those languages.

Skip Supplemental Material Section

Supplemental Material

References

  1. A. Ahmed and M. Blume. Typed closure conversion preserves observational equivalence. In Proc. ICFP, pages 157--168. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Ahmed and M. Blume. An equivalence-preserving CPS translation via multi-language semantics. In Proc. ICFP, pages 431--444. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. W. Appel. Verified software toolchain. In Proc. ESOP, volume 6602 of LNCS, pages 1--17. Springer-Verlag, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. W. Appel and D. McAllester. An indexed model of recursive types for foundational proof-carrying code. TOPLAS, 23 (5): 657--683, Sept. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. Benton and C.-K. Hur. Biorthogonality, step-indexing and compiler correctness. In Proc. ICFP, pages 97--108. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Benton and C.-K. Hur. Realizability and compositional compiler correctness for a polymorphic language. Technical Report MSR-TR-2010-62, Microsoft Research, 2010.Google ScholarGoogle Scholar
  7. N. Benton and N. Tabareau. Compiling functional types to relational specifications for low level imperative code. In Proc. TLDI. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. L. Beringer, G. Stewart, R. Dockins, and A. W. Appel. Verified compilation for shared-memory C. In Proc. ESOP. Springer, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Chlipala. A certified type-preserving compiler from lambda calculus to assembly language. In Proc. PLDI, pages 54--65, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Chlipala. Parametric higher-order abstract syntax for mechanized semantics. In Proc. ICFP, pages 143--156, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Chlipala. A verified compiler for an impure functional language. In Proc. POPL, pages 93--106, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Chlipala. Mostly-automated verification of low-level programs in computational separation logic. In Proc. PLDI, pages 234--245. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Chlipala. The Bedrock structured programming system: Combining generative metaprogramming and Hoare logic in an extensible program verifier. In Proc. ICFP, pages 391--402. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Z. Dargaye and X. Leroy. Mechanized verification of CPS transformations. In Proc. LPAR, pages 211--225, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. A. D. Flatau. A Verified Implementation of an Applicative Language with Dynamic Storage Allocation. PhD thesis, University of Texas at Austin, Nov. 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C.-K. Hur and D. Dreyer. A Kripke logical relation between ML and assembly. In Proc. POPL, pages 133--146. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. X. Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In Proc. POPL, pages 42--54. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. X. Leroy and H. Grall. Coinductive big-step operational semantics. Inf. Comput., 207 (2): 284--304, Feb. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. Malecha, A. Chlipala, and T. Braibant. Compositional computational reflection. In Proc. ITP, pages 374--389, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  20. Y. Minamide and K. Okuma. Verifying CPS transformations in Isabelle/HOL. In Proc. MERLIN, pages 1--8, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. O. Myreen and M. J. Gordon. Verified LISP implementations on ARM, x86 and PowerPC. In Proc. TPHOLs, pages 359--374. Springer-Verlag, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Z. Ni and Z. Shao. Certified assembly programming with embedded code pointers. In Proc. POPL, pages 320--333. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. T. Perconti and A. Ahmed. Verifying an open compiler using multi-language semantics. In Proc. ESOP, pages 128--148. Springer, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. Ramananandro, Z. Shao, S. Weng, and J. Koenig. A compositional semantics for verified separate compilation and linking. Technical Report YALEU/DCS/TR-1494, Dept. of Computer Science, Yale University, New Haven, CT, January 2014.Google ScholarGoogle Scholar
  25. J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In Proc. LICS, pages 55--74. IEEE Computer Society, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. G. Stewart, L. Beringer, S. Cuellar, and A. W. Appel. Compositional CompCert. Technical report, July 2014.Google ScholarGoogle Scholar
  27. Y. H. Tian. Mechanically verifying correctness of CPS compilation. In Proc. CATS, pages 41--51, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. D. Von Oheimb. Hoare logic for mutual recursion and local variables. In Foundations of Software Technology and Theoretical Computer Science, pages 168--180. Springer, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Compiler verification meets cross-language linking via data abstraction

      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

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 49, Issue 10
        OOPSLA '14
        October 2014
        907 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2714064
        • Editor:
        • Andy Gill
        Issue’s Table of Contents
        • cover image ACM Conferences
          OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications
          October 2014
          946 pages
          ISBN:9781450325851
          DOI:10.1145/2660193

        Copyright © 2014 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 15 October 2014

        Check for updates

        Qualifiers

        • research-article

      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!