This way it will correctly be set if the App aborts or fails during that execution.
Also, don't use the execution path that is reserved to simcalls with
observers `mc_model_checker->simcall_to_string()` in any case.
Prefer the path that works with old simcalls too `Api::request_to_string()`
session->restore_initial_state();
}
-void Api::execute(Transition const& transition) const
+void Api::execute(Transition& transition, smx_simcall_t simcall) const
{
- session->execute(transition);
- auto textual = mc_model_checker->simcall_to_string(transition.pid_, transition.times_considered_);
+ /* FIXME: once all simcalls have observers, kill the simcall parameter and use mc_model_checker->simcall_to_string() */
+ auto textual =
+ simgrid::mc::Api::get().request_to_string(simcall, transition.times_considered_, RequestType::executed);
strcpy((char*)transition.textual, textual.c_str());
+
+ session->execute(transition);
}
#if SIMGRID_HAVE_MC
// SESSION APIs
void session_initialize() const;
void s_close() const;
- void execute(Transition const& transition) const;
+ void execute(Transition& transition, smx_simcall_t simcall) const;
// AUTOMATION APIs
#if SIMGRID_HAVE_MC
XBT_DEBUG("Replay (depth = %d) : %s (%p)", depth,
api::get().request_to_string(req, req_num, simgrid::mc::RequestType::simix).c_str(), state.get());
- api::get().execute(state->transition_);
+ api::get().execute(state->transition_, req);
}
/* Update statistics */
api::get().mc_inc_executed_trans();
/* Actually answer the request: let execute the selected request (MCed does one step) */
- api::get().execute(state->transition_);
+ api::get().execute(state->transition_, &state->executed_req_);
/* Create the new expanded state (copy the state of MCed into our MCer data) */
++expanded_states_count_;
for (std::unique_ptr<State> const& state : stack_) {
if (state == stack_.back())
break;
- api::get().execute(state->transition_);
+ api::get().execute(state->transition_, &state->executed_req_);
/* Update statistics */
api::get().mc_inc_visited_states();
api::get().mc_inc_executed_trans();