/* A constructor accepting a map of valid values -> their description,
* and producing an informative error message when an invalid value is passed, or when help is passed as a value.
*/
+ Flag(const char* name, const char* desc, xbt::type_identity_t<T> value,
+ const std::map<std::string, std::string, std::less<>>& valid_values)
+ : value_(value), name_(name)
+ {
+ simgrid::config::bind_flag(value_, name, desc, valid_values, [](std::string) {});
+ }
+
+ /* As earlier, a constructor accepting a map of valid values -> their description,
+ * and producing an informative error message when an invalid value is passed, or when help is passed as a value.
+ * But also take a callback that is invoked before the verification of parameter name validity.
+ */
template <class F>
Flag(const char* name, const char* desc, xbt::type_identity_t<T> value,
const std::map<std::string, std::string, std::less<>>& valid_values, F callback)
[](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", "none",
- [](std::string_view value) {
- if (value != "none" && value != "nb_wait")
- xbt_die("configuration option 'model-check/guided-mc' can only take 'none' or 'nb_wait' as a value");
- }};
+ "model-check/strategy",
+ "Specify the the kind of heuristic to use for guided model-checking",
+ "none",
+ {{"none", "No specific strategy: simply pick the first available transistion."},
+ {"nb_wait", "Take any enabled wait transition, to reduce the distance between an async and its wait."}}};
#if SIMGRID_HAVE_STATEFUL_MC
simgrid::config::Flag<int> _sg_mc_checkpoint{