Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add methods between EventSet and Configuration
[simgrid.git] / src / mc / explo / DFSExplorer.hpp
index 1434add869a09aecbd60f01d6011e602259c822b..0a0d51e53da4f0689b806ff9ee3d0975e48cea4a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -8,7 +8,6 @@
 
 #include "src/mc/VisitedState.hpp"
 #include "src/mc/explo/Exploration.hpp"
-#include "src/mc/mc_safety.hpp"
 
 #include <list>
 #include <memory>
@@ -18,7 +17,9 @@
 namespace simgrid::mc {
 
 class XBT_PRIVATE DFSExplorer : public Exploration {
-  ReductionMode reductionMode_ = ReductionMode::unset;
+  XBT_DECLARE_ENUM_CLASS(ReductionMode, none, dpor);
+
+  ReductionMode reduction_mode_;
   long backtrack_count_        = 0;
 
   static xbt::signal<void(RemoteApp&)> on_exploration_start_signal;
@@ -34,7 +35,7 @@ class XBT_PRIVATE DFSExplorer : public Exploration {
   static xbt::signal<void(RemoteApp&)> on_log_state_signal;
 
 public:
-  explicit DFSExplorer(const std::vector<char*>& args);
+  explicit DFSExplorer(const std::vector<char*>& args, bool with_dpor);
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
@@ -82,7 +83,6 @@ public:
 private:
   void check_non_termination(const State* current_state);
   void backtrack();
-  void restore_state();
 
   /** Stack representing the position in the exploration graph */
   std::list<std::unique_ptr<State>> stack_;