20const std::string IOSettings::exportDotOptionName =
"exportdot";
21const std::string IOSettings::exportDotMaxWidthOptionName =
"dot-maxwidth";
22const std::string IOSettings::exportBuildOptionName =
"exportbuild";
23const std::string IOSettings::exportExplicitOptionName =
"exportexplicit";
24const std::string IOSettings::exportDdOptionName =
"exportdd";
25const std::string IOSettings::exportJaniDotOptionName =
"exportjanidot";
26const std::string IOSettings::exportCdfOptionName =
"exportcdf";
27const std::string IOSettings::exportCdfOptionShortName =
"cdf";
28const std::string IOSettings::exportSchedulerOptionName =
"exportscheduler";
29const std::string IOSettings::exportCheckResultOptionName =
"exportresult";
30const std::string IOSettings::explicitOptionName =
"explicit";
31const std::string IOSettings::explicitOptionShortName =
"exp";
32const std::string IOSettings::explicitDrnOptionName =
"explicit-drn";
33const std::string IOSettings::explicitDrnOptionShortName =
"drn";
34const std::string IOSettings::explicitImcaOptionName =
"explicit-imca";
35const std::string IOSettings::explicitImcaOptionShortName =
"imca";
36const std::string IOSettings::prismInputOptionName =
"prism";
37const std::string IOSettings::janiInputOptionName =
"jani";
38const std::string IOSettings::prismToJaniOptionName =
"prism2jani";
40const std::string IOSettings::transitionRewardsOptionName =
"transrew";
41const std::string IOSettings::stateRewardsOptionName =
"staterew";
42const std::string IOSettings::choiceLabelingOptionName =
"choicelab";
43const std::string IOSettings::constantsOptionName =
"constants";
44const std::string IOSettings::constantsOptionShortName =
"const";
46const std::string IOSettings::janiPropertyOptionName =
"janiproperty";
47const std::string IOSettings::janiPropertyOptionShortName =
"jprop";
48const std::string IOSettings::propertyOptionName =
"prop";
49const std::string IOSettings::propertyOptionShortName =
"prop";
50const std::string IOSettings::steadyStateDistrOptionName =
"steadystate";
51const std::string IOSettings::expectedVisitingTimesOptionName =
"expvisittimes";
53const std::string IOSettings::qvbsInputOptionName =
"qvbs";
54const std::string IOSettings::qvbsInputOptionShortName =
"qvbs";
55const std::string IOSettings::qvbsRootOptionName =
"qvbsroot";
56const std::string IOSettings::propertiesAsMultiOptionName =
"propsasmulti";
63 "If given, the loaded model will be written to the specified file in the dot format.")
69 moduleName, exportDotMaxWidthOptionName,
false,
70 "The maximal width for labels in the dot format. For longer lines a linebreak is inserted. Value 0 represents no linebreaks.")
73 "width",
"The maximal line width for the dot format. Default is 0 meaning no linebreaks.")
77 std::vector<std::string>
exportFormats({
"auto",
"dot",
"drdd",
"drn",
"json"});
89 "If given, the loaded jani model will be written to the specified file in the dot format.")
95 "Exports the cumulative density function for reward bounded properties into a .csv file.")
97 .setShortName(exportCdfOptionShortName)
99 "directory",
"A path to an existing directory where the cdf files will be stored.")
104 "Exports the choices of an optimal scheduler to the given file (if supported by engine).")
110 "Exports the result to a given file (if supported by engine). The export will be in json.")
116 "If given, the loaded model will be written to the specified file in the drn format.")
125 "If given, the loaded model will be written to the specified file in the drdd format.")
130 .setShortName(explicitOptionShortName)
132 "The name of the file from which to read the transitions.")
136 "The name of the file from which to read the state labeling.")
141 .setShortName(explicitDrnOptionShortName)
147 .setShortName(explicitImcaOptionShortName)
169 .setShortName(propertyOptionShortName)
179 "If given, the transition rewards are read from this file and added to the explicit model. Note that this "
180 "requires the model to be given as an explicit model (i.e., via --" +
181 explicitOptionName +
").")
187 "If given, the state rewards are read from this file and added to the explicit model. Note that this "
188 "requires the model to be given as an explicit model (i.e., via --" +
189 explicitOptionName +
").")
195 "If given, the choice labels are read from this file and added to the explicit model. Note that this "
196 "requires the model to be given as an explicit model (i.e., via --" +
197 explicitOptionName +
").")
206 "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 --" +
207 prismInputOptionName +
" or --" + janiInputOptionName +
").")
208 .setShortName(constantsOptionShortName)
215 "Specifies the properties from the jani model (given by --" + janiInputOptionName +
") to be checked.")
216 .setShortName(janiPropertyOptionShortName)
225 "Computes the steady state distribution. Result can be exported using --" + exportCheckResultOptionName +
".")
234 "Computes the expected number of times each state is visited (DTMC) or the expected time spend in each "
235 "state (CTMC). Result can be exported using --" +
236 exportCheckResultOptionName +
".")
240 .setShortName(qvbsInputOptionShortName)
247 "filter",
"The comma separated list of property names to check. Omit to check all, \"\" to check none.")
254 "If set, the selected properties are interpreted as a multi-objective formula.")
258#ifdef STORM_HAVE_QVBS
264 "Specifies the root directory of the Quantitative Verification Benchmark Set. Default can be set in CMAKE.")
332 if (
result.back() !=
'/') {
471 }
else if (
alg ==
"eqsys") {
473 }
else if (
alg ==
"classic") {
500 if (this->
getOption(qvbsInputOptionName).getArgumentByName(
"filter").wasSetFromDefaultValue()) {
503 return std::vector<std::string>();
512#ifndef STORM_HAVE_QVBS
513 STORM_LOG_THROW(this->
getOption(qvbsRootOptionName).getHasOptionBeenSet(), storm::exceptions::InvalidSettingsException,
514 "QVBS Root is not specified. Either use the --" + qvbsRootOptionName +
" option or specify it within CMAKE.");
516 return path.getValueAsString();
525 << exportBuildOptionName <<
"' instead.");
527 << exportBuildOptionName <<
"' instead.");
529 <<
":" << exportBuildOptionName <<
"' instead.");
539 "Jani-to-dot export is only available for jani models");
549 "The model may be either given in an explicit or a symbolic format (PRISM or JANI), but not both.");
553 "For the transformation from PRISM to JANI, the input model must be given in the prism format.");
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.
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
bool isJaniPropertiesSet() const
Retrieves whether the jani-property option was set.
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
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)
#define STORM_LOG_WARN_COND(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
ModelExportFormat getModelExportFormatFromString(std::string const &input)
ModelExportFormat getModelExportFormatFromFileExtension(std::string const &filename)
std::vector< std::string > parseCommaSeperatedValues(std::string const &input)
Given a string seperated by commas, returns the values.
std::string preventDRNPlaceholderOptionName
SettingsType const & getModule()
Get module.
SteadyStateDistributionAlgorithm