Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
IOSettings.cpp
Go to the documentation of this file.
2
11
15
16namespace storm {
17namespace settings {
18namespace modules {
19
20const std::string IOSettings::moduleName = "io";
21const std::string IOSettings::exportDotOptionName = "exportdot";
22const std::string IOSettings::exportDotMaxWidthOptionName = "dot-maxwidth";
23const std::string IOSettings::exportBuildOptionName = "exportbuild";
24const std::string IOSettings::exportExplicitOptionName = "exportexplicit";
25const std::string IOSettings::exportDdOptionName = "exportdd";
26const std::string IOSettings::exportJaniDotOptionName = "exportjanidot";
27const std::string IOSettings::exportCdfOptionName = "exportcdf";
28const std::string IOSettings::exportCdfOptionShortName = "cdf";
29const std::string IOSettings::exportSchedulerOptionName = "exportscheduler";
30const std::string IOSettings::exportCheckResultOptionName = "exportresult";
31const std::string IOSettings::explicitOptionName = "explicit";
32const std::string IOSettings::explicitOptionShortName = "exp";
33const std::string IOSettings::explicitDrnOptionName = "explicit-drn";
34const std::string IOSettings::explicitDrnOptionShortName = "drn";
35const std::string IOSettings::explicitImcaOptionName = "explicit-imca";
36const std::string IOSettings::explicitImcaOptionShortName = "imca";
37const std::string IOSettings::prismInputOptionName = "prism";
38const std::string IOSettings::janiInputOptionName = "jani";
39const std::string IOSettings::prismToJaniOptionName = "prism2jani";
40
41const std::string IOSettings::transitionRewardsOptionName = "transrew";
42const std::string IOSettings::stateRewardsOptionName = "staterew";
43const std::string IOSettings::choiceLabelingOptionName = "choicelab";
44const std::string IOSettings::constantsOptionName = "constants";
45const std::string IOSettings::constantsOptionShortName = "const";
46
47const std::string IOSettings::janiPropertyOptionName = "janiproperty";
48const std::string IOSettings::janiPropertyOptionShortName = "jprop";
49const std::string IOSettings::propertyOptionName = "prop";
50const std::string IOSettings::propertyOptionShortName = "prop";
51const std::string IOSettings::steadyStateDistrOptionName = "steadystate";
52const std::string IOSettings::expectedVisitingTimesOptionName = "expvisittimes";
53
54const std::string IOSettings::qvbsInputOptionName = "qvbs";
55const std::string IOSettings::qvbsInputOptionShortName = "qvbs";
56const std::string IOSettings::qvbsRootOptionName = "qvbsroot";
57const std::string IOSettings::propertiesAsMultiOptionName = "propsasmulti";
58
59const std::string IOSettings::uncertaintyResolutionModeName = "uncertainty-resolution";
60
61std::string preventDRNPlaceholderOptionName = "no-drn-placeholders";
62
64 this->addOption(
65 storm::settings::OptionBuilder(moduleName, exportDotOptionName, false,
66 "If given, the loaded model will be written to the specified file in the dot format.")
67 .setIsAdvanced()
68 .addArgument(
69 storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file to which the model is to be written.").build())
70 .build());
72 moduleName, exportDotMaxWidthOptionName, false,
73 "The maximal width for labels in the dot format. For longer lines a linebreak is inserted. Value 0 represents no linebreaks.")
74 .setIsAdvanced()
76 "width", "The maximal line width for the dot format. Default is 0 meaning no linebreaks.")
77 .setDefaultValueUnsignedInteger(0)
78 .build())
79 .build());
80 std::vector<std::string> exportFormats({"auto", "dot", "drdd", "drn", "json"});
81 this->addOption(
82 storm::settings::OptionBuilder(moduleName, exportBuildOptionName, false, "Exports the built model to a file.")
83 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("file", "The output file.").build())
84 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("format", "The output format. 'auto' detects from the file extension.")
85 .addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(exportFormats))
86 .setDefaultValueString("auto")
87 .makeOptional()
88 .build())
89 .build());
90 this->addOption(
91 storm::settings::OptionBuilder(moduleName, exportJaniDotOptionName, false,
92 "If given, the loaded jani model will be written to the specified file in the dot format.")
93 .setIsAdvanced()
94 .addArgument(
95 storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file to which the model is to be written.").build())
96 .build());
97 this->addOption(storm::settings::OptionBuilder(moduleName, exportCdfOptionName, false,
98 "Exports the cumulative density function for reward bounded properties into a .csv file.")
99 .setIsAdvanced()
100 .setShortName(exportCdfOptionShortName)
102 "directory", "A path to an existing directory where the cdf files will be stored.")
103 .build())
104 .build());
105 this->addOption(
106 storm::settings::OptionBuilder(moduleName, exportSchedulerOptionName, false,
107 "Exports the choices of an optimal scheduler to the given file (if supported by engine).")
108 .setIsAdvanced()
109 .addArgument(
110 storm::settings::ArgumentBuilder::createStringArgument("filename", "The output file. Use file extension '.json' to export in json.").build())
111 .build());
112 this->addOption(storm::settings::OptionBuilder(moduleName, exportCheckResultOptionName, false,
113 "Exports the result to a given file (if supported by engine). The export will be in json.")
114 .setIsAdvanced()
115 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The output file.").build())
116 .build());
117 this->addOption(
118 storm::settings::OptionBuilder(moduleName, exportExplicitOptionName, "",
119 "If given, the loaded model will be written to the specified file in the drn format.")
120 .setIsAdvanced()
121 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "the name of the file to which the model is to be writen.").build())
122 .build());
123 this->addOption(storm::settings::OptionBuilder(moduleName, preventDRNPlaceholderOptionName, true, "If given, the exported DRN contains no placeholders")
124 .setIsAdvanced()
125 .build());
126 this->addOption(
127 storm::settings::OptionBuilder(moduleName, exportDdOptionName, "",
128 "If given, the loaded model will be written to the specified file in the drdd format.")
129 .setIsAdvanced()
130 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "the name of the file to which the model is to be writen.").build())
131 .build());
132 this->addOption(storm::settings::OptionBuilder(moduleName, explicitOptionName, false, "Parses the model given in an explicit (sparse) representation.")
133 .setShortName(explicitOptionShortName)
134 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("transition filename",
135 "The name of the file from which to read the transitions.")
137 .build())
138 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("labeling filename",
139 "The name of the file from which to read the state labeling.")
141 .build())
142 .build());
143 this->addOption(storm::settings::OptionBuilder(moduleName, explicitDrnOptionName, false, "Parses the model given in the DRN format.")
144 .setShortName(explicitDrnOptionShortName)
145 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("drn filename", "The name of the DRN file containing the model.")
147 .build())
148 .build());
149 this->addOption(storm::settings::OptionBuilder(moduleName, explicitImcaOptionName, false, "Parses the model given in the IMCA format.")
150 .setShortName(explicitImcaOptionShortName)
151 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("imca filename", "The name of the imca file containing the model.")
153 .build())
154 .build());
155 this->addOption(
156 storm::settings::OptionBuilder(moduleName, prismInputOptionName, false, "Parses the model given in the PRISM format.")
157 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file from which to read the PRISM input.")
159 .build())
160 .build());
161 this->addOption(
162 storm::settings::OptionBuilder(moduleName, janiInputOptionName, false, "Parses the model given in the JANI format.")
163 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The name of the file from which to read the JANI input.")
165 .build())
166 .build());
167 this->addOption(storm::settings::OptionBuilder(moduleName, prismToJaniOptionName, false, "If set, the input PRISM model is transformed to JANI.")
168 .setIsAdvanced()
169 .build());
170 this->addOption(
171 storm::settings::OptionBuilder(moduleName, propertyOptionName, false, "Specifies the properties to be checked on the model.")
172 .setShortName(propertyOptionShortName)
173 .addArgument(
174 storm::settings::ArgumentBuilder::createStringArgument("property or filename", "The formula or the file containing the formulas.").build())
175 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filter", "The names of the properties to check.")
176 .setDefaultValueString("all")
177 .makeOptional()
178 .build())
179 .build());
180
181 this->addOption(storm::settings::OptionBuilder(moduleName, transitionRewardsOptionName, false,
182 "If given, the transition rewards are read from this file and added to the explicit model. Note that this "
183 "requires the model to be given as an explicit model (i.e., via --" +
184 explicitOptionName + ").")
185 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The file from which to read the transition rewards.")
187 .build())
188 .build());
189 this->addOption(storm::settings::OptionBuilder(moduleName, stateRewardsOptionName, false,
190 "If given, the state rewards are read from this file and added to the explicit model. Note that this "
191 "requires the model to be given as an explicit model (i.e., via --" +
192 explicitOptionName + ").")
193 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The file from which to read the state rewards.")
195 .build())
196 .build());
197 this->addOption(storm::settings::OptionBuilder(moduleName, choiceLabelingOptionName, false,
198 "If given, the choice labels are read from this file and added to the explicit model. Note that this "
199 "requires the model to be given as an explicit model (i.e., via --" +
200 explicitOptionName + ").")
201 .setIsAdvanced()
202 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "The file from which to read the choice labels.")
204 .build())
205 .build());
206 this->addOption(
208 moduleName, constantsOptionName, false,
209 "Specifies the constant replacements to use in symbolic models. Note that this requires the model to be given as an symbolic model (i.e., via --" +
210 prismInputOptionName + " or --" + janiInputOptionName + ").")
211 .setShortName(constantsOptionShortName)
212 .addArgument(
213 storm::settings::ArgumentBuilder::createStringArgument("values", "A comma separated list of constants and their value, e.g. a=1,b=2,c=3.")
214 .setDefaultValueString("")
215 .build())
216 .build());
217 this->addOption(storm::settings::OptionBuilder(moduleName, janiPropertyOptionName, false,
218 "Specifies the properties from the jani model (given by --" + janiInputOptionName + ") to be checked.")
219 .setShortName(janiPropertyOptionShortName)
220 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("values", "A comma separated list of properties to be checked")
221 .setDefaultValueString("")
222 .makeOptional()
223 .build())
224 .build());
225 std::vector<std::string> steadyStateDistrAlgorithms({"auto", "eqsys", "evt", "classic"});
226 this->addOption(
227 storm::settings::OptionBuilder(moduleName, steadyStateDistrOptionName, false,
228 "Computes the steady state distribution. Result can be exported using --" + exportCheckResultOptionName + ".")
229 .addArgument(
230 storm::settings::ArgumentBuilder::createStringArgument("algorithm", "The used algorithm. 'auto' chooses according to accuracy requirements.")
231 .addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(steadyStateDistrAlgorithms))
232 .setDefaultValueString("auto")
233 .makeOptional()
234 .build())
235 .build());
236 this->addOption(storm::settings::OptionBuilder(moduleName, expectedVisitingTimesOptionName, false,
237 "Computes the expected number of times each state is visited (DTMC) or the expected time spend in each "
238 "state (CTMC). Result can be exported using --" +
239 exportCheckResultOptionName + ".")
240 .build());
241
242 this->addOption(storm::settings::OptionBuilder(moduleName, qvbsInputOptionName, false, "Selects a model from the Quantitative Verification Benchmark Set.")
243 .setShortName(qvbsInputOptionShortName)
244 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("model", "The short model name as in the benchmark set.").build())
245 .addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("instance-index", "The selected instance of this model.")
246 .setDefaultValueUnsignedInteger(0)
247 .makeOptional()
248 .build())
250 "filter", "The comma separated list of property names to check. Omit to check all, \"\" to check none.")
251 .setDefaultValueString("")
252 .makeOptional()
253 .build())
254 .build());
255
256 this->addOption(storm::settings::OptionBuilder(moduleName, propertiesAsMultiOptionName, false,
257 "If set, the selected properties are interpreted as a multi-objective formula.")
258 .setIsAdvanced()
259 .build());
260
261 std::vector<std::string> uncertaintyResolutionModes = {"minimize", "maximize", "robust", "cooperative", "min", "max"};
262 this->addOption(storm::settings::OptionBuilder(moduleName, uncertaintyResolutionModeName, false, "Mode to resolve the uncertainty (intervals)")
263 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("mode", "Mode to resolve the uncertainty (intervals) by nature.")
264 .addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(uncertaintyResolutionModes))
265 .build())
266 .build());
267
268#ifdef STORM_HAVE_QVBS
269 std::string qvbsRootDefault = STORM_QVBS_ROOT;
270#else
271 std::string qvbsRootDefault = "";
272#endif
273 this->addOption(storm::settings::OptionBuilder(moduleName, qvbsRootOptionName, false,
274 "Specifies the root directory of the Quantitative Verification Benchmark Set. Default can be set in CMAKE.")
275 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("path", "The path.").setDefaultValueString(qvbsRootDefault).build())
276 .build());
277}
278
280 return this->getOption(exportDotOptionName).getHasOptionBeenSet();
281}
282
284 return this->getOption(exportDotOptionName).getArgumentByName("filename").getValueAsString();
285}
286
288 return this->getOption(exportDotMaxWidthOptionName).getArgumentByName("width").getValueAsUnsignedInteger();
289}
290
292 return this->getOption(exportBuildOptionName).getHasOptionBeenSet();
293}
294
296 return this->getOption(exportBuildOptionName).getArgumentByName("file").getValueAsString();
297}
298
300 auto format = this->getOption(exportBuildOptionName).getArgumentByName("format").getValueAsString();
301 if (format == "auto") {
303 } else {
305 }
306}
307
309 return this->getOption(exportJaniDotOptionName).getHasOptionBeenSet();
310}
311
313 return this->getOption(exportJaniDotOptionName).getArgumentByName("filename").getValueAsString();
314}
315
317 return this->getOption(exportExplicitOptionName).getHasOptionBeenSet();
318}
319
321 return this->getOption(exportExplicitOptionName).getArgumentByName("filename").getValueAsString();
322}
323
325 return this->getOption(preventDRNPlaceholderOptionName).getHasOptionBeenSet();
326}
327
329 return this->getOption(exportDdOptionName).getHasOptionBeenSet();
330}
331
333 return this->getOption(exportDdOptionName).getArgumentByName("filename").getValueAsString();
334}
335
337 return this->getOption(exportCdfOptionName).getHasOptionBeenSet();
338}
339
341 std::string result = this->getOption(exportCdfOptionName).getArgumentByName("directory").getValueAsString();
342 if (result.back() != '/') {
343 result.push_back('/');
344 }
345 return result;
346}
347
349 return this->getOption(exportSchedulerOptionName).getHasOptionBeenSet();
350}
351
353 return this->getOption(exportSchedulerOptionName).getArgumentByName("filename").getValueAsString();
354}
355
357 return this->getOption(exportCheckResultOptionName).getHasOptionBeenSet();
358}
359
361 return this->getOption(exportCheckResultOptionName).getArgumentByName("filename").getValueAsString();
362}
363
365 return this->getOption(explicitOptionName).getHasOptionBeenSet();
366}
367
369 return this->getOption(explicitOptionName).getArgumentByName("transition filename").getValueAsString();
370}
371
373 return this->getOption(explicitOptionName).getArgumentByName("labeling filename").getValueAsString();
374}
375
377 return this->getOption(explicitDrnOptionName).getHasOptionBeenSet();
378}
379
381 return this->getOption(explicitDrnOptionName).getArgumentByName("drn filename").getValueAsString();
382}
383
385 return this->getOption(explicitImcaOptionName).getHasOptionBeenSet();
386}
387
389 return this->getOption(explicitImcaOptionName).getArgumentByName("imca filename").getValueAsString();
390}
391
393 return this->getOption(prismInputOptionName).getHasOptionBeenSet();
394}
395
399
401 return this->getOption(prismToJaniOptionName).getHasOptionBeenSet();
402}
403
405 return this->getOption(prismInputOptionName).getArgumentByName("filename").getValueAsString();
406}
407
409 return this->getOption(janiInputOptionName).getHasOptionBeenSet();
410}
411
413 return this->getOption(janiInputOptionName).getArgumentByName("filename").getValueAsString();
414}
415
417 return this->getOption(transitionRewardsOptionName).getHasOptionBeenSet();
418}
419
421 return this->getOption(transitionRewardsOptionName).getArgumentByName("filename").getValueAsString();
422}
423
425 return this->getOption(stateRewardsOptionName).getHasOptionBeenSet();
426}
427
429 return this->getOption(stateRewardsOptionName).getArgumentByName("filename").getValueAsString();
430}
431
433 return this->getOption(choiceLabelingOptionName).getHasOptionBeenSet();
434}
435
437 return this->getOption(choiceLabelingOptionName).getArgumentByName("filename").getValueAsString();
438}
439
441 return this->getOption(constantsOptionName).getHasOptionBeenSet();
442}
443
445 return this->getOption(constantsOptionName).getArgumentByName("values").getValueAsString();
446}
447
449 return this->getOption(janiPropertyOptionName).getHasOptionBeenSet();
450}
451
453 return this->getOption(janiPropertyOptionName).getHasOptionBeenSet() &&
454 (this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString() != "");
455}
456
457std::vector<std::string> IOSettings::getSelectedJaniProperties() const {
458 return storm::parser::parseCommaSeperatedValues(this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString());
459}
460
462 return this->getOption(propertyOptionName).getHasOptionBeenSet();
463}
464
465std::string IOSettings::getProperty() const {
466 return this->getOption(propertyOptionName).getArgumentByName("property or filename").getValueAsString();
467}
468
469std::string IOSettings::getPropertyFilter() const {
470 return this->getOption(propertyOptionName).getArgumentByName("filter").getValueAsString();
471}
472
474 return this->getOption(steadyStateDistrOptionName).getHasOptionBeenSet();
475}
476
478 auto alg = this->getOption(steadyStateDistrOptionName).getArgumentByName("algorithm").getValueAsString();
479 if (alg == "auto") {
481 } else if (alg == "eqsys") {
483 } else if (alg == "classic") {
485 } else {
486 STORM_LOG_ASSERT(alg == "evt", "Unexpected algorithm type.");
488 }
489}
490
492 return this->getOption(expectedVisitingTimesOptionName).getHasOptionBeenSet();
493}
494
496 return this->getOption(qvbsInputOptionName).getHasOptionBeenSet();
497}
498
499std::string IOSettings::getQvbsModelName() const {
500 return this->getOption(qvbsInputOptionName).getArgumentByName("model").getValueAsString();
501}
502
504 return this->getOption(qvbsInputOptionName).getArgumentByName("instance-index").getValueAsUnsignedInteger();
505}
506
507boost::optional<std::vector<std::string>> IOSettings::getQvbsPropertyFilter() const {
508 std::string listAsString = this->getOption(qvbsInputOptionName).getArgumentByName("filter").getValueAsString();
509 if (listAsString == "") {
510 if (this->getOption(qvbsInputOptionName).getArgumentByName("filter").wasSetFromDefaultValue()) {
511 return boost::none;
512 } else {
513 return std::vector<std::string>();
514 }
515 } else {
516 return storm::parser::parseCommaSeperatedValues(listAsString);
517 }
518}
519
520std::string IOSettings::getQvbsRoot() const {
521 auto const& path = this->getOption(qvbsRootOptionName).getArgumentByName("path");
522#ifndef STORM_HAVE_QVBS
523 STORM_LOG_THROW(this->getOption(qvbsRootOptionName).getHasOptionBeenSet(), storm::exceptions::InvalidSettingsException,
524 "QVBS Root is not specified. Either use the --" + qvbsRootOptionName + " option or specify it within CMAKE.");
525#endif
526 return path.getValueAsString();
527}
528
530 return this->getOption(propertiesAsMultiOptionName).getHasOptionBeenSet();
531}
532
534 std::string uncertaintyResolutionModeString = this->getOption(uncertaintyResolutionModeName).getArgumentByName("mode").getValueAsString();
535
536 if (uncertaintyResolutionModeString == "minimize" || uncertaintyResolutionModeString == "min") {
537 return UncertaintyResolutionModeSetting::Minimize;
538 } else if (uncertaintyResolutionModeString == "maximize" || uncertaintyResolutionModeString == "max") {
539 return UncertaintyResolutionModeSetting::Maximize;
540 } else if (uncertaintyResolutionModeString == "robust") {
541 return UncertaintyResolutionModeSetting::Robust;
542 } else if (uncertaintyResolutionModeString == "cooperative") {
543 return UncertaintyResolutionModeSetting::Cooperative;
544 } else if (uncertaintyResolutionModeString == "both") {
545 STORM_LOG_ASSERT(false, "Uncertainty resolution mode 'both' not yet implemented.");
546 STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "Uncertainty resolution mode 'both' not yet implemented.");
547 }
548 STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentValueException, "Unknown nature resolution mode '" << uncertaintyResolutionModeString << "'.");
549}
550
552 return this->getOption(uncertaintyResolutionModeName).getHasOptionBeenSet();
553}
554
556 STORM_LOG_WARN_COND(!isExportDdSet(), "Option '--" << moduleName << ":" << exportDdOptionName << "' is depreciated. Use '--" << moduleName << ":"
557 << exportBuildOptionName << "' instead.");
558 STORM_LOG_WARN_COND(!isExportDotSet(), "Option '--" << moduleName << ":" << exportDotOptionName << "' is depreciated. Use '--" << moduleName << ":"
559 << exportBuildOptionName << "' instead.");
560 STORM_LOG_WARN_COND(!isExportExplicitSet(), "Option '--" << moduleName << ":" << exportExplicitOptionName << "' is depreciated. Use '--" << moduleName
561 << ":" << exportBuildOptionName << "' instead.");
562}
563
564bool IOSettings::check() const {
565 // Ensure that at most one symbolic input model is given.
566 uint64_t numSymbolicInputs = isJaniInputSet() ? 1 : 0;
567 numSymbolicInputs += isPrismInputSet() ? 1 : 0;
568 numSymbolicInputs += isQvbsInputSet() ? 1 : 0;
569 STORM_LOG_THROW(numSymbolicInputs <= 1, storm::exceptions::InvalidSettingsException, "Multiple symbolic input models.");
570 STORM_LOG_THROW(!isExportJaniDotSet() || isJaniInputSet() || isQvbsInputSet(), storm::exceptions::InvalidSettingsException,
571 "Jani-to-dot export is only available for jani models");
572
573 // Ensure that not two explicit input models were given.
574 uint64_t numExplicitInputs = isExplicitSet() ? 1 : 0;
575 numExplicitInputs += isExplicitDRNSet() ? 1 : 0;
576 numExplicitInputs += isExplicitIMCASet() ? 1 : 0;
577 STORM_LOG_THROW(numExplicitInputs <= 1, storm::exceptions::InvalidSettingsException, "Multiple explicit input models");
578
579 // Ensure that the model was given either symbolically or explicitly.
580 STORM_LOG_THROW(numSymbolicInputs + numExplicitInputs <= 1, storm::exceptions::InvalidSettingsException,
581 "The model may be either given in an explicit or a symbolic format (PRISM or JANI), but not both.");
582
583 // Make sure PRISM-to-JANI conversion is only set if the actual input is in PRISM format.
584 STORM_LOG_THROW(!isPrismToJaniSet() || isPrismInputSet(), storm::exceptions::InvalidSettingsException,
585 "For the transformation from PRISM to JANI, the input model must be given in the prism format.");
586
587 return true;
588}
589
590} // namespace modules
591} // namespace settings
592} // 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 createUnsignedIntegerArgument(std::string const &name, std::string const &description)
Creates an unsigned 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)
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 isJaniPropertiesSet() const
Retrieves whether the jani-property option was set.
UncertaintyResolutionModeSetting getUncertaintyResolutionMode() const
Retrieves the mode deciding how the uncertainty should be resolved.
bool isExportExplicitSet() const
Retrieves whether the export-to-explicit option was set.
std::string getExportExplicitFilename() const
Retrieves the name in which to write the model in explicit format, if the option was set.
std::string getExportBuildFilename() const
Retrieves the name in which to write the model in json format, if export-to-json option was set.
bool isExportCdfSet() const
Retrieves whether the cumulative density function for reward bounded properties should be exported.
static const std::string moduleName
Definition IOSettings.h:394
std::string getExplicitIMCAFilename() const
Retrieves the name of the file that contains the model in the IMCA format.
bool areJaniPropertiesSelected() const
Retrieves whether one or more jani-properties have been selected.
std::string getExportJaniDotFilename() const
Retrieves the name in which to write the jani model in dot format, if the export-to-jani-dot option w...
bool isExportCheckResultSet() const
Retrieves whether the check result should be exported.
std::string getChoiceLabelingFilename() const
Retrieves the name of the file that contains the choice labeling if the model was given using the exp...
bool isStateRewardsSet() const
Retrieves whether the state reward option was set.
bool isExportDdSet() const
Retrieves whether the export-to-dd option was set.
std::string getExportSchedulerFilename() const
Retrieves a filename to which an optimal scheduler will be exported.
std::string getExportCdfDirectory() const
Retrieves a path to a directory in which the cdf files will be stored.
bool isPrismToJaniSet() const
Retrieves whether the option to convert PRISM to JANI input was set.
size_t getExportDotMaxWidth() const
Retrieves the maximal width for labels in the dot format.
std::string getProperty() const
Retrieves the property specified with the property option.
std::string getJaniInputFilename() const
Retrieves the name of the file that contains the JANI model specification if the model was given usin...
bool isExportDotSet() const
Retrieves whether the export-to-dot option was set.
bool isChoiceLabelingSet() const
Retrieves whether the choice labeling option was set.
bool isPrismOrJaniInputSet() const
Retrieves whether the JANI or PRISM input option was set.
std::string getPropertyFilter() const
Retrieves the property filter.
bool isExportBuildSet() const
Retrieves whether the exportbuild 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 isQvbsInputSet() const
Retrieves whether the input model is to be read from the quantitative verification benchmark set (QVB...
bool isComputeSteadyStateDistributionSet() const
Retrieves whether the steady-state distribution is to be computed.
std::string getConstantDefinitionString() const
Retrieves the string that defines the constants of a symbolic model (given via the symbolic option).
bool isExplicitDRNSet() const
Retrieves whether the explicit option with DRN was set.
std::string getExplicitDRNFilename() const
Retrieves the name of the file that contains the model in the DRN format.
std::string getLabelingFilename() const
Retrieves the name of the file that contains the state labeling if the model was given using the expl...
void finalize() override
Prepares the modules for further usage, should be called at the end of the initialization,...
boost::optional< std::vector< std::string > > getQvbsPropertyFilter() const
Retrieves the selected property names.
bool isExportSchedulerSet() const
Retrieves whether an optimal scheduler is to be exported.
bool isConstantsSet() const
Retrieves whether the constants option was set.
std::string getStateRewardsFilename() const
Retrieves the name of the file that contains the state rewards if the model was given using the expli...
std::string getTransitionRewardsFilename() const
Retrieves the name of the file that contains the transition rewards if the model was given using the ...
bool check() const override
Checks whether the settings are consistent.
bool isPropertySet() const
Retrieves whether the property option was set.
std::string getQvbsModelName() const
Retrieves the specified model (short-)name of the QVBS.
std::vector< std::string > getSelectedJaniProperties() const
IOSettings()
Creates a new set of IO settings.
std::string getExportCheckResultFilename() const
Retrieves a filename to which the check result should be exported.
storm::SteadyStateDistributionAlgorithm getSteadyStateDistributionAlgorithm() const
std::string getTransitionFilename() const
Retrieves the name of the file that contains the transitions if the model was given using the explici...
bool isJaniInputSet() const
Retrieves whether the JANI input option was set.
uint64_t getQvbsInstanceIndex() const
Retrieves the selected model instance (file + open parameters of the model)
bool isExplicitIMCASet() const
Retrieves whether the explicit option with IMCA was set.
bool isExplicitExportPlaceholdersDisabled() const
Retrieves whether we prevent the usage of placeholders in the explicit DRN format.
std::string getExportDotFilename() const
Retrieves the name in which to write the model in dot format, if the export-to-dot option was set.
storm::io::ModelExportFormat getExportBuildFormat() const
Retrieves the specified export format for the exportbuild option.
bool isPropertiesAsMultiSet() const
Retrieves whether the input properties are to be interpreted as a single multi-objective formula.
std::string getQvbsRoot() const
Retrieves the specified root directory of qvbs.
bool isPrismInputSet() const
Retrieves whether the PRISM language option was set.
bool isComputeExpectedVisitingTimesSet() const
Retrieves whether the expected visiting times are to be computed.
bool isTransitionRewardsSet() const
Retrieves whether the transition reward option was set.
bool isExplicitSet() const
Retrieves whether the explicit option was set.
std::string getExportDdFilename() const
Retrieves the name in which to write the model in dd format, if the option was set.
bool isExportJaniDotSet() const
Retrieves whether the export-to-dot option for jani was set.
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.
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:38
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
ModelExportFormat getModelExportFormatFromString(std::string const &input)
ModelExportFormat getModelExportFormatFromFileExtension(std::string const &filename)
std::vector< std::string > parseCommaSeperatedValues(std::string const &input)
Given a string separated by commas, returns the values.
Definition CSVParser.cpp:11
std::string preventDRNPlaceholderOptionName