Previous: , Up: Decomposing a Component   [Contents][Index]


3.7.3 Binding Ports

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.

3.7.3.1 Syntax

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.

3.7.3.2 Examples

3.7.3.3 Decomposition into components and binding their ports.

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;
  }
}

See also: