#endif
}
-static const std::pair<const char*, const char*> ignored_local_variables[] = {
- std::pair<const char*, const char*>{ "e", "*" },
- std::pair<const char*, const char*>{ "_log_ev", "*" },
+static constexpr auto ignored_local_variables = {
+ std::make_pair("e", "*"),
+ std::make_pair("_log_ev", "*"),
- /* Ignore local variable about time used for tracing */
- std::pair<const char*, const char*>{ "start_time", "*" },
+ /* Ignore local variable about time used for tracing */
+ std::make_pair("start_time", "*"),
};
void ModelChecker::setup_ignore()
{
- RemoteSimulation& process = this->get_remote_simulation();
- for (std::pair<const char*, const char*> const& var :
- ignored_local_variables)
+ const RemoteSimulation& process = this->get_remote_simulation();
+ for (auto const& var : ignored_local_variables)
process.ignore_local_variable(var.first, var.second);
/* Static variable used for tracing */
void ModelChecker::shutdown()
{
- XBT_DEBUG("Shuting down model-checker");
+ XBT_DEBUG("Shutting down model-checker");
RemoteSimulation* process = &this->get_remote_simulation();
if (process->running()) {
case MC_MESSAGE_IGNORE_HEAP:
{
s_mc_message_ignore_heap_t message;
- xbt_assert(size == sizeof(message), "Broken messsage");
+ xbt_assert(size == sizeof(message), "Broken message");
memcpy(&message, buffer, sizeof(message));
IgnoredHeapRegion region;
case MC_MESSAGE_UNIGNORE_HEAP:
{
s_mc_message_ignore_memory_t message;
- xbt_assert(size == sizeof(message), "Broken messsage");
+ xbt_assert(size == sizeof(message), "Broken message");
memcpy(&message, buffer, sizeof(message));
get_remote_simulation().unignore_heap((void*)(std::uintptr_t)message.addr, message.size);
break;
case MC_MESSAGE_IGNORE_MEMORY:
{
s_mc_message_ignore_memory_t message;
- xbt_assert(size == sizeof(message), "Broken messsage");
+ xbt_assert(size == sizeof(message), "Broken message");
memcpy(&message, buffer, sizeof(message));
this->get_remote_simulation().ignore_region(message.addr, message.size);
break;
case MC_MESSAGE_STACK_REGION:
{
s_mc_message_stack_region_t message;
- xbt_assert(size == sizeof(message), "Broken messsage");
+ xbt_assert(size == sizeof(message), "Broken message");
memcpy(&message, buffer, sizeof(message));
this->get_remote_simulation().stack_areas().push_back(message.stack_region);
}
if (property_automaton == nullptr)
property_automaton = xbt_automaton_new();
- RemoteSimulation* process = &this->get_remote_simulation();
+ const RemoteSimulation* process = &this->get_remote_simulation();
RemotePtr<int> address = remote((int*)message.data);
xbt::add_proposition(property_automaton, message.name, [process, address]() { return process->read(address); });