10 std::shared_ptr<BaseExpression const>
const& indexExpression)
15 "The ArrayAccessExpression should have type " <<
getFirstOperand()->
getType().getElementType() <<
" but has " << type <<
" instead.");
20 return std::shared_ptr<BaseExpression const>(
26 STORM_LOG_ASSERT(janiVisitor !=
nullptr,
"Visitor of jani expression should be of type JaniVisitor.");
27 STORM_LOG_THROW(janiVisitor !=
nullptr, storm::exceptions::UnexpectedException,
"Visitor of jani expression should be of type JaniVisitor.");
28 return janiVisitor->visit(*
this, data);
Represents an access to an array.
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
ArrayAccessExpression(ExpressionManager const &manager, Type const &type, std::shared_ptr< BaseExpression const > const &arrayExpression, std::shared_ptr< BaseExpression const > const &indexExpression)
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
ExpressionManager const & getManager() const
Retrieves the manager responsible for this expression.
virtual bool isVariable() const
Retrieves whether the expression is a variable.
Type const & getType() const
Retrieves the type of the expression.
The base class of all binary expressions.
std::shared_ptr< BaseExpression const > const & getSecondOperand() const
Retrieves the second operand of the expression.
std::shared_ptr< BaseExpression const > const & getFirstOperand() const
Retrieves the first operand of the expression.
This class is responsible for managing a set of typed variables and all expressions using these varia...
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)