A Re-Entrancy Analysis for Object Oriented Programs

Manuel A. Fähndrich, Diego Garbervetsky, Wolfram Schulte · 2007

Abstract. We are interested in object-oriented programming methodologies that enable static verification of object-invariants. Reasoning soundly and effectively about the consistency of objects is still one of the main stumbling blocks to pushing object-oriented program verification into the mainstream. In this paper we explore a simple model of invariants that is intuitive and allows us to divide the verification problem into two well-defined parts: 1) reasoning about object consistency within a single method, and 2) reasoning about the absence of inconsistent re-entrant calls. We delineate this division by specifying the assumptions and proof obligations of each part. Part one can be handled using well-established techniques in modular verification. This paper presents a novel program analysis to handle the second part. It warns developers when re-entrant calls are made on objects whose invariants may not hold. The analysis uses a points-to analysis to detect re-entrant calls and a simple dataflow analysis to decide whether the invariant of the receiver of a re-entrant call holds. Initial experimentation shows the analysis is able to recognize that many re-entrant calls can be safely performed as their receivers are in a consistent state. 1

Read the paper · More papers on PaperTik