Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ModelFeatures.cpp
Go to the documentation of this file.
2
4
5namespace storm {
6namespace jani {
7
8std::string toString(ModelFeature const& modelFeature) {
9 switch (modelFeature) {
11 return "arrays";
13 return "derived-operators";
15 return "functions";
17 return "state-exit-rewards";
19 return "trigonometric-functions";
20 }
21 STORM_LOG_ASSERT(false, "Unhandled model feature");
22 return "Unhandled-feature";
23}
24
25std::string ModelFeatures::toString() const {
26 std::string res = "[";
27 bool first = true;
28 for (auto const& f : features) {
29 if (!first) {
30 res += ", ";
31 }
32 res += "\"" + storm::jani::toString(f) + "\"";
33 first = false;
34 }
35 res += "]";
36 return res;
37}
38
40 return features.count(ModelFeature::Arrays) > 0;
41}
42
44 return features.count(ModelFeature::DerivedOperators) > 0;
45}
46
48 return features.count(ModelFeature::Functions) > 0;
49}
50
52 return features.count(ModelFeature::StateExitRewards) > 0;
53}
54
58
59std::set<ModelFeature> const& ModelFeatures::asSet() const {
60 return features;
61}
62
64 return features.empty();
65}
66
68 features.insert(modelFeature);
69 return *this;
70}
71
72void ModelFeatures::remove(ModelFeature const& modelFeature) {
73 features.erase(modelFeature);
74}
75
84} // namespace jani
85} // namespace storm
std::set< ModelFeature > const & asSet() const
std::string toString() const
bool hasTrigonometricFunctions() const
ModelFeatures & add(ModelFeature const &modelFeature)
void remove(ModelFeature const &modelFeature)
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
std::string toString(ModelFeature const &modelFeature)
ModelFeatures getAllKnownModelFeatures()
LabParser.cpp.
Definition cli.cpp:18