Browse Source

simplified a constructor for assignments for simpler code

tempestpy_adaptions
Sebastian Junges 6 years ago
parent
commit
7b1d7507c4
  1. 4
      src/storm/storage/jani/Assignment.cpp
  2. 5
      src/storm/storage/jani/Assignment.h

4
src/storm/storage/jani/Assignment.cpp

@ -14,6 +14,10 @@ namespace storm {
Assignment::Assignment(storm::jani::LValue const& lValue, storm::expressions::Expression const& expression, int64_t level) : lValue(lValue), expression(expression), level(level) {
// Intentionally left empty
}
Assignment::Assignment(storm::jani::Variable const& lValue, storm::expressions::Expression const& expression, int64_t level) : lValue(lValue), expression(expression), level(level) {
// Intentionally left empty
}
bool Assignment::operator==(Assignment const& other) const {
return this->isTransient() == other.isTransient() && this->getLValue() == other.getLValue() && this->getAssignedExpression().isSyntacticallyEqual(other.getAssignedExpression()) && this->getLevel() == other.getLevel();

5
src/storm/storage/jani/Assignment.h

@ -15,6 +15,11 @@ namespace storm {
*/
Assignment(storm::jani::LValue const& lValue, storm::expressions::Expression const& expression, int64_t level = 0);
/*!
* Creates an assignment of the given expression to the given Variable.
*/
Assignment(storm::jani::Variable const& lValue, storm::expressions::Expression const&, int64_t level = 0);
Assignment(Assignment const&) = default;
bool operator==(Assignment const& other) const;

Loading…
Cancel
Save