Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
IntegerLiteralExpression.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_EXPRESSIONS_INTEGERLITERALEXPRESSION_H_
2#define STORM_STORAGE_EXPRESSIONS_INTEGERLITERALEXPRESSION_H_
3
6
7namespace storm {
8namespace expressions {
10 public:
17 IntegerLiteralExpression(ExpressionManager const& manager, int_fast64_t value);
18
19 // Instantiate constructors and assignments with their default implementations.
24
25 virtual ~IntegerLiteralExpression() = default;
26
27 // Override base class methods.
28 virtual int_fast64_t evaluateAsInt(Valuation const* valuation = nullptr) const override;
29 virtual double evaluateAsDouble(Valuation const* valuation = nullptr) const override;
30 virtual bool isLiteral() const override;
31 virtual void gatherVariables(std::set<storm::expressions::Variable>& variables) const override;
32 virtual std::shared_ptr<BaseExpression const> simplify() const override;
33 virtual boost::any accept(ExpressionVisitor& visitor, boost::any const& data) const override;
34 virtual bool isIntegerLiteralExpression() const override;
35
41 int_fast64_t getValue() const;
42
43 protected:
44 // Override base class method.
45 virtual void printToStream(std::ostream& stream) const override;
46
47 private:
48 // The value of the integer literal.
49 int_fast64_t value;
50};
51} // namespace expressions
52} // namespace storm
53
54#endif /* STORM_STORAGE_EXPRESSIONS_INTEGERLITERALEXPRESSION_H_ */
The base class of all expression classes.
This class is responsible for managing a set of typed variables and all expressions using these varia...
IntegerLiteralExpression & operator=(IntegerLiteralExpression const &other)=delete
IntegerLiteralExpression(IntegerLiteralExpression &&)=default
virtual void gatherVariables(std::set< storm::expressions::Variable > &variables) const override
Retrieves the set of all variables that appear in the expression.
virtual int_fast64_t evaluateAsInt(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
int_fast64_t getValue() const
Retrieves the value of the integer literal.
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
IntegerLiteralExpression(IntegerLiteralExpression const &other)=default
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
virtual bool isLiteral() const override
Retrieves whether the expression is a literal.
IntegerLiteralExpression & operator=(IntegerLiteralExpression &&)=delete
virtual double evaluateAsDouble(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
The base class of all valuations of variables.
Definition Valuation.h:16
LabParser.cpp.
Definition cli.cpp:18