----------------------------- MODULE TestBug -----------------------------
VARIABLE s
Init == s = "a"
Next == \/ /\ s = "a"
/\ s' = "b"
\/ /\ s = "b"
/\ s' = "c1"
\/ /\ s = "b"
/\ s' = "c2"
\/ /\ s = "c2"
/\ s' = "c1"
\/ /\ s = "c1"
/\ s' = "c2"
\/ /\ s = "c1"
/\ s' = "a"
Spec == Init /\ [][Next]_s /\ WF_s(Next)
\* Succeeds
Prop1 == (s = "b") ~> ((s = "a") \/ [](s \in {"c1", "c2"} /\ <>(s = "c2")))
\* Should be equivalent to Prop1. Succeeds.
Prop2 == []((s # "b") \/ <>((s = "a") \/ [](s \in {"c1", "c2"} /\ <>(s = "c2"))))
\* Should be equivalent to Prop1 and Prop2. Fails.
Prop3 == []((s # "b") \/ ~[]~((s = "a") \/ [](s \in {"c1", "c2"} /\ <>(s = "c2"))))
(*
Error trace for Prop3:
1: Initial predicate, s = "a"
2: Next in TestBug, s = "b"
3: Next in TestBug, s = "c2"
4: Next in TestBug, s = "c1"
4: Back to state (links to s = "c2")
*)
==========================================================================