Advertisement

Implicit Dynamic Frames: Combining Dynamic Frames and Separation Logic

  • Jan Smans
  • Bart Jacobs
  • Frank Piessens
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5653)

Abstract

The dynamic frames approach has proven to be a powerful formalism for specifying and verifying object-oriented programs. However, it requires writing and checking many frame annotations. In this paper, we propose a variant of the dynamic frames approach that eliminates the need to explicitly write and check frame annotations. Reminiscent of separation logic’s frame rule, programmers write access assertions inside pre- and postconditions instead of writing frame annotations. From the precondition, one can then infer an upper bound on the set of locations writable or readable by the corresponding method. We implemented our approach in a tool, and used it to automatically verify several challenging programs, including subject-observer, iterator and linked list.

Keywords

Memory Location Proof Obligation Class Cell Method Invocation Separation 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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Banerjee, A., Naumann, D.A., Rosenberg, S.: Regional logic for local reasoning about global invariants. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 387–411. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Kassios, I.T.: Dynamic frames: Support for framing, dependencies and sharing without restrictions. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 268–283. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  3. 3.
    Banerjee, A., Barnett, M., Naumann, D.A.: Boogie meets regions: a verification experience report. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 177–191. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  4. 4.
    Rustan, K., Leino, M.: Specification and verification of object-oriented software. In: Marktoberdorf International Summer School (2008)Google Scholar
  5. 5.
    Schoeller, B.: Making Classes Provable through Contracts, Models and Frames. PhD thesis, Departement Informatik ETH Zurich (2007)Google Scholar
  6. 6.
    Smans, J., Jacobs, B., Piessens, F., Schulte, W.: An automatic verifier for java-like programs based on dynamic frames. In: Fiadeiro, J.L., Inverardi, P. (eds.) FASE 2008. LNCS, vol. 4961, pp. 261–275. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  7. 7.
    Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames: Combining dynamic frames and separation logic (soundness proof). Technical Report CW542, Katholieke Universiteit Leuven (2009)Google Scholar
  8. 8.
    Gotsman, A., Berdine, J., Cook, B., Rinetzky, N., Sagiv, M.: Local reasoning for storable locks and threads. In: Shao, Z. (ed.) APLAS 2007. LNCS, vol. 4807, pp. 19–37. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  9. 9.
    Haack, C., Hurlin, C.: Separation logic contracts for a java-like language with fork/Join. In: Meseguer, J., Roşu, G. (eds.) AMAST 2008. LNCS, vol. 5140, pp. 199–215. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  10. 10.
    de Moura, L., Bjørner, N.: Z3: An efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  11. 11.
    Rudich, A., Darvas, Á., Müller, P.: Checking well-formedness of pure-method specifications. In: Cuellar, J., Maibaum, T., Sere, K. (eds.) FM 2008. LNCS, vol. 5014, pp. 68–83. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Jacobs, B., Piessens, F.: Inspector methods for state abstraction. Journal of Object Technology 6(5) (2007)Google Scholar
  13. 13.
    Leino, K.R.M., Middelkoop, R.: Proving consistency of pure methods and model fields. In: FASE (2009)Google Scholar
  14. 14.
    Leavens, G.T.: JML’s rich, inherited specifications for behavioral subtypes. In: Liu, Z., He, J. (eds.) ICFEM 2006. LNCS, vol. 4260, pp. 2–34. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  15. 15.
    Parkinson, M., Bierman, G.: Separation logic, abstraction and inheritance. In: POPL (2008)Google Scholar
  16. 16.
    Parkinson, M., Bierman, G.: Separation logic and abstraction. In: POPL (2005)Google Scholar
  17. 17.
    Distefano, D., Parkinson, M.: jStar: Towards Practical Verification for Java. In: OOPSLA (2008)Google Scholar
  18. 18.
    Parkinson, M.: Local Reasoning for Java. PhD thesis, University of Cambridge (2005)Google Scholar
  19. 19.
    Zee, K., Kuncak, V., Rinard, M.C.: Full functional verification of linked data structures. In: PLDI (2008)Google Scholar
  20. 20.
    Leino, K.R.M., Müller, P.: Object invariants in dynamic contexts. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 491–515. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  21. 21.
    Barnett, M., Naumann, D.A.: Friends need a bit more: Maintaining invariants over shared state. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 54–84. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  22. 22.
    Parkinson, M.: Class invariants: The end of the road? In: IWACO (2007)Google Scholar
  23. 23.
    Leino, K.R.M., Monahan, R.: Automatic verification of textbook programs that use comprehensions. In: FTFJP (2007)Google Scholar
  24. 24.
    Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  25. 25.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS (2002)Google Scholar
  26. 26.
    Nguyen, H.H., Kuncak, V., Chin, W.-N.: Runtime checking for separation logic. In: Logozzo, F., Peled, D.A., Zuck, L.D. (eds.) VMCAI 2008. LNCS, vol. 4905, pp. 203–217. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  27. 27.
    Leino, K.R.M., Poetzsch-Heffter, A., Zhou, Y.: Using data groups to specify and check side effects. In: PLDI (2002)Google Scholar
  28. 28.
    Müller, P.: Modular Specification and Verification of Object-Oriented Programs. PhD thesis, FernUniversität Hagen (2001)Google Scholar
  29. 29.
    Barnett, M., DeLine, R., Fähndrich, M., Leino, K.R.M., Schulte, W.: Verification of object-oriented programs with invariants. Journal of Object Technology 3(6) (2003)Google Scholar
  30. 30.
    Leavens, G.T., Baker, A.L., Ruby, C.: JML: A notation for detailed design (1999)Google Scholar
  31. 31.
    Beckert, B., Hähnle, R., Schmitt, P.H. (eds.): Verification of Object-Oriented Software. LNCS, vol. 4334. Springer, Heidelberg (2007)Google Scholar
  32. 32.
    Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for java. In: PLDI (2002)Google Scholar
  33. 33.
    Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames. In: FTFJP (2008)Google Scholar
  34. 34.
    Leino, K.R.M., Müller, P.: A basis for verifying multi-threaded programs. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 378–393. Springer, Heidelberg (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Jan Smans
    • 1
  • Bart Jacobs
    • 1
  • Frank Piessens
    • 1
  1. 1.Katholieke Universiteit LeuvenBelgium

Personalised recommendations