research/tlaplus/gossip/hello.tla

34 lines
572 B
Plaintext
Raw Normal View History

2019-12-03 13:48:57 +00:00
EXTENDS TLC
(* --algorithm hello_world
variable s \in {"Hello", "World!"};
begin
A:
print s;
2019-12-03 13:49:48 +00:00
end algorithm; *)
\* BEGIN TRANSLATION
VARIABLES s, pc
vars == << s, pc >>
Init == (* Global variables *)
/\ s \in {"Hello", "World!"}
/\ pc = "A"
A == /\ pc = "A"
/\ PrintT(s)
/\ pc' = "Done"
/\ s' = s
(* Allow infinite stuttering to prevent deadlock on termination. *)
Terminating == pc = "Done" /\ UNCHANGED vars
Next == A
\/ Terminating
Spec == Init /\ [][Next]_vars
Termination == <>(pc = "Done")
\* END TRANSLATION