Verified Compilation for Shared-Memory C

We present a new architecture for specifying and proving optimizing compilers in the presence of shared-memory interactions such as buffer-based system calls, shared-memory concurrency, and separate compilation. The architecture, which is implemented in the context of CompCert, includes a novel interaction-oriented model for C-like languages, and a new proof technique, called logical simulation relations, for compositionally proving compiler correctness with respect to this interaction model. We apply our techniques to CompCert's primary memory-reorganizing compilation phase, Cminorgen. Our results are formalized in Coq, building on the recently released CompCert 2.0.

[1]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[2]  Derek Dreyer,et al.  State-dependent representation independence , 2009, POPL '09.

[3]  John C. Reynolds,et al.  On the Relation between Direct and Continuation Semantics , 1974, ICALP.

[4]  Chung-Kil Hur,et al.  Biorthogonality, step-indexing and compiler correctness , 2009, ICFP.

[5]  FengXinyu,et al.  A rely-guarantee-based simulation for verifying concurrent program transformations , 2012 .

[6]  Peter W. O'Hearn,et al.  Resources, Concurrency and Local Reasoning , 2004, CONCUR.

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

[8]  Xavier Leroy,et al.  Formal Verification of a C-like Memory Model and Its Uses for Verifying Program Transformations , 2008, Journal of Automated Reasoning.

[9]  Xavier Leroy,et al.  The CompCert Memory Model, Version 2 , 2012 .

[10]  Chung-Kil Hur,et al.  Realizability and Compositional Compiler Correctness for a Polymorphic Language , 2010 .

[11]  Cliff B. Jones,et al.  Tentative steps toward a development method for interfering programs , 1983, TOPL.

[12]  Chung-Kil Hur,et al.  The marriage of bisimulations and Kripke logical relations , 2012, POPL '12.

[13]  Chung-Kil Hur,et al.  A Logical Step Forward in Parametric Bisimulations , 2014 .

[14]  Andrew W. Appel,et al.  The CompCert memory model , 2014 .

[15]  Andrew W. Appel Verified Software Toolchain - (Invited Talk) , 2011, ESOP.

[16]  Andrew W. Appel,et al.  Program Logics for Certified Compilers , 2014 .

[17]  Peter W. O'Hearn,et al.  Resources, concurrency, and local reasoning , 2007 .

[18]  Zhong Shao,et al.  Certified assembly programming with embedded code pointers , 2006, POPL '06.

[19]  I. Stark,et al.  Operational reasoning for functions with local state , 1999 .

[20]  Xinyu Feng,et al.  A rely-guarantee-based simulation for verifying concurrent program transformations , 2012, POPL '12.

[21]  Lars Birkedal,et al.  The impact of higher-order state and control effects on local relational reasoning , 2012, J. Funct. Program..