From 2c9cefe7cceb55d8ffc79cf00002625cbf9ffccb Mon Sep 17 00:00:00 2001 From: Jip Spel Date: Fri, 7 Sep 2018 09:23:33 +0200 Subject: [PATCH] Use predefined constants --- src/storm-pars/analysis/MonotonicityChecker.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storm-pars/analysis/MonotonicityChecker.cpp b/src/storm-pars/analysis/MonotonicityChecker.cpp index 4d490ae9b..a925bc555 100644 --- a/src/storm-pars/analysis/MonotonicityChecker.cpp +++ b/src/storm-pars/analysis/MonotonicityChecker.cpp @@ -91,14 +91,14 @@ namespace storm { auto compare = lattice->compare(first.getColumn(), second.getColumn()); std::pair* value = &varsMonotone.find(*itr)->second; std::pair old = *value; - if (compare == 1) { + if (compare == storm::analysis::Lattice::ABOVE) { value->first &=derivative.constantPart() >= 0; value->second &=derivative.constantPart() <= 0; - } else if (compare == 2) { + } else if (compare == storm::analysis::Lattice::BELOW) { value->first &=derivative.constantPart() <= 0; value->second &=derivative.constantPart() >= 0; - } else if (compare == 0) { - STORM_LOG_THROW(false, storm::exceptions::UnexpectedException, "Don't know what is happening, something in monotonicity checking went wrong"); + } else if (compare == storm::analysis::Lattice::SAME) { + // Behaviour doesn't matter, as they are at the same level } else { value->first = false; value->second = false;