Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
IntegerVariable.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
6
7namespace storm {
8namespace prism {
9class IntegerVariable : public Variable {
10 public:
11 // Create default implementations of constructors/assignment.
12 IntegerVariable() = default;
13 IntegerVariable(IntegerVariable const& other) = default;
14 IntegerVariable& operator=(IntegerVariable const& other) = default;
15 IntegerVariable(IntegerVariable&& other) = default;
17
28 IntegerVariable(storm::expressions::Variable const& variable, storm::expressions::Expression const& lowerBoundExpression,
29 storm::expressions::Expression const& upperBoundExpression, storm::expressions::Expression const& initialValueExpression, bool observable,
30 std::string const& filename = "", uint_fast64_t lineNumber = 0);
31
35 bool hasLowerBoundExpression() const;
36
43
47 bool hasUpperBoundExpression() const;
48
55
64
71 IntegerVariable substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) const;
72
74
75 virtual void createMissingInitialValue() override;
76
77 friend std::ostream& operator<<(std::ostream& stream, IntegerVariable const& variable);
78
79 private:
80 // A constant expression that specifies the lower bound of the domain of the variable.
81 storm::expressions::Expression lowerBoundExpression;
82
83 // A constant expression that specifies the upper bound of the domain of the variable.
84 storm::expressions::Expression upperBoundExpression;
85};
86
87} // namespace prism
88} // namespace storm
friend std::ostream & operator<<(std::ostream &stream, IntegerVariable const &variable)
IntegerVariable(IntegerVariable &&other)=default
storm::expressions::Expression getRangeExpression() const
Retrieves an expression characterizing the legal range of the variable.
storm::expressions::Expression const & getUpperBoundExpression() const
Retrieves an expression defining the upper bound for this integer variable.
storm::expressions::Expression const & getLowerBoundExpression() const
Retrieves an expression defining the lower bound for this integer variable.
IntegerVariable substituteNonStandardPredicates() const
IntegerVariable(IntegerVariable const &other)=default
IntegerVariable & operator=(IntegerVariable &&other)=default
virtual void createMissingInitialValue() override
Equips the variable with an initial value based on its type if not initial value is present.
IntegerVariable & operator=(IntegerVariable const &other)=default
IntegerVariable substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
Substitutes all identifiers in the boolean variable according to the given map.
Variable(Variable const &otherVariable)=default