Separation Logic for Small-Step cminor

  • Andrew W. Appel
  • Sandrine Blazy
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4732)


cminor is a mid-level imperative programming language; there are proved-correct optimizing compilers from C to cminor and from cminor to machine language. We have redesigned cminor so that it is suitable for Hoare Logic reasoning and we have designed a Separation Logic for cminor. In this paper, we give a small-step semantics (instead of the big-step of the proved-correct compiler) that is motivated by the need to support future concurrent extensions. We detail a machine-checked proof of soundness of our Separation Logic. This is the first large-scale machine-checked proof of a Separation Logic w.r.t. a small-step semantics. The work presented in this paper has been carried out in the Coq proof assistant. It is a first step towards an environment in which concurrent cminor programs can be verified using Separation Logic and also compiled by a proved-correct compiler with formal end-to-end correctness guarantees.


Operational Semantic Correctness Proof Separation Logic Intermediate Language Hoare Logic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    The Coq proof assistant,
  2. 2.
    American National Standard for Information Systems – Programming Language – C: American National Standards Institute (1990)Google Scholar
  3. 3.
    Appel, A.W.: Tactics for separation logic (January 2006),
  4. 4.
    Appel, A.W., Blazy, S.: Separation logic for small-step Cminor (extended version). Technical Report RR 6138, INRIA (March 2007),
  5. 5.
    Blazy, S., Dargaye, Z., Leroy, X.: Formal verification of a C compiler front-end. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 460–475. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  6. 6.
    Blazy, S., Leroy, X.: Formal verification of a memory model for C-like imperative languages. In: Lau, K.-K., Banach, R. (eds.) ICFEM 2005. LNCS, vol. 3785, pp. 280–299. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  7. 7.
    Bornat, R., Calcagno, C., O’Hearn, P., Parkinson, M.: Permission accounting in separation logic. In: POPL 2005, pp. 259–270. ACM Press, New York (2005)CrossRefGoogle Scholar
  8. 8.
    Dargaye, Z.: Décurryfication certifiée. JFLA (Journées Françaises des Langages Applicatifs), 119–133 (2007)Google Scholar
  9. 9.
    Ishtiaq, S., O’Hearn, P.: BI as an assertion language for mutable data structures. In: POPL 2001, January 2001, pp. 14–26. ACM Press, New York (2001)CrossRefGoogle Scholar
  10. 10.
    Klein, G., Tuch, H., Norrish, M.: Types, bytes, and separation logic. In: POPL 2007, January 2007, pp. 97–108. ACM Press, New York (2007)Google Scholar
  11. 11.
    Leinenbach, D., Paul, W., Petrova, E.: Towards the formal verification of a C0 compiler: Code generation and implementation correctness. In: SEFM 2005. IEEE Conference on Software Engineering and Formal Methods, IEEE Computer Society Press, Los Alamitos (2005)Google Scholar
  12. 12.
    Leroy, X.: Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In: POPL 2006, pp. 42–54. ACM Press, New York (2006)CrossRefGoogle Scholar
  13. 13.
    Moore, J.S.: A mechanically verified language implementation. Journal of Automated Reasoning 5(4), 461–492 (1989)Google Scholar
  14. 14.
    Ni, Z., Shao, Z.: Certified assembly programming with embedded code pointers. In: POPL 2006, January 2006, pp. 320–333. ACM Press, New York (2006)CrossRefGoogle Scholar
  15. 15.
    O’Hearn, P., Reynolds, J., Yang, H.: Local reasoning about programs that alter data structures. In: Fribourg, L. (ed.) CSL 2001 and EACSL 2001. LNCS, vol. 2142, pp. 1–19. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  16. 16.
    Parkinson, M.J.: Local Reasoning for Java. PhD thesis, University of Cambridge (2005)Google Scholar
  17. 17.
    Schirmer, N.: Verification of Sequential Imperative Programs in Isabelle/HOL. PhD thesis, Technische Universität München (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Andrew W. Appel
    • 1
  • Sandrine Blazy
    • 2
  1. 1.Princeton University 
  2. 2.ENSIIE 

Personalised recommendations