25#include <boost/algorithm/string.hpp>
59 if (!gspnSettings.isGspnFileSet()) {
64 std::string constantDefinitionString =
"";
65 if (gspnSettings.isConstantsSet()) {
66 constantDefinitionString = gspnSettings.getConstantDefinitionString();
71 std::string formulaString =
"";
75 boost::optional<std::set<std::string>> propertyFilter;
80 if (!gspn->isValid()) {
84 if (gspnSettings.isCapacitiesFileSet()) {
86 gspn->setCapacities(capacities);
87 }
else if (gspnSettings.isCapacitySet()) {
88 uint64_t capacity = gspnSettings.getCapacity();
89 std::unordered_map<std::string, uint64_t> capacities;
90 for (
auto const& place : gspn->getPlaces()) {
91 capacities.emplace(place.getName(), capacity);
93 gspn->setCapacities(capacities);
106int main(
const int argc,
const char** argv) {
110 STORM_LOG_ERROR(
"An exception caused Storm to terminate. The message of the exception is: " << exception.
what());
112 }
catch (std::exception
const& exception) {
113 STORM_LOG_ERROR(
"An unexpected exception occurred and caused Storm to terminate. The message of this exception is: " << exception.
what());
This class represents the base class of all exception classes.
virtual const char * what() const noexcept override
Retrieves the message associated with this exception.
static storm::gspn::GSPN * parse(std::string const &filename, std::string const &constantDefinitions="")
void setName(std::string const &name, std::string const &executableName)
Sets the name of the tool.
#define STORM_LOG_ERROR(message)
std::vector< storm::jani::Property > parseProperties(storm::parser::FormulaParser &formulaParser, std::string const &inputString, boost::optional< std::set< std::string > > const &propertyFilter)
void handleGSPNExportSettings(storm::gspn::GSPN const &gspn, std::function< std::vector< storm::jani::Property >(storm::builder::JaniGSPNBuilder const &)> const &janiProperyGetter)
std::unordered_map< std::string, uint64_t > parseCapacitiesList(std::string const &filename, storm::gspn::GSPN const &gspn)
std::vector< storm::jani::Property > substituteConstantsInProperties(std::vector< storm::jani::Property > const &properties, std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution)
int process(std::string const &name, std::string const &executableName, std::function< void(std::string const &, std::string const &)> initSettingsFunc, std::function< void(void)> processOptionsFunc, const int argc, const char **argv)
Processes the options and returns the exit code.
SettingsType const & getModule()
Get module.
void addModule(bool doRegister=true)
Add new module to use for the settings.
SettingsManager & mutableManager()
Retrieves the settings manager.
void initializeSettings(std::string const &name, std::string const &executableName)
Initialize the settings manager.
int main(const int argc, const char **argv)