Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DdMetaVariable.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_DD_DDMETAVARIBLE_H_
2#define STORM_STORAGE_DD_DDMETAVARIBLE_H_
3
4#include <vector>
5
9
10namespace storm {
11namespace dd {
12template<DdType LibraryType>
13class DdManager;
14
15template<DdType LibraryType, typename ValueTpe>
16class Add;
17
18// An enumeration for all legal types of meta variables.
20
21// Declare DdMetaVariable class so we can then specialize it for the different DD types.
22template<DdType LibraryType>
24 public:
25 friend class DdManager<LibraryType>;
26 friend class Bdd<LibraryType>;
27
28 template<DdType LibraryTypePrime, typename ValueTypePrime>
29 friend class Add;
30
31 template<DdType LibraryTypePrime, typename ValueTypePrime>
32 friend class AddIterator;
33
39 std::string const& getName() const;
40
47
53 int_fast64_t getLow() const;
54
60 bool hasHigh() const;
61
67 int_fast64_t getHigh() const;
68
75 bool canRepresent(int_fast64_t value) const;
76
82 std::size_t getNumberOfDdVariables() const;
83
89 Bdd<LibraryType> const& getCube() const;
90
94 uint64_t getLowestIndex() const;
95
99 uint64_t getHighestLevel() const;
100
106 std::vector<uint64_t> getIndices(bool sortedByLevel = true) const;
107
111 std::vector<std::pair<uint64_t, uint64_t>> getIndicesAndLevels() const;
112
113 private:
123 DdMetaVariable(std::string const& name, int_fast64_t low, int_fast64_t high, std::vector<Bdd<LibraryType>> const& ddVariables);
124
132 DdMetaVariable(MetaVariableType const& type, std::string const& name, std::vector<Bdd<LibraryType>> const& ddVariables);
133
137 void precomputeLowestIndex();
138
144 std::vector<Bdd<LibraryType>> const& getDdVariables() const;
145
149 void createCube();
150
151 // The name of the meta variable.
152 std::string name;
153
154 // The type of the variable.
155 MetaVariableType type;
156
157 // The lowest value of the range of the variable.
158 int_fast64_t low;
159
160 // The highest value of the range of the variable.
161 boost::optional<int_fast64_t> high;
162
163 // The vector of variables that are used to encode the meta variable.
164 std::vector<Bdd<LibraryType>> ddVariables;
165
166 // The cube consisting of all variables that encode the meta variable.
167 Bdd<LibraryType> cube;
168
169 // The lowest index of any DD variable of this meta variable.
170 uint64_t lowestIndex;
171};
172} // namespace dd
173} // namespace storm
174
175#endif /* STORM_STORAGE_DD_DDMETAVARIBLE_H_ */
bool hasHigh() const
Retrieves whether the variable has an upper bound.
int_fast64_t getLow() const
Retrieves the lowest value of the range of the variable.
std::vector< std::pair< uint64_t, uint64_t > > getIndicesAndLevels() const
Retrieves the indices and levels of the DD variables associated with this meta variable.
std::string const & getName() const
Retrieves the name of the meta variable.
std::vector< uint64_t > getIndices(bool sortedByLevel=true) const
Retrieves the indices of the DD variables associated with this meta variable.
std::size_t getNumberOfDdVariables() const
Retrieves the number of DD variables for this meta variable.
bool canRepresent(int_fast64_t value) const
Retrieves whether the meta variable can represent the given value.
int_fast64_t getHigh() const
Retrieves the highest value of the range of the variable.
uint64_t getLowestIndex() const
Retrieves the highest index of all DD variables belonging to this meta variable.
MetaVariableType getType() const
Retrieves the type of the meta variable.
uint64_t getHighestLevel() const
Retrieves the highest level of all DD variables belonging to this meta variable.
Bdd< LibraryType > const & getCube() const
Retrieves the cube of all variables that encode this meta variable.
LabParser.cpp.
Definition cli.cpp:18