}
return std::make_pair(-1, depth_);
}
- void execute_next(aid_t aid, RemoteApp& app) override { return; }
void consider_best() override
{
- for (auto& [_, actor] : actors_to_run_) {
- if (actor.is_todo())
- return;
- if (actor.is_enabled() and not actor.is_done()) {
- actor.mark_todo();
- return;
- }
- }
+ for (auto& [_, actor] : actors_to_run_)
+ if (actor.is_todo())
+ return;
+
+ for (auto& [_, actor] : actors_to_run_)
+ if (actor.is_enabled() and not actor.is_done())
+ actor.mark_todo();
+
+
}
};
}
std::string TestAnyTransition::to_string(bool verbose) const
{
- auto res = xbt::string_printf("TestAny{ ");
- for (auto const* t : transitions_)
+ auto res = xbt::string_printf("TestAny(%s){ ", this->result() ? "TRUE" : "FALSE");
+ for (auto const* t : transitions_) {
res += t->to_string(verbose);
+ res += "; ";
+ }
res += " }";
return res;
}
#include "src/kernel/actor/SimcallObserver.hpp"
#include "src/mc/transition/Transition.hpp"
+#include "src/mc/transition/TransitionComm.hpp"
#include <sstream>
#include <string>
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 {