Browse Source
storm-conv: Added support for transformations on prism programs (such as flattening of modules).
tempestpy_adaptions
storm-conv: Added support for transformations on prism programs (such as flattening of modules).
tempestpy_adaptions
TimQu
5 years ago
9 changed files with 210 additions and 2 deletions
-
1CHANGELOG.md
-
51src/storm-conv-cli/storm-conv.cpp
-
39src/storm-conv/api/storm-conv.cpp
-
5src/storm-conv/api/storm-conv.h
-
2src/storm-conv/settings/ConvSettings.cpp
-
23src/storm-conv/settings/modules/ConversionOutputSettings.cpp
-
17src/storm-conv/settings/modules/ConversionOutputSettings.h
-
42src/storm-conv/settings/modules/PrismExportSettings.cpp
-
32src/storm-conv/settings/modules/PrismExportSettings.h
@ -0,0 +1,42 @@ |
|||
#include "PrismExportSettings.h"
|
|||
|
|||
#include "storm/settings/SettingsManager.h"
|
|||
#include "storm/settings/SettingMemento.h"
|
|||
#include "storm/settings/Option.h"
|
|||
#include "storm/settings/OptionBuilder.h"
|
|||
#include "storm/settings/ArgumentBuilder.h"
|
|||
#include "storm/settings/Argument.h"
|
|||
|
|||
#include <boost/algorithm/string.hpp>
|
|||
|
|||
namespace storm { |
|||
namespace settings { |
|||
namespace modules { |
|||
const std::string PrismExportSettings::moduleName = "exportPrism"; |
|||
|
|||
const std::string PrismExportSettings::exportFlattenOptionName = "flatten"; |
|||
const std::string PrismExportSettings::exportSimplifyOptionName = "simplify"; |
|||
|
|||
PrismExportSettings::PrismExportSettings() : ModuleSettings(moduleName) { |
|||
this->addOption(storm::settings::OptionBuilder(moduleName, exportFlattenOptionName, false, "Flattens the composition of modules to obtain an equivalent program that contains exactly one module").build()); |
|||
this->addOption(storm::settings::OptionBuilder(moduleName, exportSimplifyOptionName, false, "Applies static analysis to simplify the program.").build()); |
|||
} |
|||
|
|||
bool PrismExportSettings::isExportFlattenedSet() const { |
|||
return this->getOption(exportFlattenOptionName).getHasOptionBeenSet(); |
|||
} |
|||
|
|||
bool PrismExportSettings::isSimplifySet() const { |
|||
return this->getOption(exportSimplifyOptionName).getHasOptionBeenSet(); |
|||
} |
|||
|
|||
void PrismExportSettings::finalize() { |
|||
|
|||
} |
|||
|
|||
bool PrismExportSettings::check() const { |
|||
return true; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
#pragma once |
|||
|
|||
#include "storm-config.h" |
|||
#include "storm/settings/modules/ModuleSettings.h" |
|||
|
|||
|
|||
namespace storm { |
|||
namespace settings { |
|||
namespace modules { |
|||
class PrismExportSettings : public ModuleSettings { |
|||
public: |
|||
/*! |
|||
* Creates a new PrismExport setting |
|||
*/ |
|||
PrismExportSettings(); |
|||
|
|||
bool isExportFlattenedSet() const; |
|||
bool isSimplifySet() const; |
|||
|
|||
bool check() const override; |
|||
void finalize() override; |
|||
|
|||
static const std::string moduleName; |
|||
|
|||
private: |
|||
static const std::string exportFlattenOptionName; |
|||
static const std::string exportSimplifyOptionName; |
|||
|
|||
}; |
|||
} |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue