diff --git a/src/storm-cli-utilities/model-handling.h b/src/storm-cli-utilities/model-handling.h index 54381f7d4..8f3d44c55 100644 --- a/src/storm-cli-utilities/model-handling.h +++ b/src/storm-cli-utilities/model-handling.h @@ -67,10 +67,16 @@ namespace storm { auto const& janiPropertyInput = janiInput.second; if (ioSettings.isJaniPropertiesSet()) { - for (auto const& propName : ioSettings.getJaniProperties()) { - auto propertyIt = janiPropertyInput.find(propName); - STORM_LOG_THROW(propertyIt != janiPropertyInput.end(), storm::exceptions::InvalidArgumentException, "No JANI property with name '" << propName << "' is known."); - input.properties.emplace_back(propertyIt->second); + if (ioSettings.areJaniPropertiesSelected()) { + for (auto const& propName : ioSettings.getSelectedJaniProperties()) { + auto propertyIt = janiPropertyInput.find(propName); + STORM_LOG_THROW(propertyIt != janiPropertyInput.end(), storm::exceptions::InvalidArgumentException, "No JANI property with name '" << propName << "' is known."); + input.properties.emplace_back(propertyIt->second); + } + } else { + for (auto const& property : janiPropertyInput) { + input.properties.emplace_back(property.second); + } } } } diff --git a/src/storm/settings/modules/IOSettings.cpp b/src/storm/settings/modules/IOSettings.cpp index 658b59cbe..2dabdbdb9 100644 --- a/src/storm/settings/modules/IOSettings.cpp +++ b/src/storm/settings/modules/IOSettings.cpp @@ -207,7 +207,11 @@ namespace storm { return this->getOption(janiPropertyOptionName).getHasOptionBeenSet(); } - std::vector IOSettings::getJaniProperties() const { + bool IOSettings::areJaniPropertiesSelected() const { + return this->getOption(janiPropertyOptionName).getHasOptionBeenSet() && (this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString() != ""); + } + + std::vector IOSettings::getSelectedJaniProperties() const { return storm::parser::parseCommaSeperatedValues(this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString()); } diff --git a/src/storm/settings/modules/IOSettings.h b/src/storm/settings/modules/IOSettings.h index cc41176bf..09ed02acb 100644 --- a/src/storm/settings/modules/IOSettings.h +++ b/src/storm/settings/modules/IOSettings.h @@ -233,10 +233,16 @@ namespace storm { */ bool isJaniPropertiesSet() const; + /*! + * Retrieves whether one or more jani-properties have been selected + * @return + */ + bool areJaniPropertiesSelected() const; + /*! * @return The names of the jani properties to check */ - std::vector getJaniProperties() const; + std::vector getSelectedJaniProperties() const; /*! * Retrieves whether the property option was set.