Commit 0f144dae authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5ae6abac
...@@ -13,15 +13,23 @@ Procs == 0..N ...@@ -13,15 +13,23 @@ Procs == 0..N
fair process (P \in Procs) { fair process (P \in Procs) {
ncs:- while (TRUE) { ncs:- while (TRUE) {
skip ; skip ;
enter:+ await sem = 1 ; \* enter:+ await sem = 1 ;
sem := 0 ; \* sem := 0 ;
enter:+ if (sem = 1) {
sem := 0 ;
goto cs
}
else {
goto enter
} ;
cs: skip ; cs: skip ;
exit: sem := 1 ; exit: sem := 1 ;
} }
} }
} }
*******) *******)
\* BEGIN TRANSLATION (chksum(pcal) = "63149355" /\ chksum(tla) = "b638a8a") \* BEGIN TRANSLATION (chksum(pcal) = "d43d362d" /\ chksum(tla) = "8dfff25d")
VARIABLES sem, pc VARIABLES sem, pc
vars == << sem, pc >> vars == << sem, pc >>
...@@ -38,9 +46,11 @@ ncs(self) == /\ pc[self] = "ncs" ...@@ -38,9 +46,11 @@ ncs(self) == /\ pc[self] = "ncs"
/\ sem' = sem /\ sem' = sem
enter(self) == /\ pc[self] = "enter" enter(self) == /\ pc[self] = "enter"
/\ sem = 1 /\ IF sem = 1
/\ sem' = 0 THEN /\ sem' = 0
/\ pc' = [pc EXCEPT ![self] = "cs"] /\ pc' = [pc EXCEPT ![self] = "cs"]
ELSE /\ pc' = [pc EXCEPT ![self] = "enter"]
/\ sem' = sem
cs(self) == /\ pc[self] = "cs" cs(self) == /\ pc[self] = "cs"
/\ TRUE /\ TRUE
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<stringAttribute key="distributedNetworkInterface" value="192.168.122.1"/> <stringAttribute key="distributedNetworkInterface" value="192.168.122.1"/>
<intAttribute key="distributedNodesCount" value="1"/> <intAttribute key="distributedNodesCount" value="1"/>
<stringAttribute key="distributedTLC" value="off"/> <stringAttribute key="distributedTLC" value="off"/>
<intAttribute key="fpIndex" value="24"/> <intAttribute key="fpIndex" value="10"/>
<intAttribute key="maxHeapSize" value="25"/> <intAttribute key="maxHeapSize" value="25"/>
<stringAttribute key="modelBehaviorInit" value=""/> <stringAttribute key="modelBehaviorInit" value=""/>
<stringAttribute key="modelBehaviorNext" value=""/> <stringAttribute key="modelBehaviorNext" value=""/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment