Modular invariants for layered object structures

  • Authors:
  • Peter Müller;Arnd Poetzsch-Heffter;Gary T. Leavens

  • Affiliations:
  • ETH Zurich, ETH Zentrum, RZ, Zurich, Switzerland;Technische Universität Kaiserslatttern, Germany;Iowa State University, Ames, IA

  • Venue:
  • Science of Computer Programming - Special issue on source code analysis and manipulation (SCAM 2005)
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Classical specification and verification techniques support invariants for individual objects whose fields are primitive values, but do not allow sound modular reasoning about invariants involving more complex object structures. Such non-trivial object structures are common, and occur in lists, hash tables, and whenever systems are built in layers. A sound and modular verification technique for layered object structures has to deal with the well-known problem of representation exposure and the problem that invariants of higher layers are potentially violated by methods in lower layers; such methods cannot be modularly shown to preserve these invariants.We generalize classical techniques to cover layered object structures using a refined semantics for invariants based on an ownership model for alias control. This semantics enables sound and modular reasoning. We further extend this ownership technique to even more expressive invariants that gain their modularity by imposing certain visibility requirements.