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

Public GIT Repository
MC: disable personality() as it fails on CI and is not mandatory
[simgrid.git] / src / mc / explo / Exploration.hpp
index c1abd5bfc7e8186fe70ea84e4f7f3d46f9bb2ed4..aa6d420245758e45e3bc06b7ff61928cbabcb0ea 100644 (file)
@@ -29,13 +29,15 @@ namespace simgrid::mc {
 // abstract
 class Exploration : public xbt::Extendable<Exploration> {
   std::unique_ptr<RemoteApp> remote_app_;
+  static Exploration* instance_;
 
   FILE* dot_output_ = nullptr;
 
 public:
-  explicit Exploration(const std::vector<char*>& args);
+  explicit Exploration(const std::vector<char*>& args, bool need_memory_introspection);
   virtual ~Exploration();
 
+  static Exploration* get_instance() { return instance_; }
   // No copy:
   Exploration(Exploration const&) = delete;
   Exploration& operator=(Exploration const&) = delete;
@@ -43,6 +45,14 @@ public:
   /** Main function of this algorithm */
   virtual void run() = 0;
 
+  /** Produce an error message indicating that the application crashed (status was produced by waitpid) */
+  XBT_ATTRIB_NORETURN void report_crash(int status);
+  /** Produce an error message indicating that a property was violated */
+  XBT_ATTRIB_NORETURN void report_assertion_failure();
+
+  /** Kill the application and the model-checker (which exits with `status`)*/
+  XBT_ATTRIB_NORETURN void system_exit(int status) const;
+
   /* These methods are callbacks called by the model-checking engine
    * to get and display information about the current state of the
    * model-checking algorithm: */