Browse Source

When using bisimulation with the dd-to-sparse engine, the quotient is automatically extracted in a sparse way.

tempestpy_adaptions
Tim Quatmann 5 years ago
parent
commit
8711b32c99
  1. 5
      src/storm-cli-utilities/model-handling.h
  2. 4
      src/storm/settings/modules/BisimulationSettings.cpp
  3. 7
      src/storm/settings/modules/BisimulationSettings.h

5
src/storm-cli-utilities/model-handling.h

@ -510,7 +510,10 @@ namespace storm {
STORM_LOG_WARN_COND(!bisimulationSettings.isWeakBisimulationSet(), "Weak bisimulation is currently not supported on DDs. Falling back to strong bisimulation.");
auto quotientFormat = bisimulationSettings.getQuotientFormat();
if (mpi.engine == storm::utility::Engine::DdSparse && quotientFormat != storm::dd::bisimulation::QuotientFormat::Sparse && bisimulationSettings.isQuotientFormatSetFromDefaultValue()) {
STORM_LOG_INFO("Setting bisimulation quotient format to 'sparse'.");
quotientFormat = storm::dd::bisimulation::QuotientFormat::Sparse;
}
STORM_LOG_INFO("Performing bisimulation minimization...");
return storm::api::performBisimulationMinimization<DdType, ValueType, ExportValueType>(model, createFormulasToRespect(input.properties), storm::storage::BisimulationType::Strong, bisimulationSettings.getSignatureMode(), quotientFormat);
}

4
src/storm/settings/modules/BisimulationSettings.cpp

@ -70,6 +70,10 @@ namespace storm {
return false;
}
bool BisimulationSettings::isQuotientFormatSetFromDefaultValue() const {
return !this->getOption(quotientFormatOptionName).getHasOptionBeenSet() || this->getOption(quotientFormatOptionName).getArgumentByName("format").wasSetFromDefaultValue();
}
storm::dd::bisimulation::QuotientFormat BisimulationSettings::getQuotientFormat() const {
std::string quotientFormatAsString = this->getOption(quotientFormatOptionName).getArgumentByName("format").getValueAsString();
if (quotientFormatAsString == "sparse") {

7
src/storm/settings/modules/BisimulationSettings.h

@ -43,6 +43,13 @@ namespace storm {
*/
bool isWeakBisimulationSet() const;
/*!
* Retrieves whether the format in which the quotient is to be extracted has been set from its default value.
*
* @return True iff it has been set from its default value.
*/
bool isQuotientFormatSetFromDefaultValue() const;
/*!
* Retrieves the format in which the quotient is to be extracted.
* NOTE: only applies to DD-based bisimulation.

Loading…
Cancel
Save