Inferring Object Invariants

  • Authors:
  • Bor-Yuh Evan Chang;K. Rustan M. Leino

  • Affiliations:
  • University of California, Berkeley, CA, U.S.A.;Microsoft Research, Redmond, WA, U.S.A.

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

The program state for object-oriented languages, such as Java or C#, consists of both variables local to procedures and variables stored in the global heap. The variables stored in the heap are the fields of objects (i.e., fields of class instances). This paper proposes a technique for inferring properties of such object-oriented programs. The technique divides the work into two interacting parts: a flow-sensitive analysis that tracks the local and global state as seen at each particular program point, and a flow-insensitive analysis that tracks properties that are common among all ''valid'' instances of a class, independent of the program counter. The analysis is sound and works in the presence of many object references (aliasing). For precision, the analysis makes use of a recent methodology for object invariants, which makes explicit when each object's invariant is supposed to hold (valid objects) or is allowed to be violated. out the program, either during test or in operation. Algorithms for detecting multi-threading errors in execution traces, such as deadlocks and data races. *Specification Languages and Logics. Formal methods scientists have investigated logics and developed technologies that are suitable for model checking and theorem proving, but monitoring can reveal new observation-based foundational logics. *Program Instrumentation. Techniques for instrumenting programs, at the source code or object code/byte code level, to emit relevant events to an observer. *Program Guidance. Techniques for guiding the behavior of a program once its specification is violated. This ranges from standard exceptions to advanced planning. Guidance can also be used during testing to expose errors. Both foundational and practical aspects of dynamic monitoring were encouraged. The papers in this volume were reviewed by the program committee consisting, besides editors, ofSaddek Bensalem(VERIMAG Laboratory)Rance Cleaveland(State University of New York at Stony Brook)Michael Ernst(Massachusetts Institute of Technology)Patrice Godefroid(Bell Laboratories)Gerard Holzmann(Bell Laboratories)Jim Larus(Microsoft Research)Insup Lee(University of Pennsylvania)John Rushby(SRI International)Joseph Sifakis(VERIMAG Laboratory)Reid Simmons(Carnegie Mellon University)Olog Sokolsky(University of Pennsylvania) also by Susanne Graf, Moonjoo Kim, Oded Maler, Laurent Mounier, and Stavros Tripakis. This volume will be published as volume 55, issue 2, in the series Electronic Notes in Theoretical Computer Science (ENTCS). This series is published electronically through the facilities of Elsevier Science B.V. and its auspices. The volumes in the ENTCS series can be accessed at the URL http://www.elsevier.nl/locate/entcs A printed version of the current volume is distributed to the participants at the workshop in Berlin. 23 July 2001 Klaus Havelund, Grigore Rosu