From 435bf79c2d741ffc9d86d8512c12d5a74270af3b Mon Sep 17 00:00:00 2001 From: sjunges Date: Fri, 20 May 2016 23:43:49 +0200 Subject: [PATCH] some minor extension Former-commit-id: 21a5fa7be3e621b316231eb2ec113d1d40b52baf --- src/parser/JaniParser.cpp | 2 +- src/storage/jani/Model.cpp | 28 +++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/parser/JaniParser.cpp b/src/parser/JaniParser.cpp index 7f7ee03fc..bf03db99d 100644 --- a/src/parser/JaniParser.cpp +++ b/src/parser/JaniParser.cpp @@ -56,7 +56,7 @@ namespace storm { } std::shared_ptr JaniParser::parseComposition(json const &compositionStructure) { - + } } } \ No newline at end of file diff --git a/src/storage/jani/Model.cpp b/src/storage/jani/Model.cpp index 337dd7c39..f3ffb108a 100644 --- a/src/storage/jani/Model.cpp +++ b/src/storage/jani/Model.cpp @@ -6,9 +6,31 @@ namespace storm { Model::Model(ModelType const& modelType, uint64_t version) : modelType(modelType), version(version) { // Intentionally left empty. } - - bool Model::isValid(bool logDebug) const { - // TODO. + + void Model::checkSupported() { + //TODO + } + + bool Model::checkValidity(bool logdbg) { + // TODO switch to exception based return value. + + if (version == 0) { + if(logdbg) STORM_LOG_DEBUG("Jani version is unspecified"); + return false; + } + + if(modelType == ModelType::UNDEFINED) { + if(logdbg) STORM_LOG_DEBUG("Model type is unspecified"); + return false; + } + + if(automata.empty()) { + if(logdbg) STORM_LOG_DEBUG("No automata specified"); + return false; + } + // All checks passed. + return true; + } }