From 31efde52c22c4e64118b076245d9c975604f4b40 Mon Sep 17 00:00:00 2001 From: TimQu Date: Tue, 24 Jul 2018 18:11:25 +0200 Subject: [PATCH] fixed case where no location variables were provided --- .../settings/modules/JaniExportSettings.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/storm-conv/settings/modules/JaniExportSettings.cpp b/src/storm-conv/settings/modules/JaniExportSettings.cpp index e9a9f9882..5e56ed782 100644 --- a/src/storm-conv/settings/modules/JaniExportSettings.cpp +++ b/src/storm-conv/settings/modules/JaniExportSettings.cpp @@ -39,15 +39,17 @@ namespace storm { } std::vector> JaniExportSettings::getLocationVariables() const { - std::string argument = this->getOption(locationVariablesOptionName).getArgumentByName("variables").getValueAsString(); - std::vector arguments; - boost::split( arguments, argument, boost::is_any_of(",")); std::vector> result; - for (auto const& pair : arguments) { - std::vector keyvaluepair; - boost::split( keyvaluepair, pair, boost::is_any_of(".")); - STORM_LOG_THROW(keyvaluepair.size() == 2, storm::exceptions::IllegalArgumentException, "Expected a name of the form AUTOMATON.VARIABLE (with no further dots) but got " << pair); - result.emplace_back(keyvaluepair.at(0), keyvaluepair.at(1)); + if (isLocationVariablesSet()) { + std::string argument = this->getOption(locationVariablesOptionName).getArgumentByName("variables").getValueAsString(); + std::vector arguments; + boost::split( arguments, argument, boost::is_any_of(",")); + for (auto const& pair : arguments) { + std::vector keyvaluepair; + boost::split( keyvaluepair, pair, boost::is_any_of(".")); + STORM_LOG_THROW(keyvaluepair.size() == 2, storm::exceptions::IllegalArgumentException, "Expected a name of the form AUTOMATON.VARIABLE (with no further dots) but got " << pair); + result.emplace_back(keyvaluepair.at(0), keyvaluepair.at(1)); + } } return result; }