Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
KTLA Study
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
KTLA Study
Commits
ae13c84e
Commit
ae13c84e
authored
Feb 10, 2022
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e5ea0e18
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
Route.pdf
Route.pdf
+0
-0
Route.tla
Route.tla
+24
-7
No files found.
Route.pdf
View file @
ae13c84e
No preview for this file type
Route.tla
View file @
ae13c84e
...
...
@@ -44,32 +44,49 @@ m \prec n == IF m = Inf THEN FALSE
CONSTANT NoRoute \* = NoRoute
\* Neigh(n) is set of n's neighbours.
Neigh(n) == {x \in Nodes : {x,n} \in Edges}
\* EdgeQQ({n,m}) is {<n,m>, <m,n>}
EdgeQQ(e) == LET x == CHOOSE x \in e : TRUE
IN LET y == CHOOSE y \in (e\{x}) : TRUE
IN
{<<x,y>>, <<y,x>>}
(********
--algorithm Route {
variables depth \* node -> depth
= [[n \in Nodes |-> Inf] EXCEPT ![root] = 0],
parent \* node -> parent node
= [n \in Node |-> IF n = root THEN root ELSE NoRoute];
process (RT \in Nodes) {
= [[n \in Nodes |-> NoRoute] EXCEPT ![root] = root],
\* msgs[<<n,m>>] is message queue for n->m
msgs = [UNION {EdgeQQ(e) : e \in Edges} |-> <<>>];
fair process (RT \in Nodes) {
variables depth = IF self = root THEN 0 ELSE Inf,
parent = IF self = root THEN root ELSE NoRoute;
loop: while (TRUE) {
skip;
}
}
};
********)
\* BEGIN TRANSLATION (chksum(pcal) = "
9a717d8a" /\ chksum(tla) = "9b3808dd
")
VARIABLES depth, parent
\* BEGIN TRANSLATION (chksum(pcal) = "
b5e3ebb1" /\ chksum(tla) = "59198579
")
VARIABLES depth, parent
, msg
vars == << depth, parent >>
vars == << depth, parent
, msg
>>
ProcSet == (Nodes)
Init == (* Global variables *)
/\ depth = [[n \in Nodes |-> Inf] EXCEPT ![root] = 0]
/\ parent = [n \in Node |-> IF n = root THEN root ELSE NoRoute]
/\ parent = [[n \in Nodes |-> NoRoute] EXCEPT ![root] = root]
/\ msg = [n,m \in Nodes |-> <<>>]
RT(self) == /\ TRUE
/\ UNCHANGED << depth, parent >>
/\ UNCHANGED << depth, parent
, msg
>>
Next == (\E self \in Nodes: RT(self))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment