Skip to main content

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

  • Conference paper
Formal Methods and Software Engineering (ICFEM 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3785))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The Coq proof assistant, http://coq.inria.fr

  2. Appel, A.W.: Foundational proof-carrying code. In: IEEE Symp. on Logic in Computer Science (LICS), Washington, DC, USA, p. 247 (June 2001)

    Google Scholar 

  3. Sampaio, A.: An algebraic approach to compiler design. AMAST series in computing, vol. 4. World Scientific, Singapore (1997)

    Book  MATH  Google Scholar 

  4. Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)

    MATH  Google Scholar 

  5. Bornat, R.: Proving pointer programs in Hoare logic. In: 5th Conf. on Mathematics of Program Construction, pp. 102–126. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. ChrzÄ…szcz, J.: Modules in Type Theory with Generative Definitions. PhD thesis, Warsaw Univerity and University of Paris-Sud (January 2004)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Chapter  Google Scholar 

  10. Goos, G., Zimmermann, W.: Verification of compilers. In: Correct System Design, Recent Insight and Advances, London, UK, pp. 201–230. Springer, Heidelberg (1999)

    Google Scholar 

  11. 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)

    Chapter  Google Scholar 

  12. 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)

    Article  MATH  Google Scholar 

  13. Leroy, X.: Formal certification of a compiler back-end, or: programming a compiler with a proof assistant (2005) (draft, submitted for publication)

    Google Scholar 

  14. Letouzey, P.: Programmation fonctionnelle certifiée – L’extraction de programmes dans l’assistant Coq. PhD thesis, Université Paris-Sud (July 2004)

    Google Scholar 

  15. 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)

    Chapter  Google Scholar 

  16. 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)

    Google Scholar 

  17. Necula, G.: Proof carrying code. In: Proc. of Principles Of Progamming Languages Conf, POPL (January 1997)

    Google Scholar 

  18. Necula, G.: Translation validation for an optimizing compiler. In: ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), pp. 83–95 (2000)

    Google Scholar 

  19. Pnueli, A., Siegel, M., Singerman, E.: Translation validation. In: Steffen, B. (ed.) TACAS 1998. LNCS, vol. 1384, pp. 151–166. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  20. Rinard, M., Marinov, D.: Credible compilation with pointers. In: Workshop on Run-Time Result Verification (RTRV), Trento, Italy (July 1999)

    Google Scholar 

  21. Rival, X.: Symbolic transfer function-based approaches to certified compilation. In: Principles Of Progamming Languages Conf. (POPL), pp. 1–13 (2004)

    Google Scholar 

  22. 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)

    Google Scholar 

  23. 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)

    Google Scholar 

  24. Monnier, S.: Typed regions. In: workshop on semantics, program anlysis and computing analysis for memory management (SPACE), Venice, Italy (January 2004)

    Google Scholar 

  25. Tennent, R.D., Ghica, D.R.: Abstract models of storage. Higher-Order and Symbolic Computation 13(1/2), 119–129 (2000)

    Article  MATH  Google Scholar 

  26. 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)

    Google Scholar 

  27. Hu, Y., Barrett, C., Goldberg, B., Pnueli, A.: Validating more loop optimizations. In: Workshop on Compiler Optimization Meets Compiler Verification (COCV), Edinburgh, UK (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

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)

Publish with us

Policies and ethics