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 const& substitution); - + private: // The name of the variable. std::string name; @@ -103,6 +103,9 @@ namespace storm { /// Expression for initial values boost::optional init; }; + + bool operator==(Variable const& lhs, Variable const& rhs); + bool operator!=(Variable const& lhs, Variable const& rhs); } }