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 timeTravellingEnabledName = "time-travel";
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(
42 storm::settings::OptionBuilder(moduleName, timeTravellingEnabledName, false, "Enabled time travelling (flip transitions to improve PLA bounds).")
43 .build());
45 "Converts linear (constant * parameter) transitions to simple (only constant or parameter) transitions.")
46 .build());
47}
48
50 return this->getOption(exportResultOptionName).getHasOptionBeenSet();
51}
52
54 return this->getOption(exportResultOptionName).getArgumentByName("path").getValueAsString();
55}
56
58 return this->getOption(transformContinuousOptionName).getHasOptionBeenSet();
59}
60
62 return this->getOption(useMonotonicityName).getHasOptionBeenSet();
63}
64
66 return this->getOption(modeOptionName).getHasOptionBeenSet();
67}
68
70 auto mode = pars::utility::getParametricModeFromString(this->getOption(modeOptionName).getArgumentByName("mode").getValueAsString());
71 STORM_LOG_THROW(mode, storm::exceptions::IllegalArgumentException, "Parametric mode is not properly implemented");
72 return *mode;
73}
74
76 return this->getOption(timeTravellingEnabledName).getHasOptionBeenSet();
77}
78
80 return this->getOption(linearToSimpleEnabledName).getHasOptionBeenSet();
81}
82
83} // namespace modules
84} // namespace settings
85} // namespace storm
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
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 time-travelling should be enabled.
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 isTimeTravellingEnabled() const
Retrieves whether time-travelling should be enabled.
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 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 timeTravellingEnabledName
const std::string transformContinuousShortOptionName
const std::string transformContinuousOptionName
const std::string exportResultOptionName
LabParser.cpp.