X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/48296e83ce3ba1fa3658a3a74d10a536e33b3849..b1233a583739b02023186b2a129805eb6594a4d5:/src/mc/transition/TransitionAny.cpp diff --git a/src/mc/transition/TransitionAny.cpp b/src/mc/transition/TransitionAny.cpp index 9de469b684..f532369d28 100644 --- a/src/mc/transition/TransitionAny.cpp +++ b/src/mc/transition/TransitionAny.cpp @@ -1,16 +1,12 @@ -/* 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. */ #include "src/mc/transition/TransitionAny.hpp" +#include "simgrid/config.h" #include "xbt/asserts.h" -#include -#if SIMGRID_HAVE_MC -#include "src/mc/ModelChecker.hpp" -#include "src/mc/api/RemoteApp.hpp" -#include "src/mc/api/State.hpp" -#endif +#include "xbt/string.hpp" #include @@ -39,6 +35,10 @@ std::string TestAnyTransition::to_string(bool verbose) const } bool TestAnyTransition::depends(const Transition* other) const { + // Actions executed by the same actor are always dependent + if (other->aid_ == aid_) + return true; + return transitions_[times_considered_]->depends(other); } WaitAnyTransition::WaitAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream) @@ -61,6 +61,9 @@ std::string WaitAnyTransition::to_string(bool verbose) const } bool WaitAnyTransition::depends(const Transition* other) const { + // Actions executed by the same actor are always dependent + if (other->aid_ == aid_) + return true; return transitions_[times_considered_]->depends(other); }