Skip to content

Commit

Permalink
TCP according to RFC 9293.
Browse files Browse the repository at this point in the history
[Feature]

Signed-off-by: Markus Alexander Kuppe <[email protected]>
  • Loading branch information
lemmy committed Apr 5, 2024
1 parent 616639f commit ed349e1
Show file tree
Hide file tree
Showing 5 changed files with 422 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ Here is a list of specs included in this repository, with links to the relevant
| [RFC 3506: Voucher Transaction System](specifications/byihive) | Santhosh Raju, Cherry G. Mathew, Fransisca Andriani | | | || |
| [TLA⁺ Level Checking](specifications/LevelChecking) | Leslie Lamport | | | | | |
| [Condition-Based Consensus](specifications/cbc_max) | Thanh Hai Tran, Igor Konnov, Josef Widder | | | | | |
| [Yo-Yo Leader Election](specifications/YoYo) | Ludovic Yvoz, Stephan Merz | | | || |
| [Yo-Yo Leader Election](specifications/YoYo) | Ludovic Yvoz, Stephan Merz | | | || |
| [TCP as defined in RFC 9293](specifications/tcp) | Markus Kuppe | | | || |

## Examples Elsewhere
Here is a list of specs stored in locations outside this repository, including submodules.
Expand Down
44 changes: 44 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5128,6 +5128,50 @@
]
}
]
},
{
"path": "specifications/tcp",
"title": "TCP as defined in RFC 9293",
"description": "Transmission Control Protocol (TCP)",
"sources": ["https://datatracker.ietf.org/doc/html/rfc9293"],
"authors": [
"Markus Kuppe"
],
"tags": [],
"modules": [
{
"path": "specifications/tcp/tcp.tla",
"communityDependencies": [
"SequencesExt"
],
"tlaLanguageVersion": 2,
"features": [],
"models": []
},
{
"path": "specifications/tcp/MCtcp.tla",
"communityDependencies": [],
"tlaLanguageVersion": 2,
"features": [
"state constraint",
"symmetry"
],
"models": [
{
"path": "specifications/tcp/MCtcp.cfg",
"runtime": "00:00:01",
"size": "small",
"mode": "exhaustive search",
"features": [
],
"result": "success",
"distinctStates": 598,
"totalStates": 3196,
"stateDepth": 14
}
]
}
]
}
]
}
22 changes: 22 additions & 0 deletions specifications/tcp/MCtcp.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CONSTANTS
A = A
B = B

CONSTANT
Peers <- peers

SYMMETRY
Symmetry

SPECIFICATION
Spec

INVARIANT
TypeOK
Inv

CONSTRAINT
NoRetransmission

ACTION_CONSTRAINT
SingleActiveOpen
24 changes: 24 additions & 0 deletions specifications/tcp/MCtcp.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---- MODULE MCtcp ----
EXTENDS tcp, TLC

CONSTANTS A, B
peers == {A, B}
Symmetry == Permutations(peers)

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
Loading

0 comments on commit ed349e1

Please sign in to comment.