diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 755674cd1..6b4c93fdf 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -9,8 +9,10 @@ #include "src/settings/modules/IOSettings.h" #include "src/settings/modules/CoreSettings.h" #include "src/exceptions/OptionParserException.h" +#include "src/settings/modules/JaniExportSettings.h" #include "src/utility/storm-version.h" +#include "src/storage/jani/JSONExporter.h" // Includes for the linked libraries and versions header. @@ -220,6 +222,10 @@ namespace storm { model = storm::parseJaniModel(ioSettings.getJaniInputFilename()).first; } + if(model.isJaniModel() && storm::settings::getModule().isJaniFileSet()) { + storm::jani::JsonExporter::toFile(model.asJaniModel(), storm::settings::getModule().getJaniFilename()); + } + // Get the string that assigns values to the unknown currently undefined constants in the model. std::string constantDefinitionString = ioSettings.getConstantDefinitionString(); model = model.preprocess(constantDefinitionString); diff --git a/src/settings/SettingsManager.cpp b/src/settings/SettingsManager.cpp index 625637fdd..2aba99492 100644 --- a/src/settings/SettingsManager.cpp +++ b/src/settings/SettingsManager.cpp @@ -33,6 +33,7 @@ #include "src/settings/modules/RegionSettings.h" #include "src/settings/modules/TopologicalValueIterationEquationSolverSettings.h" #include "src/settings/modules/ExplorationSettings.h" +#include "src/settings/modules/JaniExportSettings.h" #include "src/utility/macros.h" #include "src/settings/Option.h" @@ -524,6 +525,7 @@ namespace storm { storm::settings::addModule(); storm::settings::addModule(); storm::settings::addModule(); + storm::settings::addModule(); } }