Advanced Programming - Concurrency, Lab 4

Aims

More practice with parallel composition and action renaming.

  1. Modify TWOBUFF to The original TWOBUF is the following:
    range T = 0..3
    BUFF = (in[i:T]->out[i]->BUFF).
    ||TWOBUFF = (a:BUFF||b:BUFF)
               /{in/a.in,
                 a.out/b.in,
                 out/b.out}
               @{in,out}.
    
    menu RUN = {in[T],out[T]}
    

    By the way, what's that "menu" for?!?

  2. (3.6) Try the Museum exercise.....
    A museum allows visitors to enter by the east entrance and leave by the west exit. Arrivals and departures are signalled to the museum controller by the turnstiles at the entrance and exit. At opening time, the museum director signals to the controller that the museum is open and then the controller permits both arrivals and departures. At closing time, the director signals to the controller that there should be no more arrivals, and then only departures are permitted. Given that it consists of four processes East, West, Control and Director, draw the structure diagram for the system. Now provide an FSP description for each of the processes and then the appropriate composition. Try it out on the LTSA.

  3. Make sure that you understand the examples from Chapter 3 for the LTSA. You looked at some of them last week; this week experiment with the following: