This commit is contained in:
2026-03-12 03:32:06 -04:00
parent 6a8f9be133
commit dd1156d61a
23 changed files with 1967 additions and 165 deletions

View File

@@ -1,12 +1,7 @@
// models: phi1, phi2, phi3, phi5
// does not model: phi4, phi7
// not yet implemented: phi6
mtype = { SYN, FIN, ACK, ABORT, CLOSE, RST, OPEN }
chan AtoN = [2] of { mtype };
chan NtoA = [2] of { mtype };
chan BtoN = [2] of { mtype };
chan NtoB = [2] of { mtype };
chan AtoB = [2] of { mtype };
chan BtoA = [2] of { mtype };
int state[2];
int pids[2];
@@ -80,7 +75,6 @@ SYN_RECEIVED:
:: rcv ? ACK -> goto ESTABLISHED;
:: rcv ? _ -> skip;
od
/* We may want to consider putting a timeout -> CLOSED here. */
ESTABLISHED:
state[i] = EstState;
do
@@ -139,8 +133,8 @@ end:
init {
state[0] = ClosedState;
state[1] = ClosedState;
run TCP(AtoN, NtoA, 0);
run TCP(BtoN, NtoB, 1);
run TCP(AtoB, BtoA, 0);
run TCP(BtoA, AtoB, 1);
}
/* liveness: simultanous open */