From 66dc10632271ad808c364daea3a3d9ba5e358ec8 Mon Sep 17 00:00:00 2001 From: sjunges Date: Sat, 17 Sep 2016 13:45:11 +0200 Subject: [PATCH] check whether assignment is deterministic Former-commit-id: c0ca4a3bbf9018fcb22142cdb420442bebfecb5c [formerly 8ae48734e2477373f86eb13bf344dbe8efde8ad5] Former-commit-id: 8362f5731b12fcc95cd097903a304ae8c8453c9b --- src/storage/pgcl/AssignmentStatement.cpp | 11 ++++------- src/storage/pgcl/AssignmentStatement.h | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/storage/pgcl/AssignmentStatement.cpp b/src/storage/pgcl/AssignmentStatement.cpp index cbecc1cdb..17f55ba21 100755 --- a/src/storage/pgcl/AssignmentStatement.cpp +++ b/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 const& AssignmentStatement::getExpression() const { return this->expression; } diff --git a/src/storage/pgcl/AssignmentStatement.h b/src/storage/pgcl/AssignmentStatement.h index 1ca52d51d..4c1af99ab 100755 --- a/src/storage/pgcl/AssignmentStatement.h +++ b/src/storage/pgcl/AssignmentStatement.h @@ -32,6 +32,8 @@ namespace storm { * @return The expression of the assignment. */ boost::variant const& getExpression() const; + + bool isDeterministic() const; /** * Returns the left hand variable of the assignemnt. * @return The variable to which the expression is assigned.