Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ConversionInputSettings.cpp
Go to the documentation of this file.
2
9
11
12namespace storm {
13namespace settings {
14namespace modules {
15
16const std::string ConversionInputSettings::moduleName = "input";
17const std::string ConversionInputSettings::propertyOptionName = "prop";
18const std::string ConversionInputSettings::propertyOptionShortName = "prop";
19const std::string ConversionInputSettings::constantsOptionName = "constants";
20const std::string ConversionInputSettings::constantsOptionShortName = "const";
21const std::string ConversionInputSettings::prismInputOptionName = "prism";
22const std::string ConversionInputSettings::prismCompatibilityOptionName = "prismcompat";
23const std::string ConversionInputSettings::prismCompatibilityOptionShortName = "pc";
24const std::string ConversionInputSettings::janiInputOptionName = "jani";
25const std::string ConversionInputSettings::janiPropertyOptionName = "janiproperty";
26const std::string ConversionInputSettings::janiPropertyOptionShortName = "jprop";
27
29 // General
30 this->addOption(
31 storm::settings::OptionBuilder(moduleName, propertyOptionName, false, "Specifies the properties to be checked on the model.")
32 .setShortName(propertyOptionShortName)
33 .addArgument(
34 storm::settings::ArgumentBuilder::createStringArgument("property or filename", "The formula or the file containing the formulas.").build())
35 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filter", "The names of the properties to check.")
37 .makeOptional()
38 .build())
39 .build());
40 this->addOption(
42 moduleName, constantsOptionName, false,
43 "Specifies the constant replacements to use in symbolic models. Note that this requires the model to be given as an symbolic model (e.g., via --" +
44 prismInputOptionName + ").")
45 .setShortName(constantsOptionShortName)
46 .addArgument(
47 storm::settings::ArgumentBuilder::createStringArgument("values", "A comma separated list of constants and their value, e.g. a=1,b=2,c=3.")
49 .build())
50 .build());
51
52 // Prism related
53 this->addOption(
54 storm::settings::OptionBuilder(moduleName, prismInputOptionName, false, "Parses the model given in the PRISM format.")
55 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file from which to read the PRISM input.")
57 .build())
58 .build());
59 this->addOption(storm::settings::OptionBuilder(moduleName, prismCompatibilityOptionName, false,
60 "Enables PRISM compatibility. This may be necessary to process some PRISM models.")
61 .setShortName(prismCompatibilityOptionShortName)
62 .build());
63
64 // Jani related
65 this->addOption(
66 storm::settings::OptionBuilder(moduleName, janiInputOptionName, false, "Parses the model given in the JANI format.")
67 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file from which to read the JANI input.")
69 .build())
70 .build());
71 this->addOption(storm::settings::OptionBuilder(moduleName, janiPropertyOptionName, false,
72 "Specifies the properties from the jani model (given by --" + janiInputOptionName + ") to be checked.")
73 .setShortName(janiPropertyOptionShortName)
74 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("values", "A comma separated list of properties to be checked")
76 .makeOptional()
77 .build())
78 .build());
79}
80
82 return this->getOption(prismInputOptionName).getHasOptionBeenSet();
83}
84
86 return this->getOption(prismInputOptionName).getArgumentByName("filename").getValueAsString();
87}
88
90 return this->getOption(janiInputOptionName).getHasOptionBeenSet();
91}
92
94 return this->getOption(janiInputOptionName).getArgumentByName("filename").getValueAsString();
95}
96
98 return this->getOption(prismCompatibilityOptionName).getHasOptionBeenSet();
99}
100
102 return this->getOption(constantsOptionName).getHasOptionBeenSet();
103}
104
106 return this->getOption(constantsOptionName).getArgumentByName("values").getValueAsString();
107}
108
110 return this->getOption(propertyOptionName).getHasOptionBeenSet();
111}
112
114 return this->getOption(propertyOptionName).getArgumentByName("property or filename").getValueAsString();
115}
116
118 return this->getOption(propertyOptionName).getArgumentByName("filter").getValueAsString();
119}
120
122 return this->getOption(janiPropertyOptionName).getHasOptionBeenSet();
123}
124
126 return this->getOption(janiPropertyOptionName).getHasOptionBeenSet() &&
127 (this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString() != "");
128}
129
131 return storm::parser::parseCommaSeperatedValues(this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString());
132}
133
135 // Intentionally left empty.
136}
137
139 return true;
140}
141
142} // namespace modules
143} // namespace settings
144} // 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 > > createExistingFileValidator()
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
bool isPropertyInputSet() const
Retrieves whether the property option was set.
bool check() const override
Checks whether the settings are consistent.
bool isJaniPropertiesSet() const
Retrieves whether the jani-property option was set.
std::string getPrismInputFilename() const
Retrieves the name of the file that contains the PRISM model specification if the model was given usi...
bool areJaniPropertiesSelected() const
Retrieves whether one or more jani-properties have been selected.
std::string getJaniInputFilename() const
Retrieves the name of the file that contains the jani model specification if the model was given.
bool isJaniInputSet() const
Retrieves whether the Jani option was set.
std::string getPropertyInput() const
Retrieves the property specified with the property option.
bool isConstantsSet() const
Retrieves whether constant definition option was set.
bool isPrismInputSet() const
Retrieves whether the PRISM language option was set.
bool isPrismCompatibilityEnabled() const
Retrieves whether the PRISM compatibility mode was enabled.
std::string getConstantDefinitionString() const
Retrieves the string that defines the constants of a symbolic model (given via the symbolic option).
std::string getPropertyInputFilter() const
Retrieves the property filter.
void finalize() override
Prepares the modules for further usage, should be called at the end of the initialization,...
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.
std::vector< std::string > parseCommaSeperatedValues(std::string const &input)
Given a string seperated by commas, returns the values.
Definition CSVParser.cpp:11
SettingsType const & getModule()
Get module.
LabParser.cpp.
Definition cli.cpp:18