10namespace expressions {
13 std::vector<std::shared_ptr<BaseExpression const>>
const& elements)
19 for (
auto const& e : elements) {
25 for (
auto const& e : elements) {
26 if (e->containsVariables()) {
34 std::vector<std::shared_ptr<BaseExpression const>> simplifiedElements;
35 simplifiedElements.reserve(elements.size());
36 for (
auto const& e : elements) {
37 simplifiedElements.push_back(e->simplify());
44 STORM_LOG_THROW(janiVisitor !=
nullptr, storm::exceptions::UnexpectedException,
"Visitor of jani expression should be of type JaniVisitor.");
45 return janiVisitor->visit(*
this, data);
51 for (
auto const& e : elements) {
66 STORM_LOG_THROW(i < elements.size(), storm::exceptions::InvalidArgumentException,
67 "Tried to access the element with index " << i <<
" of an array of size " << elements.size() <<
".");
The base class of all array expressions.
virtual void gatherVariables(std::set< storm::expressions::Variable > &variables) const =0
Retrieves the set of all variables that appear in the expression.
ExpressionManager const & getManager() const
Retrieves the manager responsible for this expression.
Type const & getType() const
Retrieves the type of the expression.
std::shared_ptr< BaseExpression const > const & getBaseExpressionPointer() const
Retrieves a pointer to the base expression underlying this expression object.
This class is responsible for managing a set of typed variables and all expressions using these varia...
Expression integer(int_fast64_t value) const
Creates an expression that characterizes the given integer literal.
Represents an array with a given list of elements.
virtual std::shared_ptr< BaseExpression const > size() const override
virtual std::shared_ptr< BaseExpression const > at(uint64_t i) const override
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
virtual void gatherVariables(std::set< storm::expressions::Variable > &variables) const override
Retrieves the set of all variables that appear in the expression.
ValueArrayExpression(ExpressionManager const &manager, Type const &type, std::vector< std::shared_ptr< BaseExpression const > > const &elements)
virtual bool containsVariables() const override
Retrieves whether the expression contains a variable.
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
#define STORM_LOG_THROW(cond, exception, message)