Previous: Specifying Ports, Up: Decomposing a Component [Contents][Index]
A component can be decomposed into a group of components. A grouping of components is called a system.
Component instances in the composition are connected by binding their ports. Only ports with an equal interface definition and opposite direction can be bound together.
A binding statement takes the form of
component1_instance_name.port <=> component2_instance_name.port
Only ports with an equal interface definition and opposite direction can be bound together.
Here a component is decomposed into two other components C1 and C2.
interface I1 { in void event(); } component C1 { provides I1 i1; } component C2 { requires I1 i1; } component Decomposition { system { C1 c1; C2 c2; c1.i1 <=> c2.i1; } }