// Place global declarations here.
clock time;
bool next=0;
bool ack=0;
bool frame=0;
urgent chan ML;
urgent chan LM;
urgent chan LR;
urgent chan RL;
Sender
clock sc;
clock fc;
clock x0; //timer
clock x1; //timer
bool next = 0;
canSend1
canSend0
waitACK1
waitACK0
lostPacket0
lostPacket1
receivedACK0
receivedACK1
waitPacket
Receiver
clock rc;
bool correctFrame=0;
dupPacket
canACK
donePacket
receivedPacket
waitPacket
Link
clock lc;
lostPacket
canSend
receivedPacket
canACK
receivedACK
sender = Sender();
receiver = Receiver();
link = Link();
system sender, receiver, link;
A[] (not deadlock)
sender.waitACK0 || sender.waitACK1 --> (sender.receivedACK0 || sender.receivedACK1)
E<> (sender.receivedACK0 && ack == next )
link.lostPacket --> (sender.canSend0 || sender.canSend1 || receiver.canACK)