Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
IntegerLiteralExpression.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7namespace expressions {
9 public:
16 IntegerLiteralExpression(ExpressionManager const& manager, int_fast64_t value);
17
18 // Instantiate constructors and assignments with their default implementations.
23
24 virtual ~IntegerLiteralExpression() = default;
25
26 // Override base class methods.
27 virtual int_fast64_t evaluateAsInt(Valuation const* valuation = nullptr) const override;
28 virtual double evaluateAsDouble(Valuation const* valuation = nullptr) const override;
29 virtual bool isLiteral() const override;
30 virtual void gatherVariables(std::set<storm::expressions::Variable>& variables) const override;
31 virtual std::shared_ptr<BaseExpression const> simplify() const override;
32 virtual boost::any accept(ExpressionVisitor& visitor, boost::any const& data) const override;
33 virtual bool isIntegerLiteralExpression() const override;
34
40 int_fast64_t getValue() const;
41
42 protected:
43 // Override base class method.
44 virtual void printToStream(std::ostream& stream) const override;
45
46 private:
47 // The value of the integer literal.
48 int_fast64_t value;
49};
50} // namespace expressions
51} // namespace storm
BaseExpression(ExpressionManager const &manager, Type const &type)
Constructs a base expression with the given return type.
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(ExpressionManager const &manager, int_fast64_t value)
Creates an integer literal expression with the given value.
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:15