A Cross-Language Framework for Verifying Compiler Optimizations

Most compiler correctness efforts, whether based on validation or once-and-for-all verification, are tightly tied to the particular language(s) under consideration. Proof techniques may be replicated for other targets, and parts of the compiler chain may be shared for new input or output languages, but the extent to which common elements can be generalized across multiple targets has not been fully explored. In this paper, we lay out a general approach to specifying and verifying optimizations and transformations on low-level intermediate languages. By generalizing across elements such as concurrent memory models and single-thread operational semantics, we can build a library of facts that can be reused in verifying optimizations for dramatically different target languages, such as stack-machine and register-machine languages.

[1]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[2]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.

[3]  Michel Cekleov,et al.  Formal Specification of Memory Models , 1992 .

[4]  Amir Pnueli,et al.  Translation Validation , 1998, TACAS.

[5]  Andrew D. Gordon,et al.  Typing a multi-language intermediate code , 2001, POPL '01.

[6]  Cristián Zegers Ariztía,et al.  Manual , 2002 .

[7]  Eric Van Wyk,et al.  Proving correctness of compiler optimizations by temporal logic , 2002, POPL '02.

[8]  Jens Krinke,et al.  Context-sensitive slicing of concurrent programs , 2003, ESEC/FSE-11.

[9]  Sorin Lerner,et al.  Automatically proving the correctness of compiler optimizations , 2003, PLDI '03.

[10]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[11]  Tarmo Uustalu,et al.  Type Systems for Optimizing Stack-based Code , 2007, Electron. Notes Theor. Comput. Sci..

[12]  Xavier Leroy,et al.  A Formally Verified Compiler Back-end , 2009, Journal of Automated Reasoning.

[13]  David Lacey,et al.  Program transformations using temporal logic side conditions , 2009, TOPL.

[14]  Elsa L. Gunter,et al.  A Framework for Formal Verification of Compiler Optimizations , 2010, ITP.

[15]  Xuejun Yang,et al.  Finding and understanding bugs in C compilers , 2011, PLDI '11.

[16]  Viktor Vafeiadis,et al.  Verifying Fence Elimination Optimisations , 2011, SAS.

[17]  Sevÿc ´ õk Safe Optimisations for Shared-Memory Concurrent Programs , 2011 .

[18]  Suresh Jagannathan,et al.  Relaxed-memory concurrency and verified compilation , 2011, POPL '11.

[19]  J. Sevcík Safe optimisations for shared-memory concurrent programs , 2011, PLDI.

[20]  Francesco Zappa Nardelli,et al.  Compiler testing via a theory of sound optimisations in the C11/C++11 memory model , 2013, PLDI.

[21]  Elsa L. Gunter,et al.  Verifying Optimizations for Concurrent Programs , 2014, WPTE@RTA/TLCA.

[22]  Elsa L. Gunter,et al.  Specifying and Executing Optimizations for Parallel Programs , 2014, GRAPHITE.

[23]  William Mansky Specifying and verifying program transformations with PTRANS , 2014 .