1 /* Copyright (c) 2015-2022. 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 #include "src/mc/api/Transition.hpp"
7 #include "xbt/asserts.h"
8 #include <simgrid/config.h>
10 #include "src/mc/ModelChecker.hpp"
15 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_transition, mc, "Logging specific to MC transitions");
19 unsigned long Transition::executed_transitions_ = 0;
20 unsigned long Transition::replayed_transitions_ = 0;
22 Transition::~Transition() {
23 } // Make sure that we have a vtable for Transition by putting this virtual function out of the header
25 std::string Transition::to_string(bool verbose)
29 const char* Transition::to_cstring(bool verbose)
32 return textual_.c_str();
34 void Transition::init(aid_t aid, int times_considered)
37 times_considered_ = times_considered;
39 void Transition::replay() const
41 replayed_transitions_++;
44 mc_model_checker->handle_simcall(*this, false);
45 mc_model_checker->wait_for_requests();
50 } // namespace simgrid