# Incremental Construction for Scalable Component-Based Systems
## 5 System Construction in EX-MAN
### ATM System  
Using EX-MAN for incremental construction, Figure 26 shows the design of an ATM system in the ECF tool of EX-MAN. The system is constructed incrementally by following our defined approach. The final system as well as the intermediate partial systems during the incremental construction process were tested for the added and preserved behavior.  
A system in EX-MAN (shown in Figure 27) is comprised of components to perform computational tasks (in the bottom layer of the architecture) and connectors to perform control/data coordination (in multiple layers). The EX-MAN design of the ATM system includes the details of component interfaces, connector's flow constraints (written in flow constraint language (FCL) [63] for EX-MAN) and overall request/response flow with arrows in the system.  
Figure 26: The ATM system.  
A component interface is a collection of services. In the ATM system, each component has a single service. A connector in the architecture can be either a composition connector (sequencer SEQ, pipe PIPE and selector SEL) or an adaptor (guard and finite/infinite loop). In the system architecture, an interface appearing on a connector represents a composite component (if on a composition connector) or an adapted component (if on the adaptor connector); hence, components with the respective interface are shown including the encapsulated components as well as the composite/adapted components.  
On installation of the ATM system, request annotated with '0' is initiated to the root loop connector L2; L2 is an infinite loop connector which passes the request to the adapted system (PIPE2). On a service request, a PIPE connector makes a request to each connected component in order from left to right. This connector is enabled to pass the results of a service from a component as input arguments in a service request to other components. These details of passing results are defined in a FCL constraint for the PIPE. PIPE2 makes the first request to the finite (marked with \"*\") loop connector L1. L1 is constrained to repeat a request until the true result is produced in maximum three iterations by the adapted component. From L1 to PIPE1 and then to sequencer SEQ1. A sequencer is similar to pipe with the ability to pass the results of a service as arguments to another service. SEQ1 makes a request to component CR to read an ATM card number and then a request to PR to read pin number; these two numbers are passed to component CB in the request by PIPE1. If the card is authenticated by component CB then L1 terminate its iterations and returns the response to PIPE2. PIPE2 then passes the request to next component; after checking the authentication by guard G1, the request is sent to component RA to get a transaction details from the system user. The next request by PIPE2 is checked by guard G2 for card authentication and passes the request to one of two bank components. In case  
Figure 27: The ATM system detailed design.  
the card authentication failed, the last request by PIPE2 (after being checked by guard G3) is passed to component CC to confiscate the card.