Commit fe431392 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 82082f1f
...@@ -186,6 +186,21 @@ PathMinimal(p) == ~ \E pp \in SeqN(Nodes, Cardinality(Nodes)) : ...@@ -186,6 +186,21 @@ PathMinimal(p) == ~ \E pp \in SeqN(Nodes, Cardinality(Nodes)) :
/\ PathCorrect(pp) /\ PathCorrect(pp)
\* Dist is len of minimal path in between n-m.
RECURSIVE _Dist(_, _)
_Dist(n, S) ==
IF n \in S THEN 1
ELSE
LET S_ == S \cup {m \in Nodes : {n,m} \in Edges}
IN
IF S_ = S THEN Inf
ELSE
LET d == _Dist(n, S_)
IN
IF d = Inf THEN Inf
ELSE 1 + d
Dist(n,m) == _Dist(n, {m})
\* Paths are OK if they are all correct and minimal. \* Paths are OK if they are all correct and minimal.
PathsOK == \A n \in Nodes : PathsOK == \A n \in Nodes :
LET p == ParentPath(n) LET p == ParentPath(n)
...@@ -194,6 +209,7 @@ PathsOK == \A n \in Nodes : ...@@ -194,6 +209,7 @@ PathsOK == \A n \in Nodes :
/\ p[Len(p)] = root \* not NoRoute /\ p[Len(p)] = root \* not NoRoute
/\ PathCorrect(p) /\ PathCorrect(p)
/\ PathMinimal(p) /\ PathMinimal(p)
/\ Len(p) = Dist(n, root)
\* Paths must be all OK when terminated. \* Paths must be all OK when terminated.
THEOREM Terminated => PathsOK THEOREM Terminated => PathsOK
......
...@@ -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="115"/> <intAttribute key="fpIndex" value="14"/>
<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