Advertisement

Verifying an Open Compiler Using Multi-language Semantics

  • James T. Perconti
  • Amal Ahmed
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8410)

Abstract

Existing verified compilers are proved correct under a closed-world assumption, i.e., that the compiler will only be used to compile whole programs. We present a new methodology for verifying correct compilation of program components, while formally allowing linking with target code of arbitrary provenance. To demonstrate our methodology, we present a two-pass type-preserving open compiler and prove that compilation preserves semantics. The central novelty of our approach is that we define a combined language that embeds the source, intermediate, and target languages and formalizes a semantics of interoperability between them, using boundaries in the style of Matthews and Findler. Compiler correctness is stated as contextual equivalence in the combined language.

Note to reader: We use blue, red, and purple to typeset terms in various languages. This paper will be difficult to follow unless read/printed in color.

Keywords

Operational Semantic Reduction Rule Source Language Target Code Contextual Equivalence 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Leroy, X.: Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In: POPL (2006)Google Scholar
  2. 2.
    Leroy, X.: A formally verified compiler back-end. J. Automated Reasoning 43(4), 363–446 (2009)CrossRefzbMATHMathSciNetGoogle Scholar
  3. 3.
    Lochbihler, A.: Verifying a compiler for Java threads. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 427–447. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  4. 4.
    Myreen, M.O.: Verified just-in-time compiler on x86. In: POPL 2010 (2010)Google Scholar
  5. 5.
    Sevcik, J., Vafeiadis, V., Nardelli, F.Z., Jagannathan, S., Sewell, P.: Relaxed-memory concurrency and verified compilation. In: POPL 2011 (2011)Google Scholar
  6. 6.
    Morrisett, G., Crary, K., Glew, N., Walker, D.: Stack-based typed assembly language. J. Functional Programming 12(1), 43–88 (2002)CrossRefzbMATHMathSciNetGoogle Scholar
  7. 7.
    Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. In: POPL 2007 (2007)Google Scholar
  8. 8.
    Ahmed, A., Blume, M.: An equivalence-preserving CPS translation via multi-language semantics. In: ICFP 2011 (2011)Google Scholar
  9. 9.
    Perconti, J.T., Ahmed, A.: Verifying an open compiler using multi-language semantics (technical report) (January 2014), http://ccs.neu.edu/home/amal/voc/
  10. 10.
    Benton, N., Hur, C.K.: Biorthogonality, step-indexing and compiler correctness. In: ICFP 2009 (2009)Google Scholar
  11. 11.
    Benton, N., Hur, C.K.: Realizability and compositional compiler correctness for a polymorphic language. Technical Report MSR-TR-2010-62, Microsoft Research (April 2010)Google Scholar
  12. 12.
    Hur, C.K., Dreyer, D.: A Kripke logical relation between ML and assembly. In: POPL 2011 (2011)Google Scholar
  13. 13.
    Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. ACM TOPLAS 21(3), 527–568 (1999)CrossRefGoogle Scholar
  14. 14.
    Minamide, Y., Morrisett, G., Harper, R.: Typed closure conversion. In: POPL 1996 (1996)Google Scholar
  15. 15.
    Dreyer, D., Neis, G., Birkedal, L.: The impact of higher-order state and control effects on local relational reasoning. J. Functional Programming 22(4&5), 477–528 (2012)CrossRefzbMATHMathSciNetGoogle Scholar
  16. 16.
    Matthews, J., Ahmed, A.: Parametric polymorphism through run-time sealing, or, theorems for low, low prices! In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 16–31. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  17. 17.
    Dave, M.A.: Compiler verification: A bibliography. ACM SIGSOFT Software Engineering Notes 28(6) (2003)Google Scholar
  18. 18.
    Chlipala, A.: A verified compiler for an impure functional language. In: POPL 2010 (2010)Google Scholar
  19. 19.
    Hur, C.K., Dreyer, D., Neis, G., Vafeiadis, V.: The marriage of bisimulations and Kripke logical relations. In: POPL 2012 (2012)Google Scholar
  20. 20.
    Hur, C.K., Dreyer, D., Neis, G., Vafeiadis, V.: The marriage of bisimulations and Kripke logical relations. Technical report, Max Planck Institute for Software Systems (January 2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • James T. Perconti
    • 1
  • Amal Ahmed
    • 1
  1. 1.Northeastern UniversityUSA

Personalised recommendations