Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DftGspnSettings.cpp
Go to the documentation of this file.
1#include "DftGspnSettings.h"
2
7
8namespace storm::dft {
9namespace settings {
10namespace modules {
11
12const std::string DftGspnSettings::moduleName = "dftGspn";
13const std::string DftGspnSettings::transformToGspnOptionName = "to-gspn";
14const std::string DftGspnSettings::disableSmartTransformationOptionName = "disable-smart";
15const std::string DftGspnSettings::mergeDCFailedOptionName = "merge-dc-failed";
16const std::string DftGspnSettings::extendPrioritiesOptionName = "extend-priorities";
17
19 this->addOption(storm::settings::OptionBuilder(moduleName, transformToGspnOptionName, false, "Transform DFT to GSPN.").build());
20 this->addOption(storm::settings::OptionBuilder(moduleName, disableSmartTransformationOptionName, false, "Disable smart transformation.").build());
21 this->addOption(
22 storm::settings::OptionBuilder(moduleName, mergeDCFailedOptionName, false, "Enable merging of Don't Care and Failed places into a combined place.")
23 .build());
24 this->addOption(
25 storm::settings::OptionBuilder(moduleName, extendPrioritiesOptionName, false, "Enable experimental calculation of transition priorities").build());
26}
27
29 return this->getOption(transformToGspnOptionName).getHasOptionBeenSet();
30}
31
33 return this->getOption(disableSmartTransformationOptionName).getHasOptionBeenSet();
34}
35
37 return this->getOption(mergeDCFailedOptionName).getHasOptionBeenSet();
38}
39
41 return this->getOption(extendPrioritiesOptionName).getHasOptionBeenSet();
42}
43
45
47 // Ensure that GSPN option is set if other options are set.
48 STORM_LOG_THROW(isTransformToGspn() || (!isDisableSmartTransformation() && !isMergeDCFailed()), storm::exceptions::InvalidSettingsException,
49 "GSPN transformation should be enabled when giving options for the transformation.");
50 return true;
51}
52
53} // namespace modules
54} // namespace settings
55} // namespace storm::dft
bool isExtendPriorities() const
Retrieves whether the experimental setting of priorities should be used.
void finalize() override
Prepares the modules for further usage, should be called at the end of the initialization,...
bool check() const override
Checks whether the settings are consistent.
bool isDisableSmartTransformation() const
Retrieves whether the smart transformation should be disabled.
bool isTransformToGspn() const
Retrieves whether the DFT should be transformed into a GSPN.
DftGspnSettings()
Creates a new set of DFT-GSPN settings.
bool isMergeDCFailed() const
Retrieves whether the DC and failed place should be merged.
This class provides the interface to create an option...
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
Definition Option.cpp:125
ModuleSettings(std::string const &moduleName)
Constructs a new settings object.
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_THROW(cond, exception, message)
Definition macros.h:39