Consider a complex system with a multitude of processes. Inside the system,
there is a closed group where processes which have joined the group can share messages from the outside world. All processes part of the system form the Procs set. Processes which have joined the group are part of the Joined set, while processes which have not joined yet or have left are part of the Left.
• Assuming a type P for processes, define the CmpS schema representing the complex system.
• Define the schema of the initSys operation that initialises the complex system.
• Define the schema of the join operation that adds a process p to the group.
• Define the schema of the leave operation that removes a process p from the group.
• Define the schema of the create operation that adds a process p to the complex system.