Example (continued)
26  proctype channel(chan in, out)
27  { byte md, mt;
28     do
29         :: in?mt,md ->
30            if
31 :: out!mt,md
32 :: out!err,0
33            fi
34     od
35  }
37  init
38  { chan AtoB = [1] of { mtype, byte };
39      chan BtoC = [1] of { mtype, byte };
40      chan CtoA = [1] of { mtype, byte };
41      atomic {
42 run transfer(AtoB, BtoC);
43 run channel(BtoC, CtoA);
44 run transfer(CtoA, AtoB)
45       };
46       AtoB!err,0; /* start */
47       0 /* hang */
48   }
Promela source code part II