Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MonotonicityResult.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <memory>
5#include <ostream>
6#include <set>
7
10
11namespace storm {
12namespace analysis {
13template<typename VariableType>
15 public:
17
22
29 void addMonotonicityResult(VariableType var, Monotonicity mon);
30
37 void updateMonotonicityResult(VariableType var, Monotonicity mon, bool force = false);
38
45 Monotonicity getMonotonicity(VariableType var) const;
46 bool isMonotone(VariableType var) const;
47
53 std::map<VariableType, Monotonicity> const& getMonotonicityResult() const;
54
55 void splitBasedOnMonotonicity(std::set<VariableType> const& consideredVariables, std::set<VariableType>& monotoneIncr, std::set<VariableType>& monotoneDecr,
56 std::set<VariableType>& notMontone) const;
57
58 std::pair<std::set<VariableType>, std::set<VariableType>> splitVariables(std::set<VariableType> const& consideredVariables) const;
64 std::string toString() const;
65
69 bool isDone() const;
70
71 bool isDoneForVar(VariableType) const;
72
76 bool existsMonotonicity();
77
81 bool isAllMonotonicity() const;
82
86 void setDone(bool done = true);
87
91 void setSomewhereMonotonicity(bool done = true);
92
96 void setAllMonotonicity(bool done = true);
97
98 void setDoneForVar(VariableType);
99
100 void setDoneVariables(std::set<VariableType> doneVariables);
101
107 std::shared_ptr<MonotonicityResult<VariableType>> copy() const;
108
109 private:
110 std::map<VariableType, Monotonicity> monotonicityResult;
111 std::set<VariableType> doneVariables;
112 bool done;
113 bool somewhereMonotonicity;
114 bool allMonotonicity;
115};
116
117} // namespace analysis
118} // namespace storm
std::map< VariableType, Monotonicity > const & getMonotonicityResult() const
Returns the results so far.
void splitBasedOnMonotonicity(std::set< VariableType > const &consideredVariables, std::set< VariableType > &monotoneIncr, std::set< VariableType > &monotoneDecr, std::set< VariableType > &notMontone) const
void setDone(bool done=true)
Sets the done bool to the given truth value.
MonotonicityResult()
Constructs a new MonotonicityResult object.
void addMonotonicityResult(VariableType var, Monotonicity mon)
Adds a new variable with a given Monotonicity to the map.
void setAllMonotonicity(bool done=true)
Sets the allMonotonicity bool to the given truth value.
Monotonicity getMonotonicity(VariableType var) const
Returns the current monotonicity of a given parameter.
void setSomewhereMonotonicity(bool done=true)
Sets the somewhereMonotonicity bool to the given truth value.
void updateMonotonicityResult(VariableType var, Monotonicity mon, bool force=false)
Updates the Monotonicity of a variable based on its value so far and a new value.
std::pair< std::set< VariableType >, std::set< VariableType > > splitVariables(std::set< VariableType > const &consideredVariables) const
bool isAllMonotonicity() const
Returns if all Variables are monotone.
std::string toString() const
Constructs a string output of all variables and their corresponding Monotonicity.
std::shared_ptr< MonotonicityResult< VariableType > > copy() const
Constructs a new MonotonicityResult object that is a copy of the current one.
void setDoneVariables(std::set< VariableType > doneVariables)
bool existsMonotonicity()
Checks if there is any variable that is monotone.
bool isMonotone(VariableType var) const
bool isDone() const
Checks if the result is complete.
MonotonicityKind
The results of monotonicity checking for a single Parameter Region.