is possible (or an empty reduced domain is found which signify that there is no solution).

![0_image_0.png](0_image_0.png)

The whole CACS prototype was developed in Java language. 

Due to the object oriented nature of Java language agents and the messages are represented by objects (Figure 8, 9).

The interaction between agents during value proposing stage is shown in Figure 6. as nest loops: the internal loop is similar to the domain reducing loop in Figure 6. Variables' domains are reduced according to the proposed value in the external loop. In the external loop, values are proposed and evaluated after the domain reduction to be either accepted or rejected. The external loop continues until we obtain single value domains for all variables.

![0_image_3.png](0_image_3.png)

The system layer uses generic interfaces for both MAS and CSP platforms. This allows the system to use any existing MAS and CSP platforms by implementing these interfaces. At the same time this isolates the internal structure from the changes of choice of platforms. An intermediate layer between the system and the real MAS or CSP platform is necessary in order to separate the structure of the system from that of the real MAS and CSP platforms. This layer works as an adapter; it implements the generic platforms in the system layer using the real platforms. This implementation difficulty varies according to the MAS and CSP platforms used for the realization of the final system.

![0_image_1.png](0_image_1.png)

![0_image_2.png](0_image_2.png)

However, from the point of view of Multi-Agent System design, agents should not be referenced by a simple public reference that is accessible by any other object in the system. The reason for that is to prevent any direct access to the agent internal functionality. Normally, references to agents should be kept hidden by the MAS platform and communicating with an agent is made by messages that would be delivered by the system using the agent address. Mapping from agent address to its real reference is an internal functionality of the MAS platform.

In order to be more generic, we distinguish in the prototype implementation between the agent and its reference. For this purpose, VAgentRef and CAgentRef classes have been designed. Both classes are inherited from the abstract AgentRef class. They are used as references to either variables' agents or controller agents. When an instance of the class DCSP is used to create an instance of VAgent or a CAgent, it returns an instance of either VAgentRef or CAagentRef classes respectively according to created agent. In the same manner, a variable inside 