Add monotonically-increasing IDs for UnfoldingEvent
UDPOR is inherently non-deterministic in the
sense that multiple routes may exist that UDPOR
can follow from any given configuration. Correctness
and optimality are not affected by these results;
however, we seek for SimGrid to have a deterministic
execution on all platforms while running UDPOR.
Prior to this commit, arbitrarily the first event in
an unordered set was selected. But since the "first"
event in an unordered set is implementation-defined,
we seek to avoid leaving it up to the standard library's
ordering and define instead an ordering ourselves.
This motivates assigning a monotonically-increasing
ID to each newly-created event. Note that since
events may be created and then ultimately
destroyed after UDPOR realizes it has created a duplicate
event (which can happen when computing the extension
set of two configurations whose extension sets overlap),
events that exist in the unfolding need not contain
a contiguous range of IDs.
To provide a deterministic order, we must first process
the transitions that are enabled from any given state
in a determinstic order so that events are discovered
in a determinstic order. Furthermore, we must always
pick events from the intersection of en(C) and A in
a determinstic order. Here, we always pick events
with the smallest assigned ID first.