timed global protocol OnlineWallet(role S, role C, role A) { login(id: string, pw: string) from C to A within [0;1] using a and resetting (); choice at A { login_ok () from A to C within [0;1] using a and resetting (); login_ok () from A to S within [0;1] using a and resetting (); rec LOOP { account(balance: int, overdraft: int) from S to C within [0;1] using a and resetting (); choice at C { @< amount <= balance+overdraft > pay(payee: string, amount: int) from C to S within [0;1] using a and resetting (); continue LOOP within [0;1] using a and resetting (); } or { quit() from C to S within [0;1] using a and resetting (); } } } or { login_fail(error: string) from A to C within [0;1] using a and resetting (); login_fail(error: string) from A to S within [0;1] using a and resetting (); } }