X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/90b0fa923c841996f89a17c252a443a65493fbfc..3f9b311ec56db95ec539001a860ae3c838c48312:/src/mc/transition/TransitionRandom.cpp diff --git a/src/mc/transition/TransitionRandom.cpp b/src/mc/transition/TransitionRandom.cpp index fb87d0d1e5..7470be286d 100644 --- a/src/mc/transition/TransitionRandom.cpp +++ b/src/mc/transition/TransitionRandom.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -11,8 +11,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_rand, mc_transition, "Logging specific to MC Random transitions"); -namespace simgrid { -namespace mc { +namespace simgrid::mc { std::string RandomTransition::to_string(bool verbose) const { return xbt::string_printf("Random([%d;%d] ~> %d)", min_, max_, times_considered_); @@ -24,10 +23,11 @@ RandomTransition::RandomTransition(aid_t issuer, int times_considered, std::stri xbt_assert(stream >> min_ >> max_); } -std::string RandomTransition::dot_label() const +bool RandomTransition::reversible_race(const Transition* other) const { - return Transition::dot_label() + to_c_str(type_); + xbt_assert(type_ == Type::RANDOM, "Unexpected transition type %s", to_c_str(type_)); + + return true; // Random is always enabled } -} // namespace mc -} // namespace simgrid +} // namespace simgrid::mc