]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/api.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simplify the serialization protocol to implement TestAny & WaitAny in a moment
[simgrid.git] / src / mc / api.cpp
index ee045bc5f75152f4543d270501fdf76f1c9f6a76..09764e401c35c830b03b1c73e28c4c07849f22e1 100644 (file)
@@ -295,7 +295,7 @@ void Api::mc_check_deadlock() const
     XBT_CINFO(mc_global, "Counter-example execution trace:");
     for (auto const& s : mc_model_checker->getChecker()->get_textual_trace())
       XBT_CINFO(mc_global, "  %s", s.c_str());
-    simgrid::mc::dumpRecordPath();
+    XBT_INFO("Path = %s", mc_model_checker->getChecker()->get_record_trace().to_string().c_str());
     simgrid::mc::session_singleton->log_state();
     throw DeadlockError();
   }
@@ -351,11 +351,10 @@ void Api::mc_exit(int status) const
   mc_model_checker->exit(status);
 }
 
-std::string Api::request_get_dot_output(aid_t aid, int value) const
+std::string Api::request_get_dot_output(const Transition* t) const
 {
-  const char* color = get_color(aid - 1);
-  return "label = \"" + mc_model_checker->simcall_dot_label(aid, value) + "\", color = " + color +
-         ", fontcolor = " + color;
+  const char* color = get_color(t->aid_ - 1);
+  return "label = \"" + t->dot_label() + "\", color = " + color + ", fontcolor = " + color;
 }
 
 #if HAVE_SMPI
@@ -387,7 +386,7 @@ bool Api::snapshot_equal(const Snapshot* s1, const Snapshot* s2) const
   return simgrid::mc::snapshot_equal(s1, s2);
 }
 
-simgrid::mc::Snapshot* Api::take_snapshot(int num_state) const
+simgrid::mc::Snapshot* Api::take_snapshot(long num_state) const
 {
   auto snapshot = new simgrid::mc::Snapshot(num_state);
   return snapshot;
@@ -400,7 +399,10 @@ void Api::s_close() const
 
 void Api::automaton_load(const char* file) const
 {
-  MC_automaton_load(file);
+  if (simgrid::mc::property_automaton == nullptr)
+    simgrid::mc::property_automaton = xbt_automaton_new();
+
+  xbt_automaton_load(simgrid::mc::property_automaton, file);
 }
 
 std::vector<int> Api::automaton_propositional_symbol_evaluate() const