Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further tidy the includes in MC
[simgrid.git] / src / mc / mc_client_api.cpp
index 0aeee5b..bbce30f 100644 (file)
@@ -4,16 +4,13 @@
 /* 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 "xbt/log.h"
-#include "xbt/sysdep.h"
-#include <simgrid/modelchecker.h>
-
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/mc_ignore.hpp"
 #include "src/mc/mc_private.hpp"
 #include "src/mc/mc_record.hpp"
+#include "src/mc/mc_replay.hpp"
 #include "src/mc/remote/Client.hpp"
-#include "src/mc/remote/mc_protocol.h"
+#include "xbt/asserts.h"
 
 /** @file mc_client_api.cpp
  *
@@ -29,8 +26,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client_api, mc,
 void MC_assert(int prop)
 {
   xbt_assert(mc_model_checker == nullptr);
-  if (MC_is_active() && not prop)
-    simgrid::mc::Client::get()->reportAssertionFailure();
+  if (not prop) {
+    if (MC_is_active())
+      simgrid::mc::Client::get()->reportAssertionFailure();
+    if (MC_record_replay_is_active())
+      xbt_die("MC assertion failed");
+  }
 }
 
 void MC_cut()