Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Rename replay() function to restoreState()
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 14 Apr 2016 12:23:01 +0000 (14:23 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 14 Apr 2016 12:23:21 +0000 (14:23 +0200)
because sometimes we restore the state without replaying anything.

src/mc/CommunicationDeterminismChecker.cpp
src/mc/SafetyChecker.cpp
src/mc/mc_global.cpp
src/mc/mc_state.h

index 2a32b59..3eb634d 100644 (file)
@@ -517,7 +517,7 @@ int CommunicationDeterminismChecker::main(void)
             state->num, stack_.size() + 1);
           stack_.push_back(std::move(state));
 
-          simgrid::mc::replay(stack_);
+          simgrid::mc::restoreState(stack_);
 
           XBT_DEBUG("Back-tracking to state %d at depth %zi done",
             stack_.back()->num, stack_.size());
index 4064b6a..a2ce9d4 100644 (file)
@@ -268,7 +268,7 @@ int SafetyChecker::backtrack()
       XBT_DEBUG("Back-tracking to state %d at depth %zi",
         state->num, stack_.size() + 1);
       stack_.push_back(std::move(state));
-      simgrid::mc::replay(stack_);
+      simgrid::mc::restoreState(stack_);
       XBT_DEBUG("Back-tracking to state %d at depth %zi done",
         stack_.back()->num, stack_.size());
       break;
index 059a487..52dd48c 100644 (file)
@@ -119,7 +119,7 @@ namespace mc {
  * \param stack The stack with the transitions to execute.
  * \param start Start index to begin the re-execution.
  */
-void replay(std::list<std::unique_ptr<simgrid::mc::State>> const& stack)
+void restoreState(std::list<std::unique_ptr<simgrid::mc::State>> const& stack)
 {
   XBT_DEBUG("**** Begin Replay ****");
 
index 2feff61..d0a4159 100644 (file)
@@ -144,7 +144,7 @@ struct XBT_PRIVATE State {
   Transition getTransition() const;
 };
 
-XBT_PRIVATE void replay(std::list<std::unique_ptr<simgrid::mc::State>> const& stack);
+XBT_PRIVATE void restoreState(std::list<std::unique_ptr<simgrid::mc::State>> const& stack);
 
 }
 }