Reasoning about assignments in recursive data structures

  • Authors:
  • Alejandro Tamalet;Ken Madlener

  • Affiliations:
  • Institute for Computing and Information Sciences (iCIS), Radboud University Nijmegen, The Netherlands;Institute for Computing and Information Sciences (iCIS), Radboud University Nijmegen, The Netherlands

  • Venue:
  • SBMF'10 Proceedings of the 13th Brazilian conference on Formal methods: foundations and applications
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

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.