Skip to main content

A Logical Analysis of Framing for Specifications with Pure Method Calls

  • Conference paper
  • First Online:
Verified Software: Theories, Tools and Experiments (VSTTE 2014)

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

Abstract

For specifying and reasoning about object-based programs it is often attractive for contracts to be expressed using calls to pure methods. It is useful for pure methods to have contracts, including read effects to support local reasoning based on frame conditions. This leads to puzzles such as the use of a pure method in its own contract. These ideas have been explored in connection with verification tools based on axiomatic semantics, guided by the need to avoid logical inconsistency, and focusing on encodings that cater for first order automated provers. This paper adds pure methods and read effects to region logic, a first-order program logic that features frame-based local reasoning and a proof rule for linking of clients with modules to achieve end-to-end correctness by modular reasoning. Soundness is proved with respect to a conventional operational semantics and using the extensional (i.e., relational) interpretation of read effects.

A. Banerjee – Currently on leave at the US National Science Foundation.

D.A. Naumann – Partially supported by US NSF award CNS-1228930.

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 EPUB and 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

Notes

  1. 1.

    Please note that \(\mathbin {\cdot \!\small \mathbf{/ \!.}}\) is not syntax in the logic; it’s a function in the metalanguage that is used to obtain formulas from effects; see Sect. 6.

  2. 2.

    This does not preclude nondeterminacy modulo an equivalence relation, which is especially important for ‘weakly pure’ methods that return freshly allocated references [13]. For VCs this is explored in [10].

  3. 3.

    Under these conditions, if the specifications in \(\varTheta \) refer to methods in \(\varDelta \), \(\varTheta \) is not swf on its own, and then it is not meaningful to call \(\theta \) a \(\varTheta \)-interpretation.

References

  1. Banerjee, A., Naumann, D.A.: Local reasoning for global invariants. Part II: Dynamic boundaries. J. ACM 60(3), 19:1–19:73 (2013)

    Google Scholar 

  2. Banerjee, A., Naumann, D.A., Rosenberg, S.: Local reasoning for global invariants. Part I: Region logic. J. ACM 60(3), 18:1–18:56 (2013)

    MathSciNet  Google Scholar 

  3. Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: POPL (2004)

    Google Scholar 

  4. Bobot, F., Filliâtre, J.-C.: Separation predicates: a taste of separation logic in first-order logic. In: Aoki, T., Taguchi, K. (eds.) ICFEM 2012. LNCS, vol. 7635, pp. 167–181. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  5. Darvas, A., Müller, P.: Reasoning about method calls in interface specifications. J. Object Technol. 5, 59–85 (2006)

    Article  Google Scholar 

  6. Heule, S., Kassios, I.T., Müller, P., Summers, A.J.: Verification condition generation for permission logics with abstract predicates and abstraction functions. In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920, pp. 451–476. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  7. Hoare, C.A.R.: Proofs of correctness of data representations. Acta Inf. 1, 271–281 (1972)

    Article  MATH  Google Scholar 

  8. Kassios, I.T.: The dynamic frames theory. Formal Aspects Comput. 23(3), 267–288 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  9. Krishnaswami, N.R., Aldrich, J., Birkedal, L.: Verifying event-driven programs using Ramified frame properties. In: TLDI (2010)

    Google Scholar 

  10. Leino, K.R.M., Müller, P.: Verification of equivalent-results methods. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 307–321. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  11. Nanevski, A., Ahmed, A., Morrisett, G., Birkedal, L.: Abstract predicates and mutable ADTs in Hoare type theory. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 189–204. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  12. Nanevski, A., Banerjee, A., Garg, D.: Dependent type theory for verification of information flow and access control policies. ACM Trans. Program. Lang. Syst. 35(2), 6 (2013)

    Google Scholar 

  13. Naumann, D.A.: Observational purity and encapsulation. Theor. Comput. Sci. 376(3), 205–224 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  14. O’Hearn, P.W., Yang, H., Reynolds, J.C.: Separation and information hiding. ACM Trans. Prog. Lang. Syst. 31(3), 1–50 (2009)

    Article  Google Scholar 

  15. Parkinson, M.J., Bierman, G.M.: Separation logic and abstraction. In: POPL (2005)

    Google Scholar 

  16. Rosenberg, S., Banerjee, A., Naumann, D.A.: Local reasoning and dynamic framing for the composite pattern and its clients. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds.) VSTTE 2010. LNCS, vol. 6217, pp. 183–198. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  17. Rosenberg, S., Banerjee, A., Naumann, D.A.: Decision procedures for region logic. In: Kuncak, V., Rybalchenko, A. (eds.) VMCAI 2012. LNCS, vol. 7148, pp. 379–395. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  18. Smans, J., Jacobs, B., Piessens, F., Schulte, W.: Automatic verification of Java programs with dynamic frames. Formal Aspects Comput. 22(3–4), 423–457 (2010)

    Article  MATH  Google Scholar 

  19. Summers, A.J., Drossopoulou, S.: A formal semantics for isorecursive and equirecursive state abstractions. In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920, pp. 129–153. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  20. Yang, H.: Relational separation logic. Theor. Comput. Sci. 375(1–3), 308–334 (2007)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to David A. Naumann .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Banerjee, A., Naumann, D.A. (2014). A Logical Analysis of Framing for Specifications with Pure Method Calls. In: Giannakopoulou, D., Kroening, D. (eds) Verified Software: Theories, Tools and Experiments. VSTTE 2014. Lecture Notes in Computer Science(), vol 8471. Springer, Cham. https://doi.org/10.1007/978-3-319-12154-3_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-12154-3_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-12153-6

  • Online ISBN: 978-3-319-12154-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics