]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/api/State.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Whitespace cleanup (codefactor.io).
[simgrid.git] / src / mc / api / State.cpp
index c2478cb9dd428990537fe0ecf1eb58ecaaacb03f..58f7d28d8cdb3bd8dcb0622f96232bcbc154bc3e 100644 (file)
@@ -29,16 +29,17 @@ State::State(RemoteApp& remote_app) : num_(++expended_states_)
 
   remote_app.get_actors_status(strategy_->actors_to_run_);
 
+#if SIMGRID_HAVE_STATEFUL_MC
   /* Stateful model checking */
   if ((_sg_mc_checkpoint > 0 && (num_ % _sg_mc_checkpoint == 0)) || _sg_mc_termination)
     system_state_ = std::make_shared<simgrid::mc::Snapshot>(num_, remote_app.get_page_store(),
                                                             *remote_app.get_remote_process_memory());
+#endif
 }
 
 State::State(RemoteApp& remote_app, std::shared_ptr<State> parent_state)
     : num_(++expended_states_), parent_state_(parent_state)
 {
-
   if (_sg_mc_strategy == "none")
     strategy_ = std::make_shared<BasicStrategy>();
   if (_sg_mc_strategy == "nb_wait")
@@ -50,10 +51,11 @@ State::State(RemoteApp& remote_app, std::shared_ptr<State> parent_state)
 
   remote_app.get_actors_status(strategy_->actors_to_run_);
 
-  /* Stateful model checking */
+#if SIMGRID_HAVE_STATEFUL_MC /* Stateful model checking */
   if ((_sg_mc_checkpoint > 0 && (num_ % _sg_mc_checkpoint == 0)) || _sg_mc_termination)
     system_state_ = std::make_shared<simgrid::mc::Snapshot>(num_, remote_app.get_page_store(),
                                                             *remote_app.get_remote_process_memory());
+#endif
 
   /* If we want sleep set reduction, copy the sleep set and eventually removes things from it */
   if (_sg_mc_sleep_set) {
@@ -118,7 +120,7 @@ aid_t State::next_transition() const
   return -1;
 }
 
-std::pair<aid_t, double> State::next_transition_guided() const
+std::pair<aid_t, int> State::next_transition_guided() const
 {
   return strategy_->next_transition();
 }