Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ParametricSettings.cpp
Go to the documentation of this file.
2
7
10
11namespace storm {
12namespace settings {
13namespace modules {
14
15const std::string ParametricSettings::moduleName = "parametric";
16const std::string modeOptionName = "mode";
17const std::string exportResultOptionName = "resultfile";
18const std::string transformContinuousOptionName = "transformcontinuous";
19const std::string transformContinuousShortOptionName = "tc";
20const std::string useMonotonicityName = "use-monotonicity";
21const std::string bigStepEnabledName = "big-step";
22const std::string linearToSimpleEnabledName = "linear-to-simple";
23
25 std::vector<std::string> modes = {"feasibility", "verification", "monotonicity", "sampling", "solutionfunction", "partitioning"};
26 this->addOption(storm::settings::OptionBuilder(moduleName, modeOptionName, false, "What type of parametric analysis do you want to do?")
27 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("mode", "What to do?")
29 .build())
30 .build());
31 this->addOption(storm::settings::OptionBuilder(moduleName, exportResultOptionName, false, "A path to a file where the parametric result should be saved.")
32 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("path", "the location.")
34 .build())
35 .build());
37 "Sets whether to transform a continuous time input model to a discrete time model.")
39 .build());
40 this->addOption(storm::settings::OptionBuilder(moduleName, useMonotonicityName, false, "If set, monotonicity will be used.").build());
41 this->addOption(storm::settings::OptionBuilder(moduleName, bigStepEnabledName, false, "Enables big step transitions.").build());
43 "Converts linear (constant * parameter) transitions to simple (only constant or parameter) transitions.")
44 .build());
45}
46
48 return this->getOption(exportResultOptionName).getHasOptionBeenSet();
49}
50
52 return this->getOption(exportResultOptionName).getArgumentByName("path").getValueAsString();
53}
54
56 return this->getOption(transformContinuousOptionName).getHasOptionBeenSet();
57}
58
60 return this->getOption(useMonotonicityName).getHasOptionBeenSet();
61}
62
64 return this->getOption(modeOptionName).getHasOptionBeenSet();
65}
66
68 auto mode = pars::utility::getParametricModeFromString(this->getOption(modeOptionName).getArgumentByName("mode").getValueAsString());
69 STORM_LOG_THROW(mode, storm::exceptions::IllegalArgumentException, "Parametric mode is not properly implemented");
70 return *mode;
71}
72
74 return this->getOption(bigStepEnabledName).getHasOptionBeenSet();
75}
76
78 return this->getOption(bigStepEnabledName).getArgumentByName("horizon").getValueAsUnsignedInteger();
79}
80
82 return this->getOption(linearToSimpleEnabledName).getHasOptionBeenSet();
83}
84
85} // namespace modules
86} // namespace settings
87} // namespace storm
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
virtual uint_fast64_t getValueAsUnsignedInteger() const =0
Retrieves the value of this argument as an unsigned integer.
static ArgumentBuilder createStringArgument(std::string const &name, std::string const &description)
Creates a string argument with the given parameters.
static std::shared_ptr< ArgumentValidator< std::string > > createMultipleChoiceValidator(std::vector< std::string > const &choices)
static std::shared_ptr< ArgumentValidator< std::string > > createWritableFileValidator()
This class provides the interface to create an option...
ArgumentBase const & getArgumentByName(std::string const &argumentName) const
Returns a reference to the argument with the specified long name.
Definition Option.cpp:79
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
Definition Option.cpp:125
This is the base class of the settings for a particular module.
void addOption(std::shared_ptr< Option > const &option)
Adds and registers the given option.
Option & getOption(std::string const &longName)
Retrieves the option with the given long name.
bool isLinearToSimpleEnabled() const
Retrieves whether linear to simple should be enabled.
uint64_t getBigStepHorizon() const
Retrieves big step depth.
bool exportResultToFile() const
Retrieves whether the model checking result should be exported to a file.
ParametricSettings()
Creates a new set of parametric model checking settings.
std::string exportResultPath() const
The path to a file location which should contain the model checking result.
bool isUseMonotonicitySet() const
Retrieves whether monotonicity should be used as preprocessing.
pars::utility::ParametricMode getOperationMode() const
In what operation mode should storm-pars run.
bool isBigStepEnabled() const
Retrieves whether big-step should be enabled.
bool transformContinuousModel() const
Retrieves whether Continuous time models should be transformed to discrete time models.
bool hasOperationModeBeenSet() const
Has the operation mode (feasibility, verification, etc) been set?
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
std::optional< ParametricMode > getParametricModeFromString(std::string const &input)
const std::string useMonotonicityName
const std::string linearToSimpleEnabledName
const std::string transformContinuousShortOptionName
const std::string bigStepEnabledName
const std::string transformContinuousOptionName
const std::string exportResultOptionName