From c85da52e8b6475eaef70e5b252be7fb51f25fd69 Mon Sep 17 00:00:00 2001
From: Jip Spel <jip.spel@cs.rwth-aachen.de>
Date: Mon, 1 Oct 2018 14:07:08 +0200
Subject: [PATCH] Give message when no lattices are created

---
 src/storm-pars-cli/storm-pars.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/storm-pars-cli/storm-pars.cpp b/src/storm-pars-cli/storm-pars.cpp
index ed4e645d3..a32a92f3d 100644
--- a/src/storm-pars-cli/storm-pars.cpp
+++ b/src/storm-pars-cli/storm-pars.cpp
@@ -556,10 +556,15 @@ namespace storm {
 
                 // Monotonicity?
                 storm::utility::Stopwatch monotonicityWatch(true);
-                auto monotonicityChecker = storm::analysis::MonotonicityChecker<ValueType>();
-                monotonicityChecker.checkMonotonicity(result, sparseModel->getTransitionMatrix());
-                monotonicityWatch.stop();
-                STORM_PRINT(std::endl << "Time for monotonicity: " << monotonicityWatch << "." << std::endl << std::endl);
+                if (result.size() > 0) {
+                    auto monotonicityChecker = storm::analysis::MonotonicityChecker<ValueType>();
+                    monotonicityChecker.checkMonotonicity(result, sparseModel->getTransitionMatrix());
+                    monotonicityWatch.stop();
+                } else {
+                    STORM_PRINT(std::endl << "Could not find monotonicity, no lattices created" << std::endl);
+                }
+                STORM_PRINT(std::endl << "Time for monotonicity: " << monotonicityWatch << "." << std::endl
+                                    << std::endl);
 
                 std::cout << "Bye, Jip2" << std::endl;
                 return;