Question
Task 1: CSP and the concurrent systems (70%) A bridge over a river is only wide enough to permit a single lane of traffic. Therefore,
Task 1: CSP and the concurrent systems (70%) A bridge over a river is only wide enough to permit a single lane of traffic. Therefore, cans can only move concurrently if they are moving in the same direction. For the simplicity of modelling, we consider all the cars moving from left to right are RED, and all from right to left are BLUE. For example, some blue cars entering the bridge are illustrated by the following diagram
However, a crash can occur if two cars moving in different directions enter the bridge at the same time, which violates the safety property.
A car can approach the bridge, enter and leave the bridge. Note that we dont consider any time issue in the system. For example, cars enter or leave the bridge instantaneously. In the system, there are THREE red cars and THREE blue cars, which can move concurrently.
To model the system, THREE processes should be constructed at least, i.e., one process to denote the concurrent behaviour of three red cars, and one for three blue cars, and one to model the bridge to interactive with all cars.
Task 1.1: (10%) Design and draw a labelled transition diagram of the bridge. The bridge should be able to interact with any car. However, it must follow one rule that the car enters the bridge firstly and leaves the bridge firstly. The one lane system does not allow the overtaking. The system can identify some bad behaviours which violate the safety property and can lead to the event crash
Note that the event crash should not interfere the behaviour of the bridge. For example, the occurrence of the event crash should not stop the system. Overall, the transition system of the bridge should satisfy three requirements:
Identification of the bad behaviours to violate the safety property (no crash);
Controlling of the cars with the first-in and first-out rule;
No interference on cars behaviours except that it satisfies the above requirements
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started