// that we are searching again from `state(C)`. While the
// stack of states is properly adjusted to represent
// `state(C)` all together, the RemoteApp is currently sitting
- // at some *future* state with resepct to `state(C)` since the
- // recursive calls have moved it there.
+ // at some *future* state with respect to `state(C)` since the
+ // recursive calls had moved it there.
restore_program_state_with_current_stack();
// Explore(C, D + {e}, J \ C)
const EventSet K = EventSet({e, pre_event_a_C.value_or(e)}).get_largest_maximal_subset();
// TODO: Check D_K(a, lambda(e)) (only matters in the case of CommTest)
- if (true) {
- const auto* e_prime = U->discover_event(std::move(K), send_action);
- exC.insert(e_prime);
- }
+ const auto e_prime = U->discover_event(std::move(K), send_action);
+ exC.insert(e_prime);
}
}
const auto pre_event_a_C = C.pre_event(mutex_lock->aid_);
// for each event e in C
- // 1. If lambda(e) := pre(a) -> add it, otherwise don't bother if
- // it's not there
+ // 1. If lambda(e) := pre(a) -> add it. Note that if
+ // pre_event_a_C.has_value() == false, this implies `C` is
+ // empty or which we treat as implicitly containing the bottom event
if (pre_event_a_C.has_value()) {
const auto e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), mutex_lock);
exC.insert(e_prime);
+ } else {
+ const auto e_prime = U->discover_event(EventSet(), mutex_lock);
+ exC.insert(e_prime);
}
// for each event e in C
const auto pre_event_a_C = C.pre_event(mutex_unlock->aid_);
// for each event e in C
- // 1. If lambda(e) := pre(a) -> add it, otherwise don't bother if
- // it's not there
+ // 1. If lambda(e) := pre(a) -> add it. Note that if
+ // pre_event_a_C.has_value() == false, this implies `C` is
+ // empty or which we treat as implicitly containing the bottom event
if (pre_event_a_C.has_value()) {
const auto e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), mutex_unlock);
exC.insert(e_prime);
+ } else {
+ const auto e_prime = U->discover_event(EventSet(), mutex_unlock);
+ exC.insert(e_prime);
}
// for each event e in C
const auto pre_event_a_C = C.pre_event(mutex_wait->aid_);
// for each event e in C
- // 1. If lambda(e) := pre(a) -> add it, otherwise don't bother if
- // it's not there. In the case of MutexWait, we also check that the
+ // 1. If lambda(e) := pre(a) -> add it. In the case of MutexWait, we also check that the
// actor which is executing the MutexWait is the owner of the mutex
if (pre_event_a_C.has_value() && mutex_wait->get_owner() == mutex_wait->aid_) {
const auto e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), mutex_wait);
exC.insert(e_prime);
+ } else {
+ const auto e_prime = U->discover_event(EventSet(), mutex_wait);
+ exC.insert(e_prime);
}
// for each event e in C
const auto pre_event_a_C = C.pre_event(mutex_test->aid_);
// for each event e in C
- // 1. If lambda(e) := pre(a) -> add it, otherwise don't bother if
- // it's not there
+ // 1. If lambda(e) := pre(a) -> add it. Note that if
+ // pre_evevnt_a_C.has_value() == false, this implies `C` is
+ // empty or which we treat as implicitly containing the bottom event
if (pre_event_a_C.has_value()) {
const auto e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), mutex_test);
exC.insert(e_prime);
+ } else {
+ const auto e_prime = U->discover_event(EventSet(), mutex_test);
+ exC.insert(e_prime);
}
// for each event e in C
// If the wait is waiting on a paired comm already, we're independent!
// If we happen to make up that pair, then we're dependent...
- if (wait->comm_ != comm_)
+ if ((aid_ != wait->aid_) && wait->comm_ != comm_)
return false;
return true; // DEP with other wait transitions
// If the wait is waiting on a paired comm already, we're independent!
// If we happen to make up that pair, then we're dependent...
- if (wait->comm_ != comm_)
+ if ((aid_ != wait->aid_) && wait->comm_ != comm_)
return false;
return true; // DEP with other wait transitions