Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill redundent sanity checks
[simgrid.git] / src / mc / ModelChecker.hpp
index c4b189435eb7cadfd6ca8b3d79007056e2e11d07..09fbfcbdf6e93a5e4bdce6714f0c3461edadbaa7 100644 (file)
@@ -28,10 +28,9 @@ class ModelChecker {
   std::unique_ptr<RemoteProcess> remote_process_;
   Exploration* exploration_ = nullptr;
 
-  unsigned long visited_states_ = 0;
+  FILE* dot_output_ = nullptr;
 
-  // Expect MessageType::SIMCALL_TO_STRING or MessageType::SIMCALL_DOT_LABEL
-  std::string simcall_to_string(MessageType type, aid_t aid, int times_considered);
+  unsigned long visited_states_ = 0;
 
 public:
   ModelChecker(ModelChecker const&) = delete;
@@ -66,6 +65,18 @@ public:
   unsigned long get_visited_states() const { return visited_states_; }
   void inc_visited_states() { visited_states_++; }
 
+  void dot_output(const char* fmt, ...) XBT_ATTRIB_PRINTF(2, 3);
+  void dot_output_flush()
+  {
+    if (dot_output_ != nullptr)
+      fflush(dot_output_);
+  }
+  void dot_output_close()
+  {
+    if (dot_output_ != nullptr)
+      fclose(dot_output_);
+  }
+
 private:
   void setup_ignore();
   bool handle_message(const char* buffer, ssize_t size);