From 08f928456cb6c1184f3b5bf8691917bdcfb17eb3 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Mon, 8 Mar 2021 16:18:24 -0800 Subject: [PATCH] fix guard for code that considers transient assignments to also consider only transient assignments --- src/storm/generator/JaniNextStateGenerator.cpp | 2 +- src/storm/storage/jani/OrderedAssignments.cpp | 5 ++++- src/storm/storage/jani/OrderedAssignments.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/storm/generator/JaniNextStateGenerator.cpp b/src/storm/generator/JaniNextStateGenerator.cpp index 66f69c9cb..58a2d9010 100644 --- a/src/storm/generator/JaniNextStateGenerator.cpp +++ b/src/storm/generator/JaniNextStateGenerator.cpp @@ -763,7 +763,7 @@ namespace storm { storm::jani::Edge const& edge = *iteratorList[i]->second; lowestDestinationAssignmentLevel = std::min(lowestDestinationAssignmentLevel, edge.getLowestAssignmentLevel()); highestDestinationAssignmentLevel = std::max(highestDestinationAssignmentLevel, edge.getHighestAssignmentLevel()); - if (!edge.getAssignments().empty()) { + if (!edge.getAssignments().empty(true)) { lowestEdgeAssignmentLevel = std::min(lowestEdgeAssignmentLevel, edge.getAssignments().getLowestLevel(true)); highestEdgeAssignmentLevel = std::max(highestEdgeAssignmentLevel, edge.getAssignments().getHighestLevel(true)); } diff --git a/src/storm/storage/jani/OrderedAssignments.cpp b/src/storm/storage/jani/OrderedAssignments.cpp index 747fbcecd..5d76ae03b 100644 --- a/src/storm/storage/jani/OrderedAssignments.cpp +++ b/src/storm/storage/jani/OrderedAssignments.cpp @@ -87,7 +87,10 @@ namespace storm { return getLowestLevel(onlyTransient) != 0 || getHighestLevel(onlyTransient) != 0; } - bool OrderedAssignments::empty() const { + bool OrderedAssignments::empty(bool onlyTransient) const { + if (onlyTransient) { + return transientAssignments.empty(); + } return allAssignments.empty(); } diff --git a/src/storm/storage/jani/OrderedAssignments.h b/src/storm/storage/jani/OrderedAssignments.h index de914b738..877ea845d 100644 --- a/src/storm/storage/jani/OrderedAssignments.h +++ b/src/storm/storage/jani/OrderedAssignments.h @@ -57,7 +57,7 @@ namespace storm { /*! * Retrieves whether this set of assignments is empty. */ - bool empty() const; + bool empty(bool onlyTransient = false) const; /*! * Removes all assignments from this set.