文档介绍:Object Integrity while Allowing Aliasing
Harri Hakonen, Ville Leppänen and Tapio Salakoski
University of Turku and TUCS, Finland
{,,}***@
Abstract object state) on references, discuss maintaining object
integrity with such references, and consider
Aliasing is a fundamental programming concept in
implementation related issues. We consider
object oriented software design. Aliasing means that a
guaranteeing of object integrity by constrained
subordinate object is referenced by several objects.
references and ordinary operations by invariant of
This can be problematic, if the integrity of those
subordinate object. We discuss the form of
objects depends on the state of the shared subordinate
constraints and study implementation related issues.
object, since the referring objects may not be aware of
Although emphasis is on constraints that can be
each other. Changes made to the subordinate object
checked pile time, we do not limit our study on
must respect all invariants dealing with it at the time
such constraints. We identify several interesting
of change.
constraints, . context-bound immutability.
Instead of trying to limit the ability to set references to
shared subordinate objects, we consider restricting the Aliasing and object integrity
effects that can be caused via aliases by at