A Machine-Checked Framework for Relational Separation Logic

  • Juan Manuel Crespo
  • César Kunz
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7041)

Abstract

Relational methods are gaining growing acceptance for specifying and verifying properties defined in terms of the execution of two programs—notions such as simulation, observational equivalence, non-interference, and continuity can be elegantly cast in this setting. In previous work, we have proposed program product construction as a technique to reduce relational verification to standard verification. This method hinges on the ability to interpret relational assertions as traditional predicates, which becomes problematic when considering assertions from relational separation logic. We report in this article an alternative method that overcomes this difficulty, defined as a relational weakest precondition calculus based on separation logic and formalized in the Coq proof assistant. The formalization includes an application to the formal verification of the Schorr-Waite graph marking algorithm. We discuss additional variants of relational separation logic inspired by the standard notions of partial and total correctness, and extensions of the logic to handle non-structurally equivalent programs.

Keywords

Depth First Search Proof Obligation Proof Assistant Total Correctness Relational Judgment 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Amtoft, T., Bandhakavi, S., Banerjee, A.: A logic for information flow in object-oriented programs. In: Morrisett, G., Peyton Jones, S. (eds.) Principles of Programming Languages, pp. 91–102. ACM, New York (2006)Google Scholar
  2. 2.
    Appel, A.: Tactics for separation logic (January 2006) (unpublished manuscript), http://www.cs.princeton.edu/~appel/papers/septacs.pdf
  3. 3.
    Appel, A.W., Blazy, S.: Separation logic for small-step cminor. In: Schneider, K., Brandt, J. (eds.) TPHOLs 2007. LNCS, vol. 4732, pp. 5–21. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  4. 4.
    Barthe, G., Crespo, J.M., Kunz, C.: Relational verification using product programs. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 200–214. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  5. 5.
    Barthe, G., Grégoire, B., Zanella Béguelin, S.: Formal certification of code-based cryptographic proofs. In: Shao, Z., Pierce, B.C. (eds.) Principles of Programming Languages, pp. 90–101. ACM Press, New York (2009)Google Scholar
  6. 6.
    Beckert, B., Hähnle, R., Schmitt, P.H. (eds.): Verification of Object-Oriented Software. The KeY Approach. LNCS (LNAI), vol. 4334. Springer, Heidelberg (2007)Google Scholar
  7. 7.
    Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: Jones, N.D., Leroy, X. (eds.) Principles of Programming Languages, pp. 14–25. ACM Press, New York (2004)Google Scholar
  8. 8.
    Beringer, L.: Relational program logics in decomposed style (2010) (submitted)Google Scholar
  9. 9.
    Bodík, R., Chandra, S., Galenson, J., Kimelman, D., Tung, N., Barman, S., Rodarmor, C.: Programming with angelic nondeterminism. In: Principles of Programming Languages, pp. 339–352 (2010)Google Scholar
  10. 10.
    Bornat, R.: Proving pointer programs in hoare logic. In: Backhouse, R.C., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 102–126. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  11. 11.
    Gast, H.: Lightweight separation. In: Mohamed, O., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 199–214. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Giorgino, M., Strecker, M., Matthes, R., Pantel, M.: Verification of the Schorr-Waite algorithm - From trees to graphs (January 2010)Google Scholar
  13. 13.
    Gotsman, A., Cook, B., Parkinson, M.J., Vafeiadis, V.: Proving that non-blocking algorithms don’t block. In: Shao, Z., Pierce, B.C. (eds.) Principles of Programming Languages, pp. 16–28. ACM, New York (2009)Google Scholar
  14. 14.
    Hubert, T., Marché, C.: A case study of c source code verification: the schorr-waite algorithm. In: Aichernig, B., Beckert, B. (eds.) Software Engineering and Formal Methods, pp. 190–199. IEEE Computer Society, Los Alamitos (2005)Google Scholar
  15. 15.
    Ishtiaq, S., O’Hearn, P.: BI as an assertion language for mutable data structures. In: Principles of Programming Languages, pp. 14–26 (2001)Google Scholar
  16. 16.
    Jacobs, B., Piessens, F.: The VeriFast program verifier. Technical Report CW-520, Katholieke Universiteit Leuven (2008)Google Scholar
  17. 17.
    Jacobs, B., Smans, J., Piessens, F.: Verifying the composite pattern using separation logic. In: Workshop on Specification and Verification of Component-Based Systems, Challenge Problem Track (November 2008)Google Scholar
  18. 18.
    McCreight, A.: Practical tactics for separation logic. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 343–358. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  19. 19.
    Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. Inf. Comput. 199(1-2), 200–227 (2005)CrossRefMATHGoogle Scholar
  20. 20.
    Myreen, M.O.: Separation logic adapted for proofs by rewriting. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 485–489. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  21. 21.
    Nanevski, A., Vafeiadis, V., Berdine, J.: Structuring the verification of heap-manipulating programs. In: Hermenegildo, M., Palsberg, J. (eds.) Principles of Programming Languages, pp. 261–274. ACM, New York (2010)Google Scholar
  22. 22.
    Nanevski, A., Banerjee, A., Garg, D.: Verification of information flow and access control policies with dependent types. In: 2011 IEEE Symposium on Security and Privacy. IEEE Computer Society, Los Alamitos (2011)Google Scholar
  23. 23.
    O’Hearn, P.W., 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
  24. 24.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Logic in Computer Science, pp. 55–74. IEEE Computer Society, Los Alamitos (2002)Google Scholar
  25. 25.
    Suzuki, N.: Automatic Verification of Programs with Complex Data Structures. PhD thesis, Stanford University (1976)Google Scholar
  26. 26.
    Tuch, H., Klein, G., Norrish, M.: Types, bytes, and separation logic. In: Hofmann, M., Felleisen, M. (eds.) Principles of Programming Languages, pp. 97–108. ACM, New York (2007)Google Scholar
  27. 27.
    Vafeiadis, V., Parkinson, M.J.: A marriage of rely/guarantee and separation logic. In: Caires, L., Vasconcelos, V.T. (eds.) CONCUR 2007. LNCS, vol. 4703, pp. 256–271. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  28. 28.
    Yang, H.: Local reasoning for stateful programs. PhD thesis, University of Illinois, Urbana, IL, USA (2001)Google Scholar
  29. 29.
    Yang, H.: Relational separation logic. Theoretical Computer Science 375(1-3), 308–334 (2007)CrossRefMATHGoogle Scholar
  30. 30.
    Yang, H., Lee, O., Berdine, J., Calcagno, C., Cook, B., Distefano, D., O’Hearn, P.: Scalable shape analysis for systems code. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 385–398. Springer, Heidelberg (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Juan Manuel Crespo
    • 1
  • César Kunz
    • 1
    • 2
  1. 1.IMDEA Software InstituteMadridSpain
  2. 2.Universidad Politécnica de MadridSpain

Personalised recommendations