Browse Source

Initialize all modules in tests and normal storm

Former-commit-id: 249a702d66
tempestpy_adaptions
Mavo 9 years ago
parent
commit
f48d8bc6b1
  1. 19
      src/settings/SettingsManager.cpp
  2. 8
      src/settings/SettingsManager.h
  3. 41
      src/storm.cpp
  4. 1
      test/functional/storm-functional-tests.cpp
  5. 1
      test/performance/storm-performance-tests.cpp

19
src/settings/SettingsManager.cpp

@ -488,5 +488,24 @@ namespace storm {
return dynamic_cast<storm::settings::modules::GeneralSettings&>(mutableManager().getModule(storm::settings::modules::GeneralSettings::moduleName));
}
void initializeAll(std::string const& name, std::string const& executableName) {
storm::settings::mutableManager().setName(name, executableName);
// Register all known settings modules.
storm::settings::addModule<storm::settings::modules::GeneralSettings>();
storm::settings::addModule<storm::settings::modules::DebugSettings>();
storm::settings::addModule<storm::settings::modules::CounterexampleGeneratorSettings>();
storm::settings::addModule<storm::settings::modules::CuddSettings>();
storm::settings::addModule<storm::settings::modules::SylvanSettings>();
storm::settings::addModule<storm::settings::modules::GmmxxEquationSolverSettings>();
storm::settings::addModule<storm::settings::modules::NativeEquationSolverSettings>();
storm::settings::addModule<storm::settings::modules::BisimulationSettings>();
storm::settings::addModule<storm::settings::modules::GlpkSettings>();
storm::settings::addModule<storm::settings::modules::GurobiSettings>();
storm::settings::addModule<storm::settings::modules::TopologicalValueIterationEquationSolverSettings>();
storm::settings::addModule<storm::settings::modules::ParametricSettings>();
storm::settings::addModule<storm::settings::modules::SparseDtmcEliminationModelCheckerSettings>();
}
}
}

8
src/settings/SettingsManager.h

@ -102,6 +102,7 @@ namespace storm {
* @return The only existing instance of a settings manager
*/
static SettingsManager& manager();
/*!
* Sets the name of the tool.
* @param name Name of the tool.
@ -257,6 +258,13 @@ namespace storm {
mutableManager().addModule(std::unique_ptr<modules::ModuleSettings>(new SettingsType()));
}
/*!
* Initialize the settings manager with all available modules.
* @param name Name of the tool.
* @param executableName Filename of the executable.
*/
void initializeAll(std::string const& name, std::string const& executableName);
/*!
* Get module. The type of the module is given as a template argument.
*

41
src/storm.cpp

@ -4,44 +4,7 @@
#include "src/cli/cli.h"
#include "src/utility/initialize.h"
#include "src/settings/modules/GeneralSettings.h"
#include "src/settings/modules/DebugSettings.h"
#include "src/settings/modules/CounterexampleGeneratorSettings.h"
#include "src/settings/modules/CuddSettings.h"
#include "src/settings/modules/SylvanSettings.h"
#include "src/settings/modules/GmmxxEquationSolverSettings.h"
#include "src/settings/modules/NativeEquationSolverSettings.h"
#include "src/settings/modules/BisimulationSettings.h"
#include "src/settings/modules/GlpkSettings.h"
#include "src/settings/modules/GurobiSettings.h"
#include "src/settings/modules/TopologicalValueIterationEquationSolverSettings.h"
#include "src/settings/modules/ParametricSettings.h"
#include "src/settings/modules/SparseDtmcEliminationModelCheckerSettings.h"
/*!
* Initialize the settings manager.
*/
void initializeSettings() {
storm::settings::mutableManager().setName("SToRM", "storm");
// Register all known settings modules.
storm::settings::addModule<storm::settings::modules::GeneralSettings>();
storm::settings::addModule<storm::settings::modules::DebugSettings>();
storm::settings::addModule<storm::settings::modules::CounterexampleGeneratorSettings>();
storm::settings::addModule<storm::settings::modules::CuddSettings>();
storm::settings::addModule<storm::settings::modules::SylvanSettings>();
storm::settings::addModule<storm::settings::modules::GmmxxEquationSolverSettings>();
storm::settings::addModule<storm::settings::modules::NativeEquationSolverSettings>();
storm::settings::addModule<storm::settings::modules::BisimulationSettings>();
storm::settings::addModule<storm::settings::modules::GlpkSettings>();
storm::settings::addModule<storm::settings::modules::GurobiSettings>();
storm::settings::addModule<storm::settings::modules::TopologicalValueIterationEquationSolverSettings>();
storm::settings::addModule<storm::settings::modules::ParametricSettings>();
storm::settings::addModule<storm::settings::modules::SparseDtmcEliminationModelCheckerSettings>();
}
#include "src/settings/SettingsManager.h"
/*!
* Main entry point of the executable storm.
@ -51,7 +14,7 @@ int main(const int argc, const char** argv) {
try {
storm::utility::setUp();
storm::cli::printHeader("SToRM", argc, argv);
initializeSettings();
storm::settings::initializeAll("SToRM", "storm");
bool optionsCorrect = storm::cli::parseOptions(argc, argv);
if (!optionsCorrect) {
return -1;

1
test/functional/storm-functional-tests.cpp

@ -38,6 +38,7 @@ void setUpLogging() {
int main(int argc, char* argv[]) {
setUpLogging();
storm::settings::initializeAll("StoRM (Functional) Testing Suite", "storm-functional-tests");
std::cout << "StoRM (Functional) Testing Suite" << std::endl;
testing::InitGoogleTest(&argc, argv);

1
test/performance/storm-performance-tests.cpp

@ -36,6 +36,7 @@ void setUpLogging() {
int main(int argc, char* argv[]) {
setUpLogging();
storm::settings::initializeAll("StoRM (Performance) Testing Suite", "storm-performance-tests");
std::cout << "StoRM (Performance) Testing Suite" << std::endl;
testing::InitGoogleTest(&argc, argv);

Loading…
Cancel
Save