hello world post pcal calc

This commit is contained in:
Oskar Thoren 2019-12-03 21:49:48 +08:00
parent 2c48c38e12
commit 096ee180e7
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
3 changed files with 36 additions and 1 deletions

2
tlaplus/gossip/hello.cfg Normal file
View File

@ -0,0 +1,2 @@
SPECIFICATION Spec
\* Add statements after this line.

8
tlaplus/gossip/hello.old Normal file
View File

@ -0,0 +1,8 @@
EXTENDS TLC
(* --algorithm hello_world
variable s \in {"Hello", "World!"};
begin
A:
print s;
end algorithm; *)

View File

@ -5,4 +5,29 @@ variable s \in {"Hello", "World!"};
begin
A:
print s;
end algorithm; *)
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