Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do the initialization in the constructor
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 7 Jan 2017 21:25:57 +0000 (22:25 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 7 Jan 2017 21:25:57 +0000 (22:25 +0100)
src/mc/SafetyChecker.cpp
src/mc/SafetyChecker.hpp

index 638f91c..78e3f61 100644 (file)
@@ -97,8 +97,6 @@ void SafetyChecker::logState() // override
 
 int SafetyChecker::run()
 {
-  this->init();
-
   while (!stack_.empty()) {
 
     /* Get current state */
@@ -304,10 +302,10 @@ void SafetyChecker::restoreState()
   }
 }
 
-void SafetyChecker::init()
+SafetyChecker::SafetyChecker(Session& session) : Checker(session)
 {
   reductionMode_ = simgrid::mc::reduction_mode;
-  if_sg_mc_termination)
+  if (_sg_mc_termination)
     reductionMode_ = simgrid::mc::ReductionMode::none;
   else if (reductionMode_ == simgrid::mc::ReductionMode::unset)
     reductionMode_ = simgrid::mc::ReductionMode::dpor;
@@ -337,10 +335,6 @@ void SafetyChecker::init()
   stack_.push_back(std::move(initial_state));
 }
 
-SafetyChecker::SafetyChecker(Session& session) : Checker(session)
-{
-}
-
 SafetyChecker::~SafetyChecker()
 {
 }
index b2dd269..11dfcd0 100644 (file)
@@ -29,8 +29,6 @@ public:
   std::vector<std::string> getTextualTrace() override;
   void logState() override;
 private:
-  // Temp
-  void init();
   bool checkNonTermination(simgrid::mc::State* current_state);
   int backtrack();
   void restoreState();