Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
OrderBasedMonotonicityBackend.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <optional>
5#include <set>
6#include <vector>
7
10
15
17template<typename ParametricType, typename ConstantType>
18class ParameterLifter;
19} // namespace storm::transformer
20
21namespace storm::storage {
22class BitVector;
23template<typename T>
24class SparseMatrix;
25} // namespace storm::storage
26
27namespace storm::modelchecker {
28
29template<typename ParametricType, typename ConstantType, bool Robust>
30class SparseDtmcParameterLiftingModelChecker;
31
32template<typename ParametricType, typename ConstantType>
33class OrderBasedMonotonicityBackend : public MonotonicityBackend<ParametricType> {
34 public:
39
40 template<typename ModelType, typename ConstantType2, bool Robust>
42
43 OrderBasedMonotonicityBackend(bool useOnlyGlobal = false, bool useBounds = false);
44 virtual ~OrderBasedMonotonicityBackend() = default;
45
49 virtual bool requiresInteractionWithRegionModelChecker() const override;
50
55 virtual bool recommendModelSimplifications() const override;
56
61 virtual void initializeMonotonicity(storm::Environment const& env, AnnotatedRegion<ParametricType>& region) override;
62
68 virtual void updateMonotonicity(storm::Environment const& env, AnnotatedRegion<ParametricType>& region) override;
69
74
79 virtual std::map<VariableType, MonotonicityKind> getOptimisticMonotonicityApproximation(AnnotatedRegion<ParametricType> const& region) override;
80
81 private:
82 // Interaction with SparseDtmcParameterLiftingModelChecker:
83 void registerParameterLifterReference(storm::transformer::ParameterLifter<ParametricType, ConstantType> const& parameterLifter);
84 void registerPLABoundFunction(
85 std::function<std::vector<ConstantType>(storm::Environment const&, AnnotatedRegion<ParametricType>&, storm::OptimizationDirection)> fun);
86 void initializeMonotonicityChecker(storm::storage::SparseMatrix<ParametricType> const& parametricTransitionMatrix);
87 void initializeOrderExtender(storm::storage::BitVector const& topStates, storm::storage::BitVector const& bottomStates,
88 storm::storage::SparseMatrix<ParametricType> const& parametricTransitionMatrix);
90 std::vector<uint64_t>& schedulerChoices);
91
92 private:
93 bool const useOnlyGlobal;
94 bool const useBounds;
95
96 std::optional<storm::analysis::OrderExtender<ParametricType, ConstantType>> orderExtender;
97 std::optional<storm::analysis::MonotonicityChecker<ParametricType>> monotonicityChecker;
98 std::set<VariableType> possibleMonotoneParameters;
100 std::function<std::vector<ConstantType>(storm::Environment const&, AnnotatedRegion<ParametricType>&, storm::OptimizationDirection)> plaBoundFunction;
101};
102
103} // namespace storm::modelchecker
Helper class that optionally holds a reference to an object of type T.
Definition OptionalRef.h:48
storm::utility::parametric::CoefficientType_t< ParametricType > CoefficientType
storm::utility::parametric::VariableType_t< ParametricType > VariableType
storm::utility::parametric::Valuation< ParametricType > Valuation
virtual void initializeMonotonicity(storm::Environment const &env, AnnotatedRegion< ParametricType > &region) override
Initializes the monotonicity information for the given region.
virtual bool recommendModelSimplifications() const override
Returns whether additional model simplifications are recommended when using this backend.
virtual bool requiresInteractionWithRegionModelChecker() const override
Returns true, since a region model checker needs to implement specific methods to properly use this b...
typename MonotonicityBackend< ParametricType >::MonotonicityKind MonotonicityKind
typename MonotonicityBackend< ParametricType >::Valuation Valuation
typename MonotonicityBackend< ParametricType >::CoefficientType CoefficientType
virtual std::map< VariableType, MonotonicityKind > getOptimisticMonotonicityApproximation(AnnotatedRegion< ParametricType > const &region) override
Returns an optimistic approximation of the monotonicity of the parameters in this region.
virtual void updateMonotonicity(storm::Environment const &env, AnnotatedRegion< ParametricType > &region) override
Updates the monotonicity information for the given region.
virtual void updateMonotonicityBeforeSplitting(storm::Environment const &env, AnnotatedRegion< ParametricType > &region) override
Updates the monotonicity information for the given region right before splitting it.
typename MonotonicityBackend< ParametricType >::VariableType VariableType
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
A class that holds a possibly non-square matrix in the compressed row storage format.
This class lifts parameter choices to nondeterminism: For each row in the given matrix that considerd...
MonotonicityKind
The results of monotonicity checking for a single Parameter Region.