From eb8240bfff5ec77427fd14db93f826e2fa53c3eb Mon Sep 17 00:00:00 2001
From: Jip Spel <jip.spel@cs.rwth-aachen.de>
Date: Mon, 1 Oct 2018 13:52:44 +0200
Subject: [PATCH] Add message when no parameters occur in final model

---
 .../analysis/MonotonicityChecker.cpp          | 29 +++++++++++--------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/storm-pars/analysis/MonotonicityChecker.cpp b/src/storm-pars/analysis/MonotonicityChecker.cpp
index 30ca4f110..3a97e200b 100644
--- a/src/storm-pars/analysis/MonotonicityChecker.cpp
+++ b/src/storm-pars/analysis/MonotonicityChecker.cpp
@@ -41,20 +41,25 @@ namespace storm {
                 }
 
                 std::map<carl::Variable, std::pair<bool, bool>> varsMonotone = analyseMonotonicity(i, lattice, matrix);
-                for (auto itr2 = varsMonotone.begin(); itr2 != varsMonotone.end(); ++itr2) {
-                    if (itr2->second.first) {
-                        STORM_PRINT("  - Monotone increasing in: " << itr2->first << std::endl);
-                    } else {
-                        STORM_PRINT("  - Do not know if monotone increasing in: " << itr2->first << std::endl);
-                    }
-                    if (itr2->second.second) {
-                        STORM_PRINT("  - Monotone decreasing in: " << itr2->first << std::endl);
-                    } else {
-                        STORM_PRINT("  - Do not know if monotone decreasing in: " << itr2->first << std::endl);
+                if (varsMonotone.size() == 0) {
+                    STORM_PRINT("Result is constant" << std::endl);
+                } else {
+                    for (auto itr2 = varsMonotone.begin(); itr2 != varsMonotone.end(); ++itr2) {
+                        if (itr2->second.first) {
+                            STORM_PRINT("  - Monotone increasing in: " << itr2->first << std::endl);
+                        } else {
+                            STORM_PRINT("  - Do not know if monotone increasing in: " << itr2->first << std::endl);
+                        }
+                        if (itr2->second.second) {
+                            STORM_PRINT("  - Monotone decreasing in: " << itr2->first << std::endl);
+                        } else {
+                            STORM_PRINT("  - Do not know if monotone decreasing in: " << itr2->first << std::endl);
+                        }
                     }
+                    result.insert(
+                            std::pair<storm::analysis::Lattice *, std::map<carl::Variable, std::pair<bool, bool>>>(
+                                    lattice, varsMonotone));
                 }
-                result.insert(std::pair<storm::analysis::Lattice *, std::map<carl::Variable, std::pair<bool, bool>>>(
-                                        lattice, varsMonotone));
                 ++i;
             }
             return result;