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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
Blanco, J., Pablo, C.: A semantics for proving class correctness (2005) (unpublished)
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)
Bundy, A., Basin, D., Hutter, D., Ireland, A.: Rippling: meta-level guidance for mathematical reasoning. Cambridge University Press, Cambridge (2005)
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)
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)
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)
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)
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)
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)
Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. Information and Computation 199, 200–227 (2005)
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)
Owre, S., Shankar, N., Rushby, J., Stringer-Calvert, D.: PVS language reference (version 2.4). Technical report, Computer Science Laboratory, SRI International (2001)
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)
Rosenberg, S., Banerjee, A., Naumann, D.A.: Local reasoning and dynamic framing for the composite pattern and its clients (to appear)
Tamalet, A.: Yet another semantics for proving class correctness. Master’s thesis, Universidad Nacional de Rosario, Argentina (2006)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)