X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a41a7f329f4931c404907ccf78a390b274780275..3f9b311ec56db95ec539001a860ae3c838c48312:/src/mc/transition/TransitionAny.cpp diff --git a/src/mc/transition/TransitionAny.cpp b/src/mc/transition/TransitionAny.cpp index 3ea33cca38..b3c7b63cb3 100644 --- a/src/mc/transition/TransitionAny.cpp +++ b/src/mc/transition/TransitionAny.cpp @@ -43,6 +43,13 @@ bool TestAnyTransition::depends(const Transition* other) const return transitions_[times_considered_]->depends(other); } +bool TestAnyTransition::reversible_race(const Transition* other) const +{ + xbt_assert(type_ == Type::TESTANY, "Unexpected transition type %s", to_c_str(type_)); + + return true; // TestAny is always enabled +} + WaitAnyTransition::WaitAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream) : Transition(Type::WAITANY, issuer, times_considered) { @@ -59,7 +66,7 @@ std::string WaitAnyTransition::to_string(bool verbose) const auto res = xbt::string_printf("WaitAny{ "); for (auto const* t : transitions_) res += t->to_string(verbose); - res += " }"; + res += " } (times considered = " + std::to_string(times_considered_) + ")"; return res; } bool WaitAnyTransition::depends(const Transition* other) const @@ -69,5 +76,12 @@ bool WaitAnyTransition::depends(const Transition* other) const return true; return transitions_[times_considered_]->depends(other); } +bool WaitAnyTransition::reversible_race(const Transition* other) const +{ + xbt_assert(type_ == Type::WAITANY, "Unexpected transition type %s", to_c_str(type_)); + + // TODO: We need to check if any of the transitions waited on occurred before `e1` + return true; // Let's overapproximate to not miss branches +} } // namespace simgrid::mc