mirror of https://github.com/vacp2p/research.git
hello world post pcal calc
This commit is contained in:
parent
2c48c38e12
commit
096ee180e7
|
@ -0,0 +1,2 @@
|
|||
SPECIFICATION Spec
|
||||
\* Add statements after this line.
|
|
@ -0,0 +1,8 @@
|
|||
EXTENDS TLC
|
||||
|
||||
(* --algorithm hello_world
|
||||
variable s \in {"Hello", "World!"};
|
||||
begin
|
||||
A:
|
||||
print s;
|
||||
end algorithm; *)
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue