X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/90bddc474870ce50b5398b88c7de59336d00a85f..7e625e5e848a284b522d69ec28cb111f1f88515b:/src/mc/transition/TransitionAny.cpp diff --git a/src/mc/transition/TransitionAny.cpp b/src/mc/transition/TransitionAny.cpp index 48e061730c..580fb44389 100644 --- a/src/mc/transition/TransitionAny.cpp +++ b/src/mc/transition/TransitionAny.cpp @@ -43,6 +43,16 @@ bool TestAnyTransition::depends(const Transition* other) const return transitions_[times_considered_]->depends(other); } +bool TestAnyTransition::reversible_race(const Transition* other) const +{ + switch (type_) { + case Type::TESTANY: + return true; // TestAny is always enabled + default: + xbt_die("Unexpected transition type %s", to_c_str(type_)); + } +} + WaitAnyTransition::WaitAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream) : Transition(Type::WAITANY, issuer, times_considered) { @@ -69,5 +79,15 @@ bool WaitAnyTransition::depends(const Transition* other) const return true; return transitions_[times_considered_]->depends(other); } +bool WaitAnyTransition::reversible_race(const Transition* other) const +{ + switch (type_) { + case Type::WAITANY: + // TODO: We need to check if any of the transitions waited on occurred before `e1` + return true; // Let's overapproximate to not miss branches + default: + xbt_die("Unexpected transition type %s", to_c_str(type_)); + } +} } // namespace simgrid::mc