module LE_LANN_STATION_REVISION_2 (DATA) is process STATION [OPEN, CLOSE:ACCESS, PRED, SUCC:PORT] (Ai:ADDR, INIT:BOOL) is use INIT; var C, B:BOOL in C := true; B := true; loop alt only if C then -- timeout: start an election SUCC (CLAIM, Ai, B); C := true end if [] PRED (TOKEN); PRIVILEDGE [OPEN, CLOSE, SUCC] (Ai); C := true; B := not (B) [] var Aj:ADDR, B0:BOOL in PRED (CLAIM, ?Aj, ?B0); if Ai < Aj then SUCC (CLAIM, Aj, B0) elsif Ai > Aj then SUCC (CLAIM, Aj, B0); C := false elsif (B0 == B) and C then PRIVILEDGE [OPEN, CLOSE, SUCC] (Ai); C := true; B := not (B) end if end var end alt end loop end var end process end module