Sebastian Junges
5 years ago
5 changed files with 91 additions and 0 deletions
-
2src/storm-dft/settings/DftSettings.cpp
-
4src/storm-pars/settings/ParsSettings.cpp
-
2src/storm/settings/SettingsManager.cpp
-
43src/storm/settings/modules/HintSettings.cpp
-
40src/storm/settings/modules/HintSettings.h
@ -0,0 +1,43 @@ |
|||||
|
#include "storm/settings/modules/HintSettings.h"
|
||||
|
|
||||
|
#include "storm/settings/Option.h"
|
||||
|
#include "storm/settings/OptionBuilder.h"
|
||||
|
#include "storm/settings/ArgumentBuilder.h"
|
||||
|
#include "storm/exceptions/InvalidSettingsException.h"
|
||||
|
#include "storm/exceptions/IllegalArgumentValueException.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace settings { |
||||
|
namespace modules { |
||||
|
|
||||
|
const std::string HintSettings::moduleName = "hints"; |
||||
|
|
||||
|
const std::string stateHintOption = "states"; |
||||
|
|
||||
|
|
||||
|
HintSettings::HintSettings() : ModuleSettings(moduleName) { |
||||
|
this->addOption(storm::settings::OptionBuilder(moduleName, stateHintOption, true, |
||||
|
"Estimate of the number of reachable states").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("number", "size.").build()).build()); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
bool HintSettings::isNumberStatesSet() const { |
||||
|
return this->getOption(stateHintOption).getHasOptionBeenSet(); |
||||
|
} |
||||
|
|
||||
|
uint64_t HintSettings::getNumberStates() const { |
||||
|
return this->getOption(stateHintOption).getArgumentByName("number").getValueAsUnsignedInteger(); |
||||
|
} |
||||
|
|
||||
|
bool HintSettings::check() const { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
void HintSettings::finalize() { |
||||
|
//Intentionally left empty
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
} // namespace modules
|
||||
|
} // namespace settings
|
||||
|
} // namespace storm
|
@ -0,0 +1,40 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm-config.h" |
||||
|
#include "storm/settings/modules/ModuleSettings.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace settings { |
||||
|
namespace modules { |
||||
|
|
||||
|
/*! |
||||
|
* This class represents the model transformer settings |
||||
|
*/ |
||||
|
class HintSettings : public ModuleSettings { |
||||
|
public: |
||||
|
|
||||
|
/*! |
||||
|
* Creates a new set of transformer settings. |
||||
|
*/ |
||||
|
HintSettings(); |
||||
|
|
||||
|
/*! |
||||
|
* Retrieves whether the option that estimates the number of states is set. |
||||
|
*/ |
||||
|
bool isNumberStatesSet() const; |
||||
|
|
||||
|
uint64_t getNumberStates() const; |
||||
|
|
||||
|
bool check() const override; |
||||
|
|
||||
|
void finalize() override; |
||||
|
|
||||
|
// The name of the module. |
||||
|
static const std::string moduleName; |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
} // namespace modules |
||||
|
} // namespace settings |
||||
|
} // namespace storm |
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue