From 4920eaaaeafa94177e75732bbe65404d998a573e Mon Sep 17 00:00:00 2001 From: sjunges Date: Thu, 8 Dec 2016 00:22:58 +0100 Subject: [PATCH] do not allow edges with no destinations in jani --- src/storm/storage/jani/JSONExporter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storm/storage/jani/JSONExporter.cpp b/src/storm/storage/jani/JSONExporter.cpp index 037222fe5..7548fd323 100644 --- a/src/storm/storage/jani/JSONExporter.cpp +++ b/src/storm/storage/jani/JSONExporter.cpp @@ -650,6 +650,7 @@ namespace storm { } modernjson::json buildDestinations(std::vector const& destinations, std::map const& locationNames) { + assert(destinations.size() > 0); std::vector destDeclarations; for(auto const& destination : destinations) { modernjson::json destEntry; @@ -664,6 +665,10 @@ namespace storm { modernjson::json buildEdges(std::vector const& edges , std::map const& actionNames, std::map const& locationNames) { std::vector edgeDeclarations; for(auto const& edge : edges) { + if (edge.getGuard().isFalse()) { + continue; + } + STORM_LOG_THROW(edge.getDestinations().size() > 0, storm::exceptions::InvalidJaniException, "An edge without destinations is not allowed."); modernjson::json edgeEntry; edgeEntry["location"] = locationNames.at(edge.getSourceLocationIndex()); if(!edge.hasSilentAction()) {