Academia.eduAcademia.edu

Two semantic models of object-oriented languages

1994, Theoretical Aspects of Object-Oriented …

Abstract

We present and compare two models of object-oriented languages. The first we call the closure model because it uses closures to encapsulate side effects on objects, and accordingly makes the operations on an object a part of that object. It is shown that this denotational framework is adequate to explain classes, instantiation, and inheritance in the style of Simula as well as Smalltalk-80. The second we call the data structure model because it mimics the implementations of data structure languages like CLU in representing objects by records of instance variables, while keeping the operations on objects separate from the objects themselves. This yields a model which is very simple, at least superficially. Both the models are presented by way of a sequence of languages, culminating in a language with Smalltalk-80-style inheritance. The mathematical relationship between them is then discussed and it is shown that the models give equivalent results. It will emerge from this discussion that more appropriate names for the two models might be the fixed-point model and the self-application model. * To appear in Gunter, C. and Mitchell, J. C. (eds) Theoretical aspects of Object-Oriented Programming, MIT Press, 1993. 1 "Smalltalk-80" is a trademark of ParcPlace Systems. We use here a language called "SmallTalk" (with different capitalization) as an abstraction of Smalltalk-80.