Storm 1.14.0.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
13
16
17namespace storm {
18
19class Environment;
20
21namespace modelchecker {
22
23// TODO type names are inconsistent and all over the place
24template<typename ParametricType>
25struct AnnotatedRegion;
26template<typename ParametricType>
28
29template<typename ParametricType>
31 public:
36
37 RegionModelChecker() = default;
38 virtual ~RegionModelChecker() = default;
39
40 virtual bool canHandle(std::shared_ptr<storm::models::ModelBase> parametricModel,
41 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const = 0;
42
43 virtual void specify(
44 Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel, CheckTask<storm::logic::Formula, ParametricType> const& checkTask,
45 std::optional<RegionSplitEstimateKind> generateRegionSplitEstimates = std::nullopt,
46 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend = {}, bool allowModelSimplifications = true,
48
57 RegionResultHypothesis const& hypothesis = RegionResultHypothesis::Unknown, bool sampleVerticesOfRegion = false) = 0;
58
67 RegionResultHypothesis const& hypothesis = RegionResultHypothesis::Unknown, bool sampleVerticesOfRegion = false);
68
75 std::unique_ptr<storm::modelchecker::RegionCheckResult<ParametricType>> analyzeRegions(
76 Environment const& env, std::vector<storm::storage::ParameterRegion<ParametricType>> const& regions,
77 std::vector<RegionResultHypothesis> const& hypotheses, bool sampleVerticesOfRegion = false);
78
88 storm::solver::OptimizationDirection const& dirForParameters) = 0;
89
99 storm::solver::OptimizationDirection const& dirForParameters);
100
109 virtual std::pair<ExtendedCoefficientType, Valuation> getAndEvaluateGoodPoint(Environment const& env, AnnotatedRegion<ParametricType>& region,
110 storm::solver::OptimizationDirection const& dirForParameters) = 0;
111
116
121
125 std::optional<RegionSplitEstimateKind> getSpecifiedRegionSplitEstimateKind() const;
126
133 virtual std::vector<CoefficientType> obtainRegionSplitEstimates(std::set<VariableType> const& relevantParameters) const;
134
139 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const = 0;
140
141 protected:
142 virtual void specifySplitEstimates(std::optional<RegionSplitEstimateKind> splitEstimates,
144 virtual void specifyMonotonicity(std::shared_ptr<MonotonicityBackend<ParametricType>> backend,
146
147 std::optional<storm::storage::ParameterRegion<ParametricType>> lastCheckedRegion;
148 std::optional<RegionSplitEstimateKind> specifiedRegionSplitEstimateKind;
149 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend;
150};
151
152} // namespace modelchecker
153} // namespace storm
virtual bool isRegionSplitEstimateKindSupported(RegionSplitEstimateKind kind, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const
virtual ExtendedCoefficientType 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
storm::utility::ExtendedValueType< CoefficientType > ExtendedCoefficientType
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.
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, storm::pars::analysis::GraphPreservationStatus graphPreservationStatus=storm::pars::analysis::GraphPreservationStatus::GraphPreserving)=0
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
virtual std::pair< ExtendedCoefficientType, 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...
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
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
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.