Abstract
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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
The Coq proof assistant, http://coq.inria.fr
Appel, A.W.: Foundational proof-carrying code. In: IEEE Symp. on Logic in Computer Science (LICS), Washington, DC, USA, p. 247 (June 2001)
Sampaio, A.: An algebraic approach to compiler design. AMAST series in computing, vol. 4. World Scientific, Singapore (1997)
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)
Bornat, R.: Proving pointer programs in Hoare logic. In: 5th Conf. on Mathematics of Program Construction, pp. 102–126. Springer, Heidelberg (2000)
Cachera, D., Jensen, T., Pichardie, D., Rusu, V.: Extracting a Data Flow Analyser in Constructive Logic. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 385–400. Springer, Heidelberg (2004)
ChrzÄ…szcz, J.: Modules in Type Theory with Generative Definitions. PhD thesis, Warsaw Univerity and University of Paris-Sud (January 2004)
Yu, D., Shao, Z.: Verification of safety properties for concurrent assembly code. In: Int. Conf. on Functional Programming (ICFP), Snowbird, USA, pp. 175–188 (September 2004)
Filliâtre, J.-C., Marché, C.: Multi-Prover Verification of C Programs. In: Davies, J., Schulte, W., Barnett, M. (eds.) ICFEM 2004. LNCS, vol. 3308, pp. 15–29. Springer, Heidelberg (2004)
Goos, G., Zimmermann, W.: Verification of compilers. In: Correct System Design, Recent Insight and Advances, London, UK, pp. 201–230. Springer, Heidelberg (1999)
Watson, G.: Compilation by refinement for a practical assembly language. In: Dong, J.S., Woodcock, J. (eds.) ICFEM 2003. LNCS, vol. 2885, pp. 286–305. Springer, Heidelberg (2003)
Hamid, N., Shao, Z., Trifonov, V., Monnier, S., Ni, Z.: A syntactic approach to foundational proof-carrying code. Journal of Automated Reasoning 31(3-4), 191–229 (2003)
Leroy, X.: Formal certification of a compiler back-end, or: programming a compiler with a proof assistant (2005) (draft, submitted for publication)
Letouzey, P.: Programmation fonctionnelle certifiée – L’extraction de programmes dans l’assistant Coq. PhD thesis, Université Paris-Sud (July 2004)
Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 121–135. Springer, Heidelberg (2003)
Mijajlovic, I., Torp-Smith, N.: Refinement in separation context. In: Second workshop on semantics, program anlysis and computing analysis for memory management (SPACE), Venice, Italy (January 2004)
Necula, G.: Proof carrying code. In: Proc. of Principles Of Progamming Languages Conf, POPL (January 1997)
Necula, G.: Translation validation for an optimizing compiler. In: ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), pp. 83–95 (2000)
Pnueli, A., Siegel, M., Singerman, E.: Translation validation. In: Steffen, B. (ed.) TACAS 1998. LNCS, vol. 1384, pp. 151–166. Springer, Heidelberg (1998)
Rinard, M., Marinov, D.: Credible compilation with pointers. In: Workshop on Run-Time Result Verification (RTRV), Trento, Italy (July 1999)
Rival, X.: Symbolic transfer function-based approaches to certified compilation. In: Principles Of Progamming Languages Conf. (POPL), pp. 1–13 (2004)
Shen, X.: Arvind, and L. Rudolph: Commit-reconcile & fences (CRF): a new memory model for architects and compiler writers. In: ISCA 1999: 26th symposium on Computer architecture, Washington, DC, USA, pp. 150–161 (1999)
Lerner, S., Millstein, T., Rice, E., Chambers, C.: Automated soundness proofs for dataflow analyses and transformations. In: Principles Of Progamming Languages Conf. (POPL), Long Beach, USA (2005)
Monnier, S.: Typed regions. In: workshop on semantics, program anlysis and computing analysis for memory management (SPACE), Venice, Italy (January 2004)
Tennent, R.D., Ghica, D.R.: Abstract models of storage. Higher-Order and Symbolic Computation 13(1/2), 119–129 (2000)
Walker, D.: Stacks, heaps and regions: one logic to bind them. In: Second workshop on semantics, program anlysis and computing analysis for memory management (SPACE), Venice, Italy (January 2004) (invited talk)
Hu, Y., Barrett, C., Goldberg, B., Pnueli, A.: Validating more loop optimizations. In: Workshop on Compiler Optimization Meets Compiler Verification (COCV), Edinburgh, UK (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Blazy, S., Leroy, X. (2005). Formal Verification of a Memory Model for C-Like Imperative Languages. In: Lau, KK., Banach, R. (eds) Formal Methods and Software Engineering. ICFEM 2005. Lecture Notes in Computer Science, vol 3785. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11576280_20
Download citation
DOI: https://doi.org/10.1007/11576280_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29797-0
Online ISBN: 978-3-540-32250-4
eBook Packages: Computer ScienceComputer Science (R0)