| | |
Summary: A logic of objectoriented programs
Mart'in Abadi and K. Rustan M. Leino
Systems Research Center
Digital Equipment Corporation
fma,rustang@pa.dec.com
Abstract. We develop a logic for reasoning about objectoriented pro
grams. The logic is for a language with an imperative semantics and
aliasing, and accounts for selfreference in objects. It is much like a type
system for objects with subtyping, but our specifications go further than
types in detailing pre and postconditions. We intend the logic as an
analogue of Hoare logic for objectoriented programs. Our main techni
cal result is a soundness theorem that relates the logic to a standard
operational semantics.
1 Introduction
In the realm of procedural programming, Floyd and Hoare defined two of the
first logics of programs [Flo67, Hoa69]; many later formalisms and systems built
on their ideas, and addressed difficult questions of concurrency and data ab
straction, for example. An analogous development has not taken place in object
oriented programming. Although there is much formal work on objects (see sec
tion 6), the literature on objects does not seem to contain an analogue for Floyd's
|