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.
Chapter PDF
Similar content being viewed by others
Keywords
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
Leroy, X.: Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In: POPL (2006)
Leroy, X.: A formally verified compiler back-end. J. Automated Reasoning 43(4), 363–446 (2009)
Lochbihler, A.: Verifying a compiler for Java threads. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 427–447. Springer, Heidelberg (2010)
Myreen, M.O.: Verified just-in-time compiler on x86. In: POPL 2010 (2010)
Sevcik, J., Vafeiadis, V., Nardelli, F.Z., Jagannathan, S., Sewell, P.: Relaxed-memory concurrency and verified compilation. In: POPL 2011 (2011)
Morrisett, G., Crary, K., Glew, N., Walker, D.: Stack-based typed assembly language. J. Functional Programming 12(1), 43–88 (2002)
Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. In: POPL 2007 (2007)
Ahmed, A., Blume, M.: An equivalence-preserving CPS translation via multi-language semantics. In: ICFP 2011 (2011)
Perconti, J.T., Ahmed, A.: Verifying an open compiler using multi-language semantics (technical report) (January 2014), http://ccs.neu.edu/home/amal/voc/
Benton, N., Hur, C.K.: Biorthogonality, step-indexing and compiler correctness. In: ICFP 2009 (2009)
Benton, N., Hur, C.K.: Realizability and compositional compiler correctness for a polymorphic language. Technical Report MSR-TR-2010-62, Microsoft Research (April 2010)
Hur, C.K., Dreyer, D.: A Kripke logical relation between ML and assembly. In: POPL 2011 (2011)
Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. ACM TOPLAS 21(3), 527–568 (1999)
Minamide, Y., Morrisett, G., Harper, R.: Typed closure conversion. In: POPL 1996 (1996)
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)
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)
Dave, M.A.: Compiler verification: A bibliography. ACM SIGSOFT Software Engineering Notes 28(6) (2003)
Chlipala, A.: A verified compiler for an impure functional language. In: POPL 2010 (2010)
Hur, C.K., Dreyer, D., Neis, G., Vafeiadis, V.: The marriage of bisimulations and Kripke logical relations. In: POPL 2012 (2012)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Perconti, J.T., Ahmed, A. (2014). Verifying an Open Compiler Using Multi-language Semantics. In: Shao, Z. (eds) Programming Languages and Systems. ESOP 2014. Lecture Notes in Computer Science, vol 8410. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-54833-8_8
Download citation
DOI: https://doi.org/10.1007/978-3-642-54833-8_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-54832-1
Online ISBN: 978-3-642-54833-8
eBook Packages: Computer ScienceComputer Science (R0)