next up previous
Next: 2.2 Connectors Up: 2 Position Previous: 2 Position

Subsections


2.1 Interfaces

Interfaces of a component define access functions to an environment. The access functions are viewed as inputs from and outputs to an environment which is changed as a side effect. Thus an interface is defined in the following unified form:
signature Interface1 =
sig
val output1 : $Domain \rightarrow unit$;
end;

signature Interface2 =
sig
val input2 : $unit \rightarrow Range$;
val output2 : $Domain \rightarrow unit$;
end;
These two signatures are two specific cases of the general form of an interface which can contain a variable number of access functions, including mixed input and output functions.

Specifications

Above, we have stipulated that the interface is defined by a signature. This is obviously not the whole story. Another part of the definition would be a description of the relation between successive calls of access functions, as seen from both the component and the connector. A formalization involves defining a state , recording the side effects of the function calls, for instance a trace of function calls and two predicates over the state: a component specification and a protocol specification . The component must be developed so that it satisfies its specification by assuming the protocol. Analogously, a connector must obey the protocol under the assumption of the component specification. Obviously a robust connector will make minimal use of component specifications.
next up previous
Next: 2.2 Connectors Up: 2 Position Previous: 2 Position

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