Given: November 9 - - Due: Noember 21 - - This will only count for 10 points - the purpose is to prepare yourself for some questions in the final exam that may be related to these topics
Property X: The protocol should have the property that the two components are always in corresponding states when no message is in transit
The basic behavior of component A is given by the following state machine. The basic behavior of component B is obtained from the behavior of A by complementing inputs and outputs. These basic behaviors must be complemented to obtain a protocol without unspecified receptions such that the property X is satisfied.
The basic behavior of B is shown below in black. We follow Gouda"s method and give priority to A. There are two mixed states, 2 and 3. If we assume that in state 2, A produces the output b ane B produces the output c, we get unspecified receptions which can be resolved by additional transitions in A and B, respectively (b received in state 4 and c received in state 3). This is shown in blue below. Similarly, simultaneous sending from state 3 (messages e nd d) also gives rise to unspecified receptions which can be resolved by corresponding receptions (also shown in blue below).
This example has additional difficulties: A, after sending b could immediately send e, and if B sends simultaneously c, this c can also be received by A in state 4. Also B may send immediately after c an f. This means that A may receive an f in state 3 (after the reception of the c). And the b sent by A may be received by B in state 1 (in which case B should go into state 3, because A has priority). This nedessary additional adjustments are shown in red in the figures below.
We consider the taxi system described in the course notes. We assume that all sequencing between the different activities shown as arrows in the diagram are weak sequences. There are several cases of non-local choices (competing initiatives).
Part 1: Ignoring the competing initiatives (assuming that never both sides would take an initiative), use the protocol derivation approach described in the course notes to derive state machine behaviors for the three components: user, taxi and manager. You may assume that the system contains only one user, one taxi and one manager.
The figure below pm the left is the specification of the taxi system as given in the course notes. I have first rewritten this specification in terms of an LTS (see figure to the right). It assumes that there is one client and one taxi, and that the taxi is initially in the free state. I have indicated (as in the figure to the left) what is the initiating component (upper index) and what are the other components involved (lower index). It is assumed that each LTS transition represents the exchange of one of more messages, as indicated in the cours notes. Notes:
From the diagram on the right, I have then derived the component behaviors shown by the diagrams below (the black part only). Here the operations of the upper diagram on the right are replaced by the reception or sending of messages (with corresponding names). The component initiating an operation sends the corresponding message (possibly to two partners) and the other components receive the message. For the Assign and Pick-up operations, two messages are sent - they are sent in parallel (the destination is indicated as lower index). For the messages sent to a single component, the destination is not explicitly given, but can be deduced by looking which component has the corresponding reception. Notes:
Part 2: Check the protocol obtained for Part 1 for unspecified receptions (note: each non-local choice would give rise to unspecified receptions) - you may do this intuitively or by performing reachability analysis. Identify the non-local choices.
It is clear from the above diagrams that the states 1 and 2 are mixed states.
Part 3: Use Gouda's method to resolve the non-local choices by adding suitable reception transitions. Does the obtained system work without problems ?
If we assume that the client has priority in both of these mixed state, the situation is somehow more complicated than discussed in the Gouda paper, since we have here 3 components, not only two. I have come up with a design for the three components as shown in the three diagrams above (including the red transitions). This may not be a complete solution; I am not sure whether I have made any errors (sorry, I did not make a reachability analysis for my proposed solution in order to check its correctness). Here is a short explanation.
This example shows you that sometimes the standard methods (like Gouda's method for two components in the case of this example) are not sufficient for the problem at hand. It is important to be inventive and come up with solutions to the problems by modifying and extending what you have learned.