next up previous
Next: 2.3 Components Up: 2 Position Previous: 2.1 Interfaces

2.2 Connectors

Connectors implement functions defined in the interfaces of the interacting components. It is a structure which can be expressed by a ML functor:
functor Connector () :
sig
val output1 : $Domain \rightarrow unit$;
val input2 : $unit \rightarrow Range$;
val output2 : $Domain \rightarrow unit$;
end
=
struct
($\ast$ implementation of the input and the output functions $\ast$)
end;
The indexes, e.g. 1 and 2, are used to distinguish the interfaces of the different components, in this case C1 and C2 corresponding to Figure 1. A connector can have an arbitrary collection of input and output functions corresponding to the interfaces, i.e. outward stubs, which it implements.

A specific connector, $Con\_C1\_C2$ in Figure 1, is then given by:

structure $Con\_C1\_C2$ = Connector();


Hongyan Sun and Anders P. Ravn
Sept. 2, 1997