CompCertS: A Memory-Aware Verified C Compiler Using Pointer as Integer Semantics

The CompCert C compiler provides the formal guarantee that the observable behaviour of the compiled code improves on the observable behaviour of the source code. In this paper, we present a formally verified C compiler, CompCertS, which is essentially the CompCert compiler, albeit with a stronger formal guarantee: it gives a semantics to more programs and ensures that the memory consumption is preserved by the compiler. CompCertS is based on an enhanced memory model where, unlike CompCert but like Gcc, the binary representation of pointers can be manipulated much like integers and where, unlike CompCert, allocation may fail if no memory is available.

[1]  Keith Allman,et al.  About the Companion Website , 2015 .

[2]  Chucky Ellison,et al.  Defining the undefinedness of C , 2015, PLDI.

[3]  Jeehoon Kang,et al.  A formal C memory model supporting integer-pointer casts , 2015, PLDI.

[4]  Marc Pantel,et al.  Formally verified optimizing compilation in ACG-based flight control software , 2012 .

[5]  Suresh Jagannathan,et al.  CompCertTSO: A Verified Compiler for Relaxed-Memory Concurrency , 2013, JACM.

[6]  Chucky Ellison,et al.  An executable formal semantics of C with applications , 2011, POPL '12.

[7]  Sandrine Blazy,et al.  A Verified CompCert Front-End for a Memory Model Supporting Pointer Arithmetic and Uninitialised Data , 2019, Journal of Automated Reasoning.

[8]  Sandrine Blazy,et al.  A Precise and Abstract Memory Model for C Using Symbolic Values , 2014, APLAS.

[9]  Robbert Krebbers,et al.  Aliasing Restrictions of C11 Formalized in Coq , 2013, CPP.

[10]  Zhong Shao,et al.  End-to-end verification of stack-space bounds for C programs , 2014, PLDI.

[11]  Dan Grossman,et al.  Verified peephole optimizations for CompCert , 2016, PLDI.

[12]  Robert N. M. Watson,et al.  Into the depths of C: elaborating the de facto standards , 2016, PLDI.

[13]  Robbert Krebbers An operational and axiomatic semantics for non-determinism and sequence points in C , 2014, POPL.

[14]  Michael Norrish C formalised in HOL , 1998 .

[15]  Xavier Leroy,et al.  A Formally-Verified Alias Analysis , 2012, CPP.

[16]  Sandrine Blazy,et al.  Formal verification of control-flow graph flattening , 2016, CPP.

[17]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[18]  Andrew W. Appel,et al.  Portable Software Fault Isolation , 2014, 2014 IEEE 27th Computer Security Foundations Symposium.

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

[20]  Sandrine Blazy,et al.  A Concrete Memory Model for CompCert , 2015, ITP.