Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove pointless #includes
[simgrid.git] / src / mc / mc_global.cpp
index 6f985f1..e92fcaf 100644 (file)
@@ -21,9 +21,6 @@
 #include <sys/time.h>
 #endif
 
-#include <xbt/fifo.h>
-#include <xbt/automaton.h>
-
 #include "src/simix/smx_process_private.h"
 
 #if HAVE_MC
@@ -77,29 +74,13 @@ xbt_automaton_t property_automaton = nullptr;
 
 /* Dot output */
 FILE *dot_output = nullptr;
-const char *colors[13];
 
 
 /*******************************  Initialisation of MC *******************************/
 /*********************************************************************************/
 
 void MC_init_dot_output()
-{                               /* FIXME : more colors */
-
-  colors[0] = "blue";
-  colors[1] = "red";
-  colors[2] = "green3";
-  colors[3] = "goldenrod";
-  colors[4] = "brown";
-  colors[5] = "purple";
-  colors[6] = "magenta";
-  colors[7] = "turquoise4";
-  colors[8] = "gray25";
-  colors[9] = "forestgreen";
-  colors[10] = "hotpink";
-  colors[11] = "lightblue";
-  colors[12] = "tan";
-
+{
   dot_output = fopen(_sg_mc_dot_output_file, "w");
 
   if (dot_output == nullptr) {
@@ -149,41 +130,6 @@ void MC_exit(void)
   //xbt_abort();
 }
 
-#if HAVE_MC
-int MC_deadlock_check()
-{
-  if (mc_mode == MC_MODE_SERVER) {
-    int res;
-    if ((res = mc_model_checker->process().getChannel().send(MC_MESSAGE_DEADLOCK_CHECK)))
-      xbt_die("Could not check deadlock state");
-    s_mc_int_message_t message;
-    ssize_t s = mc_model_checker->process().getChannel().receive(message);
-    if (s == -1)
-      xbt_die("Could not receive message");
-    if (s != sizeof(message) || message.type != MC_MESSAGE_DEADLOCK_CHECK_REPLY)
-      xbt_die("%s received unexpected message %s (%i, size=%i) "
-        "expected MC_MESSAGE_DEADLOCK_CHECK_REPLY (%i, size=%i)",
-        MC_mode_name(mc_mode),
-        MC_message_type_name(message.type), (int) message.type, (int) s,
-        (int) MC_MESSAGE_DEADLOCK_CHECK_REPLY, (int) sizeof(message)
-        );
-    return message.value;
-  }
-
-  bool deadlock = false;
-  smx_process_t process;
-  if (xbt_swag_size(simix_global->process_list)) {
-    deadlock = true;
-    xbt_swag_foreach(process, simix_global->process_list)
-      if (simgrid::mc::process_is_enabled(process)) {
-        deadlock = false;
-        break;
-      }
-  }
-  return deadlock;
-}
-#endif
-
 /**
  * \brief Re-executes from the state at position start all the transitions indicated by
  *        a given model-checker stack.