From 30d30a063ca47008afa32479d7ea6dcbb9ad07b1 Mon Sep 17 00:00:00 2001 From: TimQu Date: Mon, 30 Jul 2018 14:15:00 +0200 Subject: [PATCH] setting jani conversion options from settings --- src/storm-conv-cli/storm-conv.cpp | 4 +--- src/storm-conv/converter/options/JaniConversionOptions.cpp | 4 ++++ src/storm-conv/converter/options/JaniConversionOptions.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/storm-conv-cli/storm-conv.cpp b/src/storm-conv-cli/storm-conv.cpp index 211c727d0..e1199cc1d 100644 --- a/src/storm-conv-cli/storm-conv.cpp +++ b/src/storm-conv-cli/storm-conv.cpp @@ -48,9 +48,7 @@ namespace storm { storm::converter::PrismToJaniConverterOptions options; options.allVariablesGlobal = true; options.suffix = ""; - options.janiOptions.standardCompliant = jani.isExportAsStandardJaniSet(); - options.janiOptions.locationVariables = jani.getLocationVariables(); - options.janiOptions.exportFlattened = jani.isExportFlattenedSet(); + options.janiOptions = storm::converter::JaniConversionOptions(jani); auto janiModelProperties = storm::api::convertPrismToJani(prismProg, properties, options); std::string outputFilename = ""; diff --git a/src/storm-conv/converter/options/JaniConversionOptions.cpp b/src/storm-conv/converter/options/JaniConversionOptions.cpp index 8e9ba344d..7b72c4797 100644 --- a/src/storm-conv/converter/options/JaniConversionOptions.cpp +++ b/src/storm-conv/converter/options/JaniConversionOptions.cpp @@ -6,6 +6,10 @@ namespace storm { JaniConversionOptions::JaniConversionOptions() : standardCompliant(false), exportFlattened(false) { // Intentionally left empty }; + + JaniConversionOptions::JaniConversionOptions(storm::settings::modules::JaniExportSettings const& settings) : locationVariables(settings.getLocationVariables()), standardCompliant(settings.isExportAsStandardJaniSet()), exportFlattened(settings.isExportFlattenedSet()) { + // Intentionally left empty + }; } } diff --git a/src/storm-conv/converter/options/JaniConversionOptions.h b/src/storm-conv/converter/options/JaniConversionOptions.h index ddd0d88cc..bb809f1ea 100644 --- a/src/storm-conv/converter/options/JaniConversionOptions.h +++ b/src/storm-conv/converter/options/JaniConversionOptions.h @@ -2,6 +2,7 @@ #include #include +#include "storm-conv/settings/modules/JaniExportSettings.h" namespace storm { namespace converter { @@ -9,6 +10,7 @@ namespace storm { struct JaniConversionOptions { JaniConversionOptions(); + JaniConversionOptions(storm::settings::modules::JaniExportSettings const& settings); /// (Automaton,Variable)-pairs that will be transformed to location variables of the respective automaton. std::vector> locationVariables;