Class invariants as abstract interpretation of trace semantics

  • Authors:
  • Francesco Logozzo

  • Affiliations:
  • ícole Polytechnique, F-91128, Palaiseau, France

  • Venue:
  • Computer Languages, Systems and Structures
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a generic framework for the automatic and modular inference of sound class invariants for class-based object-oriented languages. We define a trace-based semantics for classes which considers all possible orderings, with all possible arguments, of invocations of all the methods of a class. We prove a correspondence theorem between such a semantics and a generic, trace-based, semantics for complete object-oriented programs. We express state-based class invariants in a fixpoint form by considering an abstraction of the class semantics, and we show how class invariants can be automatically inferred exploiting a static analysis of the methods. Furthermore, we address the problem of inferring a subclass invariant without accessing to the parent code, but just to its invariant.