mirror of
https://github.com/tu-darmstadt-informatik/Tu-Darmstadt-Informatik-Kurse.git
synced 2025-12-13 09:55:48 +00:00
22 lines
307 B
Promela
22 lines
307 B
Promela
chan request = [0] of { byte };
|
|
chan reply = [0] of { bool };
|
|
|
|
active proctype Server() {
|
|
byte num;
|
|
end:
|
|
do :: request ? num ->
|
|
printf("serving client %d\n", num);
|
|
reply ! true
|
|
od
|
|
}
|
|
|
|
active proctype Client0() {
|
|
request ! 0;
|
|
reply ? _
|
|
}
|
|
|
|
active proctype Client1() {
|
|
request ! 1;
|
|
reply ? _
|
|
}
|