20 lines
424 B
Text
20 lines
424 B
Text
---- MODULE traffic_lights_spain_bad ----
|
|
VARIABLE light \* Current light color
|
|
|
|
Colors == {"red", "yellow", "green"}
|
|
|
|
Init == light = "red"
|
|
|
|
Next ==
|
|
\/ /\ light = "red"
|
|
/\ light' = "yellow"
|
|
\/ /\ light = "green"
|
|
/\ light' = "yellow"
|
|
\/ /\ light = "yellow"
|
|
/\ light' = "red"
|
|
|
|
Spec == Init /\ [][Next]_light
|
|
|
|
\* Safety property: light is always a valid color
|
|
TypeOK == light \in Colors
|
|
====
|