From 1557983f8b667c260a942ca737b06a25fe9abb1c Mon Sep 17 00:00:00 2001 From: sjunges Date: Tue, 13 Sep 2016 23:58:31 +0200 Subject: [PATCH] Jani Export settings and code Former-commit-id: ccd9955a999f9cc975965e52d4205105177f48d8 [formerly 64edf38f14e2d55de11aaa9df880dcc2f25d3be1] Former-commit-id: 0d3de2ad094cb09471d0d8f820ae4e4d47c09ef0 --- src/cli/cli.cpp | 6 ++++++ src/settings/SettingsManager.cpp | 2 ++ 2 files changed, 8 insertions(+) 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(); } }