timed global protocol SleepingBarber(role barber as B, role selector as S, role room as R) { rec Loop { choice at S { par { S introduces C within [0;1] using a and resetting (); } enter() from S to R within [0;1] using a and resetting (); choice at R { full() from R to C within [0;1] using a and resetting (); returned() from C to S within [0;1] using a and resetting (); wait() from R to B within [0;1] using a and resetting (); continue Loop within [0;1] using a and resetting (); } or { wait() from R to C within [0;1] using a and resetting (); enter() from R to B within [0;1] using a and resetting (); start() from B to C within [0;1] using a and resetting (); stop() from B to C within [0;1] using a and resetting (); done() from C to S within [0;1] using a and resetting (); next() from B to R within [0;1] using a and resetting (); wait() from R to B within [0;1] using a and resetting (); continue Loop within [0;1] using a and resetting (); } } or { done() from S to R within [0;1] using a and resetting (); done() from R to B within [0;1] using a and resetting (); } } }