Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
RegionRefinementChecker.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
11
15
16namespace storm {
17
18class Environment;
19
20namespace modelchecker {
21
22template<typename ParametricType>
23struct AnnotatedRegion;
24
25template<typename ParametricType>
27
28template<typename ParametricType>
30
31template<typename ParametricType>
33 public:
38
39 RegionRefinementChecker(std::unique_ptr<RegionModelChecker<ParametricType>>&& regionChecker);
41
42 bool canHandle(std::shared_ptr<storm::models::ModelBase> parametricModel, CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const;
43
44 void specify(Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel,
46 std::set<VariableType> const& discreteVariables = {}, std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend = {},
47 bool allowModelSimplifications = true,
49
59 std::unique_ptr<storm::modelchecker::RegionRefinementCheckResult<ParametricType>> performRegionPartitioning(
60 Environment const& env, storm::storage::ParameterRegion<ParametricType> const& region, std::optional<ParametricType> coverageThreshold,
61 std::optional<uint64_t> depthThreshold = std::nullopt, RegionResultHypothesis const& hypothesis = RegionResultHypothesis::Unknown,
62 uint64_t monThresh = 0);
63
78 std::pair<ExtendedCoefficientType, Valuation> computeExtremalValueHelper(
80 std::function<bool(ExtendedCoefficientType const&, ExtendedCoefficientType const&)> acceptGlobalBound,
81 std::function<bool(ExtendedCoefficientType const&)> rejectInstance);
82
96 std::pair<ExtendedCoefficientType, Valuation> computeExtremalValue(Environment const& env, storm::storage::ParameterRegion<ParametricType> const& region,
97 storm::solver::OptimizationDirection const& dir, ParametricType const& precision,
98 bool absolutePrecision, std::optional<storm::logic::Bound> const& boundInvariant);
99
105
106 private:
107 enum class Context { Partitioning, ExtremalValue };
108 std::set<VariableType> getSplittingVariablesEstimateBased(AnnotatedRegion<ParametricType> const& region, Context context) const;
109 std::set<VariableType> getSplittingVariablesRoundRobin(AnnotatedRegion<ParametricType> const& region, Context context) const;
110
111 std::set<VariableType> getSplittingVariables(AnnotatedRegion<ParametricType> const& region, Context context) const;
112
113 std::unique_ptr<RegionModelChecker<ParametricType>> regionChecker;
114 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend;
115 RegionSplittingStrategy regionSplittingStrategy;
116 std::set<VariableType> discreteVariables;
118};
119
120} // namespace modelchecker
121} // namespace storm
bool canHandle(std::shared_ptr< storm::models::ModelBase > parametricModel, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const
typename storm::storage::ParameterRegion< ParametricType >::VariableType VariableType
typename storm::storage::ParameterRegion< ParametricType >::CoefficientType CoefficientType
bool verifyRegion(Environment const &env, storm::storage::ParameterRegion< ParametricType > const &region, storm::logic::Bound const &bound)
Checks whether the bound is satisfied on the complete region.
storm::utility::ExtendedValueType< CoefficientType > ExtendedCoefficientType
RegionRefinementChecker(std::unique_ptr< RegionModelChecker< ParametricType > > &&regionChecker)
std::unique_ptr< storm::modelchecker::RegionRefinementCheckResult< ParametricType > > performRegionPartitioning(Environment const &env, storm::storage::ParameterRegion< ParametricType > const &region, std::optional< ParametricType > coverageThreshold, std::optional< uint64_t > depthThreshold=std::nullopt, RegionResultHypothesis const &hypothesis=RegionResultHypothesis::Unknown, uint64_t monThresh=0)
Iteratively refines the region until the region analysis yields a conclusive result (AllSat or AllVio...
std::pair< ExtendedCoefficientType, Valuation > computeExtremalValue(Environment const &env, storm::storage::ParameterRegion< ParametricType > const &region, storm::solver::OptimizationDirection const &dir, ParametricType const &precision, bool absolutePrecision, std::optional< storm::logic::Bound > const &boundInvariant)
Finds the extremal value within the given region and with the given precision.
typename storm::storage::ParameterRegion< ParametricType >::Valuation Valuation
void specify(Environment const &env, std::shared_ptr< storm::models::ModelBase > parametricModel, CheckTask< storm::logic::Formula, ParametricType > const &checkTask, RegionSplittingStrategy splittingStrategy=RegionSplittingStrategy(), std::set< VariableType > const &discreteVariables={}, std::shared_ptr< MonotonicityBackend< ParametricType > > monotonicityBackend={}, bool allowModelSimplifications=true, storm::pars::analysis::GraphPreservationStatus graphPreservationStatus=storm::pars::analysis::GraphPreservationStatus::GraphPreserving)
std::pair< ExtendedCoefficientType, Valuation > computeExtremalValueHelper(Environment const &env, storm::storage::ParameterRegion< ParametricType > const &region, storm::solver::OptimizationDirection const &dir, std::function< bool(ExtendedCoefficientType const &, ExtendedCoefficientType const &)> acceptGlobalBound, std::function< bool(ExtendedCoefficientType const &)> rejectInstance)
Finds the extremal value within the given region and with the given precision.
storm::utility::parametric::CoefficientType< ParametricType >::type CoefficientType
storm::utility::parametric::Valuation< ParametricType > Valuation
storm::utility::parametric::VariableType< ParametricType >::type VariableType
RegionResultHypothesis
hypothesis for the result for a single Parameter Region
GraphPreservationStatus
Describes to what extent a set of regions is known to be well-defined and to preserve the graph struc...
@ GraphPreserving
The regions are known (or assumed) to preserve the graph structure of the model.
std::conditional_t< storm::NumberTraits< ValueType >::HasInfinity, ValueType, ExtendedNumber< ValueType > > ExtendedValueType
The type to use for values that may be infinite.