Check out the new USENIX Web site. next up previous
Next: Polymorphism Up: Policy Composition Previous: Parameterization

Inheritance

The second construct is for policy inheritance. For example, if we have already defined collaborations A and B. Now we want to define a new collaboration C. And it turns out we can reuse the definitions in A and B. So C just needs to extend those two existing collaborations.
\begin{smalltab}
\= {\bf collaboration} $C$\space {\bf extends} $A$, $B$\space \\ \\ gt \{ \= \\ \\ gt \\ gt ... \\ \\ gt \}\end{smalltab}

The collaboration bus channels and roles of the resulting collaboration C are a union of those defined in A, B, and itself. Wherever there is a name conflict, the above scoping operator ``::'' and the appropriate prefixes will be applied to resolve it automatically.

Roles can also be extended from roles defined in ancestor collaborations or other roles defined in the same collaboration. In the above example, role r3 in collaboration C can extend both role r1 in collaboration A and role r2 in collaboration B as follows.
\begin{smalltab}
\= {\bf role} $C$::$r_{3}$\space {\bf extends} $A$::$r_{1}$, $B$::$r_{2}$\space \\ \\ gt \{ \= \\ \\ gt \\ gt ... \\ \\ gt \} \end{smalltab}
In a sequel, conference bus channels and rules of C::r3 will be a union of those defined in A::r1 and B::r2 respectively.



Du Li
8/25/1999