Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
RegionModelChecker.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <optional>
5
12
15
16namespace storm {
17
18class Environment;
19
20namespace modelchecker {
21
22// TODO type names are inconsistent and all over the place
23template<typename ParametricType>
24struct AnnotatedRegion;
25template<typename ParametricType>
26class MonotonicityBackend;
27
28template<typename ParametricType>
30 public:
34
35 RegionModelChecker() = default;
36 virtual ~RegionModelChecker() = default;
37
38 virtual bool canHandle(std::shared_ptr<storm::models::ModelBase> parametricModel,
39 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const = 0;
40
41 virtual void specify(Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel,
43 std::optional<RegionSplitEstimateKind> generateRegionSplitEstimates = std::nullopt,
44 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend = {}, bool allowModelSimplifications = true,
45 bool graphPreserving = true) = 0;
46
55 RegionResultHypothesis const& hypothesis = RegionResultHypothesis::Unknown, bool sampleVerticesOfRegion = false) = 0;
56
65 RegionResultHypothesis const& hypothesis = RegionResultHypothesis::Unknown, bool sampleVerticesOfRegion = false);
66
73 std::unique_ptr<storm::modelchecker::RegionCheckResult<ParametricType>> analyzeRegions(
74 Environment const& env, std::vector<storm::storage::ParameterRegion<ParametricType>> const& regions,
75 std::vector<RegionResultHypothesis> const& hypotheses, bool sampleVerticesOfRegion = false);
76
86 storm::solver::OptimizationDirection const& dirForParameters) = 0;
87
97 storm::solver::OptimizationDirection const& dirForParameters);
98
107 virtual std::pair<CoefficientType, Valuation> getAndEvaluateGoodPoint(Environment const& env, AnnotatedRegion<ParametricType>& region,
108 storm::solver::OptimizationDirection const& dirForParameters) = 0;
109
114
119
123 std::optional<RegionSplitEstimateKind> getSpecifiedRegionSplitEstimateKind() const;
124
131 virtual std::vector<CoefficientType> obtainRegionSplitEstimates(std::set<VariableType> const& relevantParameters) const;
132
137 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const = 0;
138
139 protected:
140 virtual void specifySplitEstimates(std::optional<RegionSplitEstimateKind> splitEstimates,
142 virtual void specifyMonotonicity(std::shared_ptr<MonotonicityBackend<ParametricType>> backend,
144
145 std::optional<storm::storage::ParameterRegion<ParametricType>> lastCheckedRegion;
146 std::optional<RegionSplitEstimateKind> specifiedRegionSplitEstimateKind;
147 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend;
148};
149
150} // namespace modelchecker
151} // namespace storm
virtual bool isRegionSplitEstimateKindSupported(RegionSplitEstimateKind kind, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const
virtual void specify(Environment const &env, std::shared_ptr< storm::models::ModelBase > parametricModel, CheckTask< storm::logic::Formula, ParametricType > const &checkTask, std::optional< RegionSplitEstimateKind > generateRegionSplitEstimates=std::nullopt, std::shared_ptr< MonotonicityBackend< ParametricType > > monotonicityBackend={}, bool allowModelSimplifications=true, bool graphPreserving=true)=0
virtual CoefficientType getBoundAtInitState(Environment const &env, AnnotatedRegion< ParametricType > &region, storm::solver::OptimizationDirection const &dirForParameters)=0
Over-approximates the value within the given region.
virtual RegionSplitEstimateKind getDefaultRegionSplitEstimateKind(CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const
virtual void specifyMonotonicity(std::shared_ptr< MonotonicityBackend< ParametricType > > backend, CheckTask< storm::logic::Formula, ParametricType > const &checkTask)
virtual RegionResult analyzeRegion(Environment const &env, AnnotatedRegion< ParametricType > &region, RegionResultHypothesis const &hypothesis=RegionResultHypothesis::Unknown, bool sampleVerticesOfRegion=false)=0
Analyzes the given region.
virtual bool isMonotonicitySupported(MonotonicityBackend< ParametricType > const &backend, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const =0
Returns whether this region model checker can work together with the given monotonicity backend.
std::shared_ptr< MonotonicityBackend< ParametricType > > monotonicityBackend
virtual std::vector< CoefficientType > obtainRegionSplitEstimates(std::set< VariableType > const &relevantParameters) const
Returns an estimate of the benefit of splitting the last checked region with respect to each of the g...
virtual void specifySplitEstimates(std::optional< RegionSplitEstimateKind > splitEstimates, CheckTask< storm::logic::Formula, ParametricType > const &checkTask)
storm::storage::ParameterRegion< ParametricType >::CoefficientType CoefficientType
virtual bool canHandle(std::shared_ptr< storm::models::ModelBase > parametricModel, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const =0
std::optional< RegionSplitEstimateKind > getSpecifiedRegionSplitEstimateKind() const
std::unique_ptr< storm::modelchecker::RegionCheckResult< ParametricType > > analyzeRegions(Environment const &env, std::vector< storm::storage::ParameterRegion< ParametricType > > const &regions, std::vector< RegionResultHypothesis > const &hypotheses, bool sampleVerticesOfRegion=false)
Analyzes the given regions.
std::optional< storm::storage::ParameterRegion< ParametricType > > lastCheckedRegion
virtual std::pair< CoefficientType, Valuation > getAndEvaluateGoodPoint(Environment const &env, AnnotatedRegion< ParametricType > &region, storm::solver::OptimizationDirection const &dirForParameters)=0
Heuristically finds a point within the region and computes the value at the initial state for that po...
storm::storage::ParameterRegion< ParametricType >::Valuation Valuation
storm::storage::ParameterRegion< ParametricType >::VariableType VariableType
std::optional< RegionSplitEstimateKind > specifiedRegionSplitEstimateKind
storm::utility::parametric::CoefficientType< ParametricType >::type CoefficientType
storm::utility::parametric::Valuation< ParametricType > Valuation
storm::utility::parametric::VariableType< ParametricType >::type VariableType
RegionResult
The results for a single Parameter Region.
RegionResultHypothesis
hypothesis for the result for a single Parameter Region