Browse Source

check whether assignment is deterministic

Former-commit-id: c0ca4a3bbf [formerly 8ae48734e2]
Former-commit-id: 8362f5731b
main
sjunges 9 years ago
parent
commit
66dc106322
  1. 11
      src/storage/pgcl/AssignmentStatement.cpp
  2. 2
      src/storage/pgcl/AssignmentStatement.h

11
src/storage/pgcl/AssignmentStatement.cpp

@ -1,10 +1,3 @@
/*
* File: AssignmentStatement.cpp
* Author: Lukas Westhofen
*
* Created on 11. April 2015, 17:42
*/
#include "src/storage/pgcl/AssignmentStatement.h"
namespace storm {
@ -13,6 +6,10 @@ namespace storm {
variable(variable), expression(expression) {
}
bool AssignmentStatement::isDeterministic() const {
return expression.which() == 0;
}
boost::variant<storm::expressions::Expression, storm::pgcl::UniformExpression> const& AssignmentStatement::getExpression() const {
return this->expression;
}

2
src/storage/pgcl/AssignmentStatement.h

@ -32,6 +32,8 @@ namespace storm {
* @return The expression of the assignment.
*/
boost::variant<storm::expressions::Expression, storm::pgcl::UniformExpression> const& getExpression() const;
bool isDeterministic() const;
/**
* Returns the left hand variable of the assignemnt.
* @return The variable to which the expression is assigned.

Loading…
Cancel
Save