Formal Verification of a Memory Model for C-Like Imperative Languages

This paper presents a formal verification with the Coq proof assistant of a memory model for C-like imperative languages. This model defines the memory layout and the operations that manage the memory. The model has been specified at two levels of abstraction and implemented as part of an ongoing certification in Coq of a moderately-optimising C compiler. Many properties of the memory have been verified in the specification. They facilitate the definition of precise formal semantics of C pointers. A certified OCaml code implementing the memory model has been automatically extracted from the specifications.

[1]  Jacek Chrzaszcz Modules in type theory with generative definitions , 2004 .

[2]  Xavier Leroy,et al.  Formal certification of a compiler back-end or: programming a compiler with a proof assistant , 2006, POPL '06.

[3]  George C. Necula,et al.  Proof-carrying code , 1997, POPL '97.

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

[5]  Pierre Castéran,et al.  Interactive Theorem Proving and Program Development , 2004, Texts in Theoretical Computer Science An EATCS Series.

[6]  David Cachera,et al.  Extracting a Data Flow Analyser in Constructive Logic , 2004, ESOP.

[7]  Sorin Lerner,et al.  Automated soundness proofs for dataflow analyses and transformations via local rules , 2005, POPL '05.

[8]  Jacques D. Fleuriot,et al.  IsaPlanner: A Prototype Proof Planner in Isabelle , 2003, CADE.

[9]  Richard Bornat,et al.  Proving Pointer Programs in Hoare Logic , 2000, MPC.

[10]  Xavier Rival,et al.  Symbolic transfer function-based approaches to certified compilation , 2004, POPL.

[11]  Amir Pnueli,et al.  Validating More Loop Optimizations , 2005, COCV@ETAPS.

[12]  Gerhard Goos,et al.  Verification of Compilers , 1999, Correct System Design.

[13]  Tobias Nipkow,et al.  Proving pointer programs in higher-order logic , 2005, Inf. Comput..

[14]  George C. Necula,et al.  Translation validation for an optimizing compiler , 2000, PLDI '00.

[15]  Zhong Shao,et al.  Verification of safety properties for concurrent assembly code , 2004, ICFP '04.

[16]  Dan R. Ghica,et al.  Abstract Models of Storage , 2000, High. Order Symb. Comput..

[17]  Andrew W. Appel,et al.  Foundational proof-carrying code , 2001, Proceedings 16th Annual IEEE Symposium on Logic in Computer Science.

[18]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[19]  Stefan Monnier Typed Regions , 2002 .

[20]  Pierre Letouzey,et al.  Programmation fonctionnelle certifiée : L'extraction de programmes dans l'assistant Coq. (Certified functional programming : Program extraction within Coq proof assistant) , 2004 .

[21]  Geoffrey Watson Compilation by Refinement for a Practical Assembly Language , 2003, ICFEM.

[22]  Martin Rinard,et al.  Credible Compilation with Pointers , 1999 .

[23]  Peter W. O'Hearn,et al.  Refinement and Separation Contexts , 2004, FSTTCS.

[24]  Ernst-Rüdiger Olderog,et al.  Correct System Design, Recent Insight and Advances, (to Hans Langmaack on the occasion of his retirement from his professorship at the University of Kiel) , 1999 .

[25]  Zhong Shao,et al.  A Syntactic Approach to Foundational Proof-Carrying Code , 2004, Journal of Automated Reasoning.

[26]  Larry Rudolph,et al.  Commit-reconcile & fences (CRF): a new memory model for architects and compiler writers , 1999, ISCA.

[27]  Claude Marché,et al.  Multi-prover Verification of C Programs , 2004, ICFEM.

[28]  Augusto Sampaio An Algebraic Approach to Compiler Design , 1993, AMAST Series in Computing.