Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
RegionVerificationSettings.cpp
Go to the documentation of this file.
2
5
8
10
11const std::string RegionVerificationSettings::moduleName = "regionverif";
12const std::string splittingThresholdName = "splitting-threshold";
13const std::string checkEngineOptionName = "engine";
14
16 this->addOption(
17 storm::settings::OptionBuilder(moduleName, splittingThresholdName, false, "Sets the threshold for number of parameters in which to split regions.")
18 .addArgument(
19 storm::settings::ArgumentBuilder::createIntegerArgument("splitting-threshold", "The threshold for splitting, should be an integer > 0").build())
20 .build());
21
22 std::vector<std::string> engines = {"pl", "exactpl", "validatingpl"};
23 this->addOption(storm::settings::OptionBuilder(moduleName, checkEngineOptionName, true, "Sets which engine is used for analyzing regions.")
24 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of the engine to use.")
27 .build())
28 .build());
29}
30
32 return this->getOption(splittingThresholdName).getArgumentByName("splitting-threshold").getValueAsInteger();
33}
34
36 return this->getOption(splittingThresholdName).getHasOptionBeenSet();
37}
38
40 std::string engineString = this->getOption(checkEngineOptionName).getArgumentByName("name").getValueAsString();
41
43 if (engineString == "pl") {
45 } else if (engineString == "exactpl") {
47 } else if (engineString == "validatingpl") {
49 } else {
50 STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentValueException, "Unknown region check engine '" << engineString << "'.");
51 }
52
53 return result;
54}
55
56} // namespace storm::settings::modules
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
virtual int_fast64_t getValueAsInteger() const =0
Retrieves the value of this argument as an integer.
static ArgumentBuilder createIntegerArgument(std::string const &name, std::string const &description)
Creates an integer argument with the given parameters.
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)
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.
storm::modelchecker::RegionCheckEngine getRegionCheckEngine() const
Retrieves which type of region check should be performed.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
RegionCheckEngine
The considered engine for region checking.
@ ParameterLifting
Parameter lifting approach.
@ ValidatingParameterLifting
Parameter lifting approach with a) inexact (and fast) computation first and b) exact validation of ob...
@ ExactParameterLifting
Parameter lifting approach with exact arithmethics.
SettingsType const & getModule()
Get module.