@
receivers: R
The p-chain specification created a separate broadcast event for
each process. Using a for-loop, we defined an array of
Broadcast p-chains:
? for (i=0; i <=
P-1; i++) do Broadcast[i] = BroadcastChain ONALL {i} od
where P is a defined constant giving the number of processes in
the system. Each of these p-chains will match a process performing a
single write that is read by all other processes.
To ascertain that the correct number of broadcasts were
performed, we attempted to match a set of P broadcasts with
? BCseries = match (Broadcast[])P
The missing index in Broadcast[] indicates that any
element can be used, making it a shorthand for
(Broadcast[0] + Broadcast[1] + ... + Broadcast[255])where + means alternation in our expressions. The match was successful, resulting in
The Broadcast events have already been removed from the trace because they were
successfully matched above. We could check for the precedes
relation in two ways. We could restore the Broadcasts to the
trace and rematch them with
? restore (BCseries)
? OrderedBCseries = match <
Broadcast[] * >
where the angular brackets indicate that the precedes must hold
between matched events. Alternatively, we could use a predicate over abstract
events
? eprecedes (BCseries)
In either case the relation precedes is checked in the matched
abstract event using its search order; the
result is
Precedes failed.
Broadcast[38] overlaps
Broadcast[243].
It tells us that the first 135 broadcasts occurred correctly but the
135th overlapped with the 136th meaning that precedes
did not hold between them. This must mean that some process --
either 38 or 243 -- read the broadcast
values out of order. This observation led us to the bug: a missing
synchronization between broadcasts.