-/* 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/kernel/actor/SimcallObserver.hpp"
#include "src/mc/transition/Transition.hpp"
+#include "src/mc/transition/TransitionComm.hpp"
#include <sstream>
#include <string>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class TestAnyTransition : public Transition {
std::vector<Transition*> transitions_;
bool depends(const Transition* other) const override;
Transition* get_current_transition() const { return transitions_.at(times_considered_); }
+ bool result() const
+ {
+ for (Transition* transition : transitions_) {
+ CommTestTransition* tested_transition = static_cast<CommTestTransition*>(transition);
+ if (tested_transition->get_sender() != -1 and tested_transition->get_receiver() != -1)
+ return true;
+ }
+ return false;
+ }
};
class WaitAnyTransition : public Transition {
Transition* get_current_transition() const { return transitions_.at(times_considered_); }
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif