1 /* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_MC_ODPOR_REVERSIBLE_RACE_CALCULATOR_HPP
7 #define SIMGRID_MC_ODPOR_REVERSIBLE_RACE_CALCULATOR_HPP
9 #include "src/mc/explo/udpor/EventSet.hpp"
10 #include "src/mc/explo/udpor/udpor_forward.hpp"
11 #include "src/mc/transition/Transition.hpp"
12 #include "src/mc/transition/TransitionActorJoin.hpp"
13 #include "src/mc/transition/TransitionAny.hpp"
14 #include "src/mc/transition/TransitionComm.hpp"
15 #include "src/mc/transition/TransitionObjectAccess.hpp"
16 #include "src/mc/transition/TransitionRandom.hpp"
17 #include "src/mc/transition/TransitionSynchro.hpp"
21 namespace simgrid::mc::odpor {
24 * @brief Computes whether a race between two events
25 * in a given execution is a reversible race.
27 * @note: All of the methods assume that there is
28 * indeed a race between the two events in the
29 * execution; indeed, the question the method answers
30 * is only sensible in the context of a race
32 struct ReversibleRaceCalculator final {
33 static EventSet is_race_reversible(const Execution&, Execution::Handle e1, std::shared_ptr<Transition>);
34 static EventSet is_race_reversible(const Execution&, Execution::Handle e1, std::shared_ptr<Transition>);
35 static EventSet is_race_reversible(const Execution&, Execution::Handle e1, std::shared_ptr<Transition>);
36 static EventSet is_race_reversible(const Execution&, Execution::Handle e1, std::shared_ptr<Transition>);
39 static EventSet is_race_reversible(const Execution&, Execution::Handle e1, Execution::Handle e2);
42 } // namespace simgrid::mc::odpor