Technical Report: DCC-99-1
Programming and Implementation Issues in Non-Uniform TyCO
António Ravara(1) and Luís
(1) Dep. Matematica, Instituto Superior Tecnico, Lisboa,
(2) DCC & LIACC, Universidade do Porto,Rua do Campo
Alegre, 823 4150 Porto, Portugal
We present an abstract machine specification for non-uniform TyCO. TyCO
is a name-passing calculus of concurrent objects. Since
concurrent objects do not always offer the same methods due to synchronization
constraints, we advocate non-uniform interfaces, i.e.,
interfaces with only enabled methods. From the programming point
of view the use of non-uniform interfaces for representing objects, as
opposed to the uniform record interfaces, allows a more intuitive and expressive
definition of objects and in general object-based data structures.
This is a result of the far richer behaviors allowed by the non-uniformity.
From an implementation point of view, frequently the code is much shorter,
both in the source programs as well as in the final byte code or other
executable format; even in cases where the difference in code size is not
significant, the use of a single name for all of the object's dynamic instances
substantially reduces heap space, and allows optimizations in heap usage.
The abstract machine for non-uniform TyCO is based on a similar specification
for the uniform case. The changes are very localized and regard essentially
the structure of individual communication channels. Based on experience
gathered with an implementation of uniform TyCO, we discuss the advantages
(and disadvantages) of non-uniformity from the point of view of performance.