Within the field of object-oriented type theory, much attention has been devoted to the notion of `self' and Self-types. In contrast, relatively little attention has been paid to this topic in studies on object-oriented specification language semantics. In the context of language semantics, the notion of `self' poses two problems. Firstly, it involves an awareness by an object of its own identity, and hence a capacity for self-referential method invocations. Secondly, the usual reference model for object identity maps object identities to object values. This means that an object's identity is not normally considered to be a part of its value, and so a value for `self' is not normally in scope. The way that a semantics resolves the scope problem can affect one's ability to use the semantics to reason about an object independently of its environment. This paper motivates the inclusion of a concept of `self' in object-oriented formal specification languages, and shows how this concept can be accommodated within the semantics of Object-Z. We show that a useful consequence of making objects `self'-aware is that messages between objects can be `tagged' with the identity of the sender object; this facilitates the task of reasoning about object interaction.
Index Terms:
self, Object-Z, object-oriented formal specification, semantics
Citation:
Alena Griffiths, "`self'-Conscious Objects in Object-Z," tools, pp.210, Technology of Object-Oriented Languages and Systems - Tools-25, 1997