Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ConstructorArrayExpression.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7namespace expressions {
12 public:
13 ConstructorArrayExpression(ExpressionManager const& manager, Type const& type, std::shared_ptr<BaseExpression const> const& size,
14 storm::expressions::Variable indexVar, std::shared_ptr<BaseExpression const> const& elementExpression);
15
16 // Instantiate constructors and assignments with their default implementations.
21
22 virtual ~ConstructorArrayExpression() = default;
23
24 virtual void gatherVariables(std::set<storm::expressions::Variable>& variables) const override;
25 virtual bool containsVariables() const override;
26 virtual std::shared_ptr<BaseExpression const> simplify() const override;
27 virtual boost::any accept(ExpressionVisitor& visitor, boost::any const& data) const override;
28
29 // Returns the size of the array
30 virtual std::shared_ptr<BaseExpression const> size() const override;
31
32 // Returns the element at position i
33 virtual std::shared_ptr<BaseExpression const> at(uint64_t i) const override;
34
35 std::shared_ptr<BaseExpression const> const& getElementExpression() const;
37
38 protected:
39 virtual void printToStream(std::ostream& stream) const override;
40
41 private:
42 std::shared_ptr<BaseExpression const> sizeExpression;
44 std::shared_ptr<BaseExpression const> elementExpression;
45};
46} // namespace expressions
47} // namespace storm
The base class of all array expressions.
Represents an array of the given size, where the i'th entry is determined by the elementExpression,...
virtual std::shared_ptr< BaseExpression const > size() const override
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
ConstructorArrayExpression(ConstructorArrayExpression const &other)=default
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 > at(uint64_t i) const override
virtual bool containsVariables() const override
Retrieves whether the expression contains a variable.
virtual void gatherVariables(std::set< storm::expressions::Variable > &variables) const override
Retrieves the set of all variables that appear in the expression.
ConstructorArrayExpression(ConstructorArrayExpression &&)=default
ConstructorArrayExpression & operator=(ConstructorArrayExpression const &other)=delete
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
std::shared_ptr< BaseExpression const > const & getElementExpression() const
ConstructorArrayExpression & operator=(ConstructorArrayExpression &&)=delete
storm::expressions::Variable const & getIndexVar() const
This class is responsible for managing a set of typed variables and all expressions using these varia...
LabParser.cpp.
Definition cli.cpp:18