Flexible Invariants through Semantic Collaboration

  • Nadia Polikarpova
  • Julian Tschannen
  • Carlo A. Furia
  • Bertrand Meyer
Conference paper

DOI: 10.1007/978-3-319-06410-9_35

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8442)
Cite this paper as:
Polikarpova N., Tschannen J., Furia C.A., Meyer B. (2014) Flexible Invariants through Semantic Collaboration. In: Jones C., Pihlajasaari P., Sun J. (eds) FM 2014: Formal Methods. FM 2014. Lecture Notes in Computer Science, vol 8442. Springer, Cham

Abstract

Modular reasoning about class invariants is challenging in the presence of collaborating objects that need to maintain global consistency. This paper presents semantic collaboration: a novel methodology to specify and reason about class invariants of sequential object-oriented programs, which models dependencies between collaborating objects by semantic means. Combined with a simple ownership mechanism and useful default schemes, semantic collaboration achieves the flexibility necessary to reason about complicated inter-object dependencies but requires limited annotation burden when applied to standard specification patterns. The methodology is implemented in AutoProof, our program verifier for the Eiffel programming language (but it is applicable to any language supporting some form of representation invariants). An evaluation on several challenge problems proposed in the literature demonstrates that it can handle a variety of idiomatic collaboration patterns, and is more widely applicable than the existing invariant methodologies.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Nadia Polikarpova
    • 1
  • Julian Tschannen
    • 1
  • Carlo A. Furia
    • 1
  • Bertrand Meyer
    • 1
  1. 1.Department of Computer ScienceETH ZurichSwitzerland

Personalised recommendations