Composition styles

Indus supports the programmatic composition of software components by other software components and active processes (or software agents) that seek to reuse them.

Indus therefore introduces the concept of Ports that qualify how a component’s functions can be composed with other functions based on whether the functions are data producers or data consumers or both. Indus also introduces composition mechanisms of plugging ports together based on their properties and validates such compositions before executing them to produce results.

Composition styles in Indus are therefore rules that validate a composition of ports based on the properties of the functions they qualify and connectors that enable compositions of ports.

Each composition style translates to Connectors + Composition rules.

Agents and Components use Connector types to compose member component ports. Connectors are represented by operators that invoke functions that implement the logic of binding components. Connectors communicate asynchronously with components they compose.

The following are various composition style provided in Indus:
 * Pipes
 * Events
 * Rules

There are some common issues that need to be checked in each composition rule, particularly, that, Return types and Input types need to match, for example, what the Source returns must be compatible with a Handler or a Sink

public Component GetSetComponentInter { Sink setTemperature = void resetTemp(Double temp); Source getTemperature = Double getTemp; }

Suppose the implementing class uses the pipe composition style as shown below : comp.getTemperature-> comp.setTemperature; This is a valid usage, since the return type of getTemperature matches with the input type of setTemperature.

Next : Pipes