Skip to main content

Reasoning about Assignments in Recursive Data Structures

  • Conference paper
Book cover Formal Methods: Foundations and Applications (SBMF 2010)

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

Included in the following conference series:

  • 369 Accesses

Abstract

This paper presents a framework to reason about the effects of assignments in recursive data structures. We define an operational semantics for a core language based on Meyer’s ideas for a semantics for the object-oriented language Eiffel. A series of field accesses, e.g. f1 ∙ f2 ∙ ··· ∙ fn , can be seen as a path on the heap. We provide rules that describe how these multidot expressions are affected by an assignment. Using multidot expressions to construct an abstraction of a list, we show the correctness of a list reversal algorithm. This approach does not require induction and the reasoning about the assignments is encapsulated in the mentioned rules. We also discuss how to use this approach when working with other data structures and how it compares to the inductive approach. The framework, rules and examples have been formalised and proven correct using the PVS proof assistant.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Berdine, J., Calcagno, C., O’Hearn, P.: Smallfoot: Modular automatic assertion checking with separation logic. In: de Boer, F., Bonsangue, M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 115–137. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  2. Blanco, J., Pablo, C.: A semantics for proving class correctness (2005) (unpublished)

    Google Scholar 

  3. Bornat, R.: Proving pointer programs in Hoare logic. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 102–126. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  4. Bundy, A., Basin, D., Hutter, D., Ireland, A.: Rippling: meta-level guidance for mathematical reasoning. Cambridge University Press, Cambridge (2005)

    Book  MATH  Google Scholar 

  5. Burstall, R.: Some techniques for proving correctness of programs which alter data structures. In: Machine Intelligence, vol. 7, pp. 22–50. Edinburgh University Press (1972)

    Google Scholar 

  6. Distefano, D., Filipović, I.: Memory leaks detection in Java by bi-abductive inference. In: Rosenblum, D., Taentzer, G. (eds.) FASE 2010. LNCS, vol. 6013, pp. 278–292. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  7. Filliâtre, J.C., Marché, C.: The Why/Krakatoa/Caduceus platform for deductive program verification. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 173–177. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  8. Hoare, C.A.R., Jifeng, H.: A trace model for pointers and objects. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 1–17. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  9. Hubert, T., Marché, C.: Separation analysis for deductive verification. In: Damm, W., Hermanns, H. (eds.) HAV 2007: Heap Analysis and Verification, Braga, Portugal, pp. 81–93 (2007)

    Google Scholar 

  10. Marché, C., Paulin-Mohring, C.: Reasoning about Java programs with aliasing and frame conditions. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 179–194. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  11. Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. Information and Computation 199, 200–227 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  12. Meyer, B.: Towards practical proofs of class correctness. In: Bert, D., Bowen, J.P., King, S., Waldén, M. (eds.) ZB 2003. LNCS, vol. 2651, pp. 359–387. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  13. Owre, S., Shankar, N., Rushby, J., Stringer-Calvert, D.: PVS language reference (version 2.4). Technical report, Computer Science Laboratory, SRI International (2001)

    Google Scholar 

  14. Reynolds, J.: Separation logic: A logic for shared mutable data structures. In: LICS 2002: Logic in Computer Science, pp. 55–74. IEEE Computer Society, Los Alamitos (2002)

    Google Scholar 

  15. Rosenberg, S., Banerjee, A., Naumann, D.A.: Local reasoning and dynamic framing for the composite pattern and its clients (to appear)

    Google Scholar 

  16. Tamalet, A.: Yet another semantics for proving class correctness. Master’s thesis, Universidad Nacional de Rosario, Argentina (2006)

    Google Scholar 

  17. Tuerk, T.: A formalisation of Smallfoot in HOL. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 469–484. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  18. von Henke, F.W., Pfab, S., Pfeifer, H., Rueß, H.: Case studies in meta-level theorem proving. In: Grundy, J., Newey, M.C. (eds.) TPHOLs 1998. LNCS, vol. 1479, pp. 461–478. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Tamalet, A., Madlener, K. (2011). Reasoning about Assignments in Recursive Data Structures. In: Davies, J., Silva, L., Simao, A. (eds) Formal Methods: Foundations and Applications. SBMF 2010. Lecture Notes in Computer Science, vol 6527. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-19829-8_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-19829-8_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-19828-1

  • Online ISBN: 978-3-642-19829-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics