Storm 1.11.1.1
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 "multi-objective-properties";
21 return "trigonometric-functions";
22 }
23 STORM_LOG_ASSERT(false, "Unhandled model feature");
24 return "Unhandled-feature";
25}
26
27std::string ModelFeatures::toString() const {
28 std::string res = "[";
29 bool first = true;
30 for (auto const& f : features) {
31 if (!first) {
32 res += ", ";
33 }
34 res += "\"" + storm::jani::toString(f) + "\"";
35 first = false;
36 }
37 res += "]";
38 return res;
39}
40
42 return features.count(ModelFeature::Arrays) > 0;
43}
44
46 return features.count(ModelFeature::DerivedOperators) > 0;
47}
48
50 return features.count(ModelFeature::Functions) > 0;
51}
52
54 return features.count(ModelFeature::StateExitRewards) > 0;
55}
56
60
64
65std::set<ModelFeature> const& ModelFeatures::asSet() const {
66 return features;
67}
68
70 return features.empty();
71}
72
74 features.insert(modelFeature);
75 return *this;
76}
77
78void ModelFeatures::remove(ModelFeature const& modelFeature) {
79 features.erase(modelFeature);
80}
81
91} // namespace jani
92} // namespace storm
std::set< ModelFeature > const & asSet() const
std::string toString() const
bool hasTrigonometricFunctions() const
bool hasMultiObjectiveProperties() 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()