From 10ae6a0dd8967807d27c3f502bf4703ca39050bb Mon Sep 17 00:00:00 2001 From: TimQu Date: Mon, 17 Sep 2018 09:57:48 +0200 Subject: [PATCH] fixed not respecting negative assignment indices in array eliminator --- src/storm/storage/jani/ArrayEliminator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storm/storage/jani/ArrayEliminator.cpp b/src/storm/storage/jani/ArrayEliminator.cpp index 16e0c5671..811cb447d 100644 --- a/src/storm/storage/jani/ArrayEliminator.cpp +++ b/src/storm/storage/jani/ArrayEliminator.cpp @@ -468,7 +468,7 @@ namespace storm { // Replace array occurrences in LValues and assigned expressions. std::vector newAssignments; - uint64_t level = 0; + int64_t level = orderedAssignments.getLowestLevel(); std::unordered_map> collectedArrayAccessAssignments; for (Assignment const& assignment : orderedAssignments) { if (assignment.getLevel() != level) { @@ -563,7 +563,7 @@ namespace storm { return nullptr; } - void insertLValueArrayAccessReplacements(std::vector const& arrayAccesses, std::vector const& arrayVariableReplacements, uint64_t level, std::vector& newAssignments) const { + void insertLValueArrayAccessReplacements(std::vector const& arrayAccesses, std::vector const& arrayVariableReplacements, int64_t level, std::vector& newAssignments) const { storm::expressions::Variable const& arrayVariable = arrayAccesses.front()->getLValue().getArray().getExpressionVariable(); bool onlyConstantIndices = true; for (auto const& aa : arrayAccesses) {