Separation Algebras for C Verification in Coq

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8471)

Abstract

Separation algebras are a well-known abstraction to capture common structure of both permissions and memories in programming languages, and form the basis of models of separation logic. As part of the development of a formal version of an operational and axiomatic semantics of the C11 standard, we present a variant of separation algebras that is well suited for C verification.

Our variant of separation algebras has been fully formalized using the Coq proof assistant, together with a library of concrete implementations. These instances are used to build a complex permission model, and a memory model that captures the strict aliasing restrictions of C.

References

  1. 1.
    Appel, A.W. (ed.): Program Logics for Certified Compilers. Cambridge University Press, Cambridge (2014)MATHGoogle Scholar
  2. 2.
    Bengtson, J., Jensen, J.B., Sieczkowski, F., Birkedal, L.: Verifying object-oriented programs with higher-order separation logic in Coq. In: van Eekelen, M., Geuvers, H., Schmaltz, J., Wiedijk, F. (eds.) ITP 2011. LNCS, vol. 6898, pp. 22–38. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  3. 3.
    Beringer, L., Stewart, G., Dockins, R., Appel, A.W.: Verified compilation for shared-memory C. In: Shao, Z. (ed.) ESOP 2014 (ETAPS). LNCS, vol. 8410, pp. 107–127. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  4. 4.
    Bornat, R., Calcagno, C., O’Hearn, P. W., Parkinson, M. J.: Permission accounting in separation logic. In: POPL, pp. 259–270 (2005)Google Scholar
  5. 5.
    Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  6. 6.
    Calcagno, C., O’Hearn, P. W., Yangm, H.: Local action and abstract separation logic. In: LICS, pp. 366–378 (2007)Google Scholar
  7. 7.
    Coq Development Team. The Coq Proof Assistant Reference Manual (2012)Google Scholar
  8. 8.
    Dockins, R., Hobor, A., Appel, A.W.: A fresh look at separation algebras and share accounting. In: Hu, Z. (ed.) APLAS 2009. LNCS, vol. 5904, pp. 161–177. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  9. 9.
    Ellison, C., Rosu, G.: An executable formal semantics of C with applications. In: POPL, pp. 533–544 (2012)Google Scholar
  10. 10.
    International Organization for Standardization. ISO/IEC 9899-2011: Programming languages - C. ISO Working Group 14 (2012)Google Scholar
  11. 11.
    Klein, G., Kolanski, R., Boyton, A.: Mechanised separation algebra. In: Beringer, L., Felty, A. (eds.) ITP 2012. LNCS, vol. 7406, pp. 332–337. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  12. 12.
    Krebbers, R.: Aliasing restrictions of C11 formalized in Coq. In: Gonthier, G., Norrish, M. (eds.) CPP 2013. LNCS, vol. 8307, pp. 50–65. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  13. 13.
    Krebbers, R.: An operational and axiomatic semantics for non-determinism and sequence points in C. In: POPL, pp. 101–112 (2014)Google Scholar
  14. 14.
    Krebbers, R., Wiedijk, F.: A Formalization of the C99 Standard in HOL, Isabelle and Coq. In: Davenport, J.H., Farmer, W.M., Urban, J., Rabe, F. (eds.) MKM 2011 and Calculemus 2011. LNCS, vol. 6824, pp. 301–303. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  15. 15.
    Krebbers, R., Wiedijk, F.: Separation logic for non-local control flow and block scope variables. In: Pfenning, F. (ed.) FOSSACS 2013 (ETAPS 2013). LNCS, vol. 7794, pp. 257–272. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  16. 16.
    Leroy, X.: Formal verification of a realistic compiler. CACM 52(7), 107–115 (2009)CrossRefGoogle Scholar
  17. 17.
    Leroy, X., Appel, A.W., Blazy, S., Stewart, G.: The CompCert memory model, Version 2. Research report RR-7987, INRIA (2012)Google Scholar
  18. 18.
    O’Hearn, P.W.: Resources, concurrency and local reasoning. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 49–67. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  19. 19.
    O’Hearn, P.W., Reynolds, J.C., 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
  20. 20.
    Sozeau, M.: A new look at generalized rewriting in type theory. J. Formal Reasoning 2(1), 41–62 (2010)MathSciNetGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  1. 1.ICISRadboud University NijmegenNijmegenThe Netherlands

Personalised recommendations