X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9f56ed220cda230775eba337d021346c01ae37b8..5f1dc33c9f76ee99973ba93f034f031451398ebe:/src/mc/ModelChecker.cpp diff --git a/src/mc/ModelChecker.cpp b/src/mc/ModelChecker.cpp index 855c0a7128..a82fa8f8bc 100644 --- a/src/mc/ModelChecker.cpp +++ b/src/mc/ModelChecker.cpp @@ -175,7 +175,7 @@ static void MC_report_crash(int status) XBT_INFO("No core dump was generated by the system."); XBT_INFO("Counter-example execution trace:"); simgrid::mc::dumpRecordPath(); - for (auto& s : mc_model_checker->getChecker()->getTextualTrace()) + for (auto const& s : mc_model_checker->getChecker()->getTextualTrace()) XBT_INFO("%s", s.c_str()); simgrid::mc::session->logState(); XBT_INFO("Stack trace:"); @@ -189,7 +189,7 @@ static void MC_report_assertion_error() XBT_INFO("**************************"); XBT_INFO("Counter-example execution trace:"); simgrid::mc::dumpRecordPath(); - for (auto& s : mc_model_checker->getChecker()->getTextualTrace()) + for (auto const& s : mc_model_checker->getChecker()->getTextualTrace()) XBT_INFO("%s", s.c_str()); simgrid::mc::session->logState(); } @@ -251,26 +251,23 @@ bool ModelChecker::handle_message(char* buffer, ssize_t size) case MC_MESSAGE_REGISTER_SYMBOL: { - s_mc_register_symbol_message_t message; - if (size != sizeof(message)) - xbt_die("Broken message"); - memcpy(&message, buffer, sizeof(message)); - if (message.callback) - xbt_die("Support for client-side function proposition is not implemented."); - XBT_DEBUG("Received symbol: %s", message.name); - - if (simgrid::mc::property_automaton == nullptr) - simgrid::mc::property_automaton = xbt_automaton_new(); - - simgrid::mc::RemoteClient* process = &this->process(); - simgrid::mc::RemotePtr address - = simgrid::mc::remote((int*) message.data); - simgrid::xbt::add_proposition(simgrid::mc::property_automaton, - message.name, - [process, address]() { return process->read(address); } - ); - - break; + s_mc_message_register_symbol_t message; + if (size != sizeof(message)) + xbt_die("Broken message"); + memcpy(&message, buffer, sizeof(message)); + if (message.callback) + xbt_die("Support for client-side function proposition is not implemented."); + XBT_DEBUG("Received symbol: %s", message.name); + + if (simgrid::mc::property_automaton == nullptr) + simgrid::mc::property_automaton = xbt_automaton_new(); + + simgrid::mc::RemoteClient* process = &this->process(); + simgrid::mc::RemotePtr address = simgrid::mc::remote((int*)message.data); + simgrid::xbt::add_proposition(simgrid::mc::property_automaton, message.name, + [process, address]() { return process->read(address); }); + + break; } case MC_MESSAGE_WAITING: