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 <ostream>
5#include <set>
6
7#include <memory>
11
12namespace storm {
13namespace analysis {
14template<typename VariableType>
16 public:
18
23
30 void addMonotonicityResult(VariableType var, Monotonicity mon);
31
38 void updateMonotonicityResult(VariableType var, Monotonicity mon, bool force = false);
39
46 Monotonicity getMonotonicity(VariableType var) const;
47 bool isMonotone(VariableType var) const;
48
54 std::map<VariableType, Monotonicity> const& getMonotonicityResult() const;
55
56 void splitBasedOnMonotonicity(std::set<VariableType> const& consideredVariables, std::set<VariableType>& monotoneIncr, std::set<VariableType>& monotoneDecr,
57 std::set<VariableType>& notMontone) const;
58
59 std::pair<std::set<VariableType>, std::set<VariableType>> splitVariables(std::set<VariableType> const& consideredVariables) const;
65 std::string toString() const;
66
70 bool isDone() const;
71
72 bool isDoneForVar(VariableType) const;
73
77 bool existsMonotonicity();
78
82 bool isAllMonotonicity() const;
83
87 void setDone(bool done = true);
88
92 void setSomewhereMonotonicity(bool done = true);
93
97 void setAllMonotonicity(bool done = true);
98
99 void setDoneForVar(VariableType);
100
101 void setDoneVariables(std::set<VariableType> doneVariables);
102
108 std::shared_ptr<MonotonicityResult<VariableType>> copy() const;
109
110 private:
111 std::map<VariableType, Monotonicity> monotonicityResult;
112 std::set<VariableType> doneVariables;
113 bool done;
114 bool somewhereMonotonicity;
115 bool allMonotonicity;
116};
117
118} // namespace analysis
119} // 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.
LabParser.cpp.