From 4ad2ac26d19c45d9f02e5826078e750d9d2380ba Mon Sep 17 00:00:00 2001
From: sjunges <sebastian.junges@gmail.com>
Date: Wed, 8 Feb 2017 22:57:20 +0100
Subject: [PATCH] Equality Comparisons for JaniVars, just to make life easier
 :-)

---
 src/storm/storage/jani/Variable.cpp | 9 ++++++++-
 src/storm/storage/jani/Variable.h   | 5 ++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/storm/storage/jani/Variable.cpp b/src/storm/storage/jani/Variable.cpp
index a4184b5a0..00f867ac2 100644
--- a/src/storm/storage/jani/Variable.cpp
+++ b/src/storm/storage/jani/Variable.cpp
@@ -101,6 +101,13 @@ namespace storm {
                 this->setInitExpression(this->getInitExpression().substitute(substitution));
             }
         }
-        
+
+        bool operator==(Variable const& lhs, Variable const& rhs) {
+            return lhs.getExpressionVariable() == rhs.getExpressionVariable();
+        }
+
+        bool operator!=(Variable const& lhs, Variable const& rhs) {
+            return !(lhs == rhs);
+        }
     }
 }
diff --git a/src/storm/storage/jani/Variable.h b/src/storm/storage/jani/Variable.h
index 9e403828a..010b37449 100644
--- a/src/storm/storage/jani/Variable.h
+++ b/src/storm/storage/jani/Variable.h
@@ -89,7 +89,7 @@ namespace storm {
              * Substitutes all variables in all expressions according to the given substitution.
              */
             virtual void substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution);
-            
+
         private:
             // The name of the variable.
             std::string name;
@@ -103,6 +103,9 @@ namespace storm {
             /// Expression for initial values
             boost::optional<storm::expressions::Expression> init;
         };
+
+        bool operator==(Variable const& lhs, Variable const& rhs);
+        bool operator!=(Variable const& lhs, Variable const& rhs);
         
     }
 }