It was useful to have it as an option when debugging.
- **model-check/replay:** :ref:`cfg=model-check/replay`
- **model-check/send-determinism:** :ref:`cfg=model-check/send-determinism`
- **model-check/setenv:** :ref:`cfg=model-check/setenv`
-- **model-check/sleep-set:** :ref:`cfg=model-check/sleep-set`
- **model-check/termination:** :ref:`cfg=model-check/termination`
- **model-check/timeout:** :ref:`cfg=model-check/timeout`
- **model-check/visited:** :ref:`cfg=model-check/visited`
- **uniform**: this is a boring random strategy where choices are based on a uniform sampling of possible choices.
Surprisingly, it gives really really good results.
-
-.. _cfg=model-check/sleep-set:
-
-Sleep sets
-..........
-
-The performance of the DPOR algorithm is greatly improved by using sleep sets, but if you want, you can still disable it with
-this option.
-
.. _cfg=model-check/visited:
Size of Cycle Detection Set (state equality reduction)
*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) {
- /* For each actor in the previous sleep set, keep it if it is not dependent with current transition.
- * And if we kept it and the actor is enabled in this state, mark the actor as already done, so that
- * it is not explored*/
- for (const auto& [aid, transition] : parent_state_->get_sleep_set()) {
- if (not incoming_transition_->depends(transition.get())) {
- sleep_set_.try_emplace(aid, transition);
- if (strategy_->actors_to_run_.count(aid) != 0) {
- XBT_DEBUG("Actor %ld will not be explored, for it is in the sleep set", aid);
- strategy_->actors_to_run_.at(aid).mark_done();
- }
- } else
- XBT_DEBUG("Transition >>%s<< removed from the sleep set because it was dependent with incoming >>%s<<",
- transition->to_string().c_str(), incoming_transition_->to_string().c_str());
- }
+ /* Copy the sleep set and eventually removes things from it: */
+ /* For each actor in the previous sleep set, keep it if it is not dependent with current transition.
+ * And if we kept it and the actor is enabled in this state, mark the actor as already done, so that
+ * it is not explored*/
+ for (const auto& [aid, transition] : parent_state_->get_sleep_set()) {
+ if (not incoming_transition_->depends(transition.get())) {
+ sleep_set_.try_emplace(aid, transition);
+ if (strategy_->actors_to_run_.count(aid) != 0) {
+ XBT_DEBUG("Actor %ld will not be explored, for it is in the sleep set", aid);
+ strategy_->actors_to_run_.at(aid).mark_done();
+ }
+ } else
+ XBT_DEBUG("Transition >>%s<< removed from the sleep set because it was dependent with incoming >>%s<<",
+ transition->to_string().c_str(), incoming_transition_->to_string().c_str());
}
}
continue;
}
- if (_sg_mc_sleep_set && XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_verbose)) {
+ if (XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_verbose)) {
XBT_VERB("Sleep set actually containing:");
for (const auto& [aid, transition] : state->get_sleep_set())
XBT_VERB(" <%ld,%s>", aid, transition->to_string().c_str());
}
if (stack_.back()->count_todo_multiples() > 1)
opened_states_.emplace_back(stack_.back());
-
- if (mode == ReductionMode::odpor && !_sg_mc_sleep_set) {
- // ODPOR requires the use of sleep sets; SDPOR
- // "likes" using sleep sets but it is not strictly
- // required
- XBT_INFO("Forcing the use of sleep sets for use with ODPOR");
- _sg_mc_sleep_set = true;
- }
}
Exploration* create_dfs_exploration(const std::vector<char*>& args, ReductionMode mode)
" 'none', 'dpor', 'sdpor', 'odpor', or 'udpor'");
}};
-simgrid::config::Flag<bool> _sg_mc_sleep_set{
- "model-check/sleep-set", "Whether to enable the use of sleep-set in the reduction algorithm", true,
- [](bool) { _mc_cfg_cb_check("value to enable/disable the use of sleep-set in the reduction algorithm"); }};
-
simgrid::config::Flag<std::string> _sg_mc_strategy{
"model-check/strategy",
"Specify the the kind of heuristic to use for guided model-checking",
extern "C" XBT_PUBLIC int _sg_mc_max_visited_states;
extern XBT_PRIVATE simgrid::config::Flag<std::string> _sg_mc_dot_output_file;
extern XBT_PRIVATE simgrid::config::Flag<bool> _sg_mc_termination;
-extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_sleep_set;
extern XBT_PUBLIC simgrid::config::Flag<std::string> _sg_mc_strategy;
#endif