-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TCP according to RFC 9293. [Feature] Signed-off-by: Markus Alexander Kuppe <[email protected]>
- Loading branch information
Showing
5 changed files
with
434 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
CONSTANTS | ||
A = A | ||
B = B | ||
|
||
CONSTANT | ||
Peers <- peers | ||
Init <- MCInit | ||
|
||
\* Disable symmetry reduction when checking liveness. | ||
\* SYMMETRY | ||
\* Symmetry | ||
|
||
SPECIFICATION | ||
Spec | ||
|
||
INVARIANT | ||
TypeOK | ||
Inv | ||
|
||
PROPERTY | ||
Prop | ||
|
||
CONSTRAINT | ||
NoRetransmission | ||
|
||
ACTION_CONSTRAINT | ||
SingleActiveOpen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
---- MODULE MCtcp ---- | ||
EXTENDS tcp, TLC | ||
|
||
CONSTANTS A, B | ||
peers == {A, B} | ||
Symmetry == Permutations(peers) | ||
|
||
MCInit == | ||
\* One node starts in the SYN-SENT state, i.e., one node has already received the active open command. The other node | ||
\* is in the listen state, i.e., it has received the passive open command. | ||
\E node \in Peers: | ||
/\ tcb = [p \in Peers |-> TRUE] | ||
/\ connstate = [p \in Peers |-> IF p = node THEN "SYN-SENT" ELSE "LISTEN"] | ||
/\ network = [p \in Peers |-> IF p = node THEN <<>> ELSE << "SYN" >>] | ||
|
||
NoRetransmission == | ||
\A p \in Peers : | ||
\A i \in 1..Len(network[p]) - 1 : | ||
network[p][i] # network[p][i + 1] | ||
|
||
SingleActiveOpen == | ||
\* A real system will allow infinitely many active opens of TCP connections. An | ||
\* explicit state model checker like TLC cannot enumerate infinitely many states. | ||
\* Thus, do not allow multiple active opens (the first active open is implicit in Init). | ||
~ \E local, remote \in Peers: | ||
\/ ACTIVE_OPEN(local, remote) | ||
\/ PASSIVE_OPEN(local, remote) | ||
\/ SEND(local, remote) | ||
|
||
============================================================================= | ||
\* Modification History | ||
\* Created Tue Apr 02 10:38:50 PDT 2024 by markus |
Oops, something went wrong.