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

Public GIT Repository
Cosmetics
[simgrid.git] / src / mc / explo / Exploration.hpp
index 70187443bacee863257e49a31cff9e162a2ff5f3..ee3c452f1c725eddc6d10f3d66f68c51096e047f 100644 (file)
@@ -30,18 +30,27 @@ namespace simgrid::mc {
 class Exploration : public xbt::Extendable<Exploration> {
   std::unique_ptr<RemoteApp> remote_app_;
 
+  FILE* dot_output_ = nullptr;
+
 public:
   explicit Exploration(const std::vector<char*>& args);
+  virtual ~Exploration();
 
   // No copy:
   Exploration(Exploration const&) = delete;
   Exploration& operator=(Exploration const&) = delete;
 
-  virtual ~Exploration() = default;
-
   /** Main function of this algorithm */
   virtual void run() = 0;
 
+  /** Produce an error message indicating that the application crashed (status was produced by waitpid) */
+  void report_crash(int status);
+  /** Produce an error message indicating that a property was violated */
+  void report_assertion_failure();
+
+  /** Kill the application and the model-checker (which exits with `status`)*/
+  XBT_ATTRIB_NORETURN void system_exit(int status);
+
   /* These methods are callbacks called by the model-checking engine
    * to get and display information about the current state of the
    * model-checking algorithm: */
@@ -58,6 +67,9 @@ public:
   virtual void log_state();
 
   RemoteApp& get_remote_app() { return *remote_app_.get(); }
+
+  /** Print something to the dot output file*/
+  void dot_output(const char* fmt, ...) XBT_ATTRIB_PRINTF(2, 3);
 };
 
 // External constructors so that the types (and the types of their content) remain hidden