15 : lValue(lValue), expression(expression), level(level) {
20 : lValue(lValue), expression(expression), level(level) {
58 this->expression = expression;
65void Assignment::substitute(std::map<storm::expressions::Variable, storm::expressions::Expression>
const& substitution,
66 bool const substituteTranscendentalNumbers) {
69 std::vector<storm::expressions::Expression> substitutedExpressions;
93 stream <<
"@" << assignment.
getLevel() <<
": ";
104 return left.
getLevel() < right->getLevel() || (left.
getLevel() == right->getLevel() && left.
getLValue() < right->getLValue());
108 return left->getLevel() < right->getLevel() || (left->getLevel() == right->getLevel() && left->getLValue() < right->getLValue());
112 return left->getLevel() < right.
getLevel() || (left->getLevel() == right.
getLevel() && left->getLValue() < right.
getLValue());
Expression simplify() const
Simplifies the expression according to some basic rules.
bool isSyntacticallyEqual(storm::expressions::Expression const &other) const
Checks whether the two expressions are syntatically the same.
bool check(Expression const &expression, bool booleanIsLinear=false)
Checks that the given expression is linear.
storm::expressions::Expression const & getAssignedExpression() const
Retrieves the expression whose value is assigned to the target variable.
storm::jani::LValue const & getLValue() const
Retrieves the lValue that is written in this assignment.
storm::expressions::Variable const & getExpressionVariable() const
Retrieves the expression variable that is written in this assignment.
bool lValueIsArrayAccess() const
Returns true if the lValue is an array access.
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 LValue.
void setAssignedExpression(storm::expressions::Expression const &expression)
Sets a new expression that is assigned to the target LValue.
bool lValueIsVariable() const
Returns true if the lValue is a variable.
bool isLinear() const
Checks the assignment for linearity.
storm::jani::Variable const & getVariable() const
Retrieves the Variable that is written in this assignment.
int64_t getLevel() const
Retrieves the level of the assignment.
bool operator==(Assignment const &other) const
void substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution, bool const substituteTranscendentalNumbers)
Substitutes all variables in all expressions according to the given substitution.
bool isTransient() const
Retrieves whether the assignment assigns to a transient variable.
void setLevel(int64_t level)
Sets the level.
std::vector< storm::expressions::Expression > & getArrayIndexVector()
Returns the referred variable. In case of an array access, this is the referred array variable.
bool isArrayAccess() const
Returns true if the lValue refers either to an array variable or to an array access.
storm::jani::Variable const & getVariable() const
To check if the array is fully accessed, so result will be of the most inner child Type....
storm::expressions::Variable const & getExpressionVariable() const
Retrieves the associated expression variable.
storm::expressions::Expression substituteJaniExpression(storm::expressions::Expression const &expression, std::map< storm::expressions::Variable, storm::expressions::Expression > const &identifierToExpressionMap, bool const substituteTranscendentalNumbers)
std::ostream & operator<<(std::ostream &stream, Assignment const &assignment)
bool operator()(Assignment const &left, Assignment const &right) const