

Start from the Class Diagram to know what objects and methods you can use.


You can use this information to make some of the rules a little simpler.įor example, if a train wants to enter the junction, the trace will only terminate when that train has left the junction. That is, for every enter event, there will be an exit event in the trace. Note that the trace will not terminate while there are still trains on any of the tracks. The controller will send the traffic light signals out every second.įor simplicity, you will only need to check use case 3 and 4.If two trains are waiting to enter the junction at the same time, permission will be granted in order of arrival (i.e., the first train to arrive will get a green light, and the second one has to wait).If a train is on the junction, all traffic lights will remain red until that train has left the junction.If a train enters the junction, all traffic lights to the junction become red.If a train wants to enter the junction, it will eventually get a green light.The behaviour to be verified (use cases) is as follows: For safety, the signal to the traffic light is sent out every second (such that traffic lights can detect if there is a problem with the connection).If it is detected that the junction is clear again, new (or queued) requests are handled.

As soon as a train has entered the junction, all traffic lights for entry to the junction are put to red again.This on the condition that there is currently no train on the junction itself, and that the traffic light on the other entry to the junction is red too. The controller will process these incoming signals, and will put the traffic light of the requesting segment to green.As soon as a train is detected, a signal is sent to the controller. The railway segments continuously check for the presence of a train on that segment.By default, all traffic lights that prevent the entry to the junction are set to red for safety.The behaviour can be described as follows: The structure of the junction is described in the following UML Class Diagram: You will first model a set of Regular Expressions, and then a set of Finite State Automata, which you will subsequently encode, to automatically verify whether the system implementation complies with the system specification given in the requirements below (and modelled visually in Sequence Diagram form). The validation will thus be done automatically. This trace file contains debugging information about the junction, such as all incoming signals, outgoing signals, and internal timers that get triggered.ĭue to this verbosity, and the total runtime of the execution, the file is quite long, and therefore validating the requirements is not to be done manually. You are, however, only given access to a trace file of the execution. It is necessary to check whether or not the specified requirements are validated. You are given an implementation of a railway junction controller, which needs to set the traffic signals of the segments coming in to the junction.
