Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ExplicitParetoCurveCheckResult.cpp
Go to the documentation of this file.
2
7
8namespace storm {
9namespace modelchecker {
10template<typename ValueType>
14
15template<typename ValueType>
22
23template<typename ValueType>
30
31template<typename ValueType>
33 std::vector<ExtendedPointType>&& points, std::vector<scheduler_type>&& schedulers,
35 : ParetoCurveCheckResult<ValueType>(points, underApproximation, overApproximation), state(state), schedulers(schedulers) {}
36
37template<typename ValueType>
39 std::vector<point_type> const& points, polytope_type const& underApproximation,
41 requires(!std::is_same_v<ExtendedPointType, point_type>)
43 // Intentionally left empty.
44}
45
46template<typename ValueType>
48 std::vector<scheduler_type>&& schedulers, polytope_type&& underApproximation,
50 requires(!std::is_same_v<ExtendedPointType, point_type>)
51 : ParetoCurveCheckResult<ValueType>(points, std::move(underApproximation), std::move(overApproximation)), state(state), schedulers(std::move(schedulers)) {
52 // Intentionally left empty.
53}
54
55template<typename ValueType>
56std::unique_ptr<CheckResult> ExplicitParetoCurveCheckResult<ValueType>::clone() const {
57 return std::make_unique<ExplicitParetoCurveCheckResult<ValueType>>(this->state, this->points, this->underApproximation, this->overApproximation);
58}
59
60template<typename ValueType>
64
65template<typename ValueType>
69
70template<typename ValueType>
72 STORM_LOG_THROW(filter.isExplicitQualitativeCheckResult(), storm::exceptions::InvalidOperationException,
73 "Cannot filter explicit check result with non-explicit filter.");
74 STORM_LOG_THROW(filter.isResultForAllStates(), storm::exceptions::InvalidOperationException, "Cannot filter check result with non-complete filter.");
76 typename ExplicitQualitativeCheckResult<ValueType>::vector_type const& filterTruthValues = explicitFilter.getTruthValuesVector();
77
78 STORM_LOG_THROW(filterTruthValues.getNumberOfSetBits() == 1 && filterTruthValues.get(state), storm::exceptions::InvalidOperationException,
79 "The check result fails to contain some results referred to by the filter.");
80}
81
82template<typename ValueType>
86
87template<typename ValueType>
89 return schedulers.size() > 0;
90}
91
92template<typename ValueType>
93std::vector<typename ExplicitParetoCurveCheckResult<ValueType>::scheduler_type> const& ExplicitParetoCurveCheckResult<ValueType>::getSchedulers() const {
94 STORM_LOG_THROW(this->hasScheduler(), storm::exceptions::InvalidOperationException, "Unable to retrieve non-existing scheduler.");
95 return schedulers;
96}
97
98template<typename ValueType>
99std::vector<typename ExplicitParetoCurveCheckResult<ValueType>::scheduler_type>& ExplicitParetoCurveCheckResult<ValueType>::getSchedulers() {
100 STORM_LOG_THROW(this->hasScheduler(), storm::exceptions::InvalidOperationException, "Unable to retrieve non-existing scheduler.");
101 return schedulers;
102}
103
106} // namespace modelchecker
107} // namespace storm
ExplicitQualitativeCheckResult< ValueType > & asExplicitQualitativeCheckResult()
storm::storage::sparse::state_type const & getState() const
typename ParetoCurveCheckResult< ValueType >::polytope_type polytope_type
virtual void filter(QualitativeCheckResult const &filter) override
Filters the current result wrt.
virtual std::unique_ptr< CheckResult > clone() const override
std::vector< scheduler_type > const & getSchedulers() const
A qualitative check result over the states of a sparse model.
vector_type const & getTruthValuesVector() const
Retrieves the truth values, one per state this result is for.
uint64_t getNumberOfSetBits() const
Returns the number of bits that are set to true in this bit vector.
bool get(uint64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:39