Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ValidatingSparseParameterLiftingModelChecker.h
Go to the documentation of this file.
1#pragma once
2
9
10namespace storm {
11namespace modelchecker {
12
13template<typename SparseModelType, typename ImpreciseType, typename PreciseType>
14class ValidatingSparseParameterLiftingModelChecker : public RegionModelChecker<typename SparseModelType::ValueType> {
15 static_assert(storm::NumberTraits<PreciseType>::IsExact, "Specified type for exact computations is not exact.");
16
17 using ParametricType = typename SparseModelType::ValueType;
18 using CoefficientType = typename RegionModelChecker<ParametricType>::CoefficientType;
19 using VariableType = typename RegionModelChecker<ParametricType>::VariableType;
20 using Valuation = typename RegionModelChecker<ParametricType>::Valuation;
21
22 public:
25
26 virtual bool canHandle(std::shared_ptr<storm::models::ModelBase> parametricModel,
28
29 virtual void specify(Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel,
31 std::optional<RegionSplitEstimateKind> generateRegionSplitEstimates = std::nullopt,
32 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend = {}, bool allowModelSimplifications = true,
33 bool graphPreserving = true) override;
34
46 bool sampleVerticesOfRegion = false) override;
47
56 virtual CoefficientType getBoundAtInitState(Environment const& env, AnnotatedRegion<ParametricType>& region,
57 storm::solver::OptimizationDirection const& dirForParameters) override;
58
67 virtual std::pair<CoefficientType, Valuation> getAndEvaluateGoodPoint(Environment const& env, AnnotatedRegion<ParametricType>& region,
68 storm::solver::OptimizationDirection const& dirForParameters) override;
69
74 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const override;
75
76 private:
77 static constexpr bool IsMDP = std::is_same_v<SparseModelType, storm::models::sparse::Mdp<ParametricType>>;
78 static constexpr bool IsDTMC = std::is_same_v<SparseModelType, storm::models::sparse::Dtmc<ParametricType>>;
79 static_assert(IsMDP || IsDTMC, "Model type is neither MDP nor DTMC.");
80
81 template<typename T>
82 using UnderlyingCheckerType = typename std::conditional_t<IsMDP, SparseMdpParameterLiftingModelChecker<SparseModelType, T>,
84
85 UnderlyingCheckerType<ImpreciseType> impreciseChecker;
86 UnderlyingCheckerType<PreciseType> preciseChecker;
87
88 void applyHintsToPreciseChecker();
89
90 // Information for statistics
91 uint_fast64_t numOfWrongRegions;
92};
93} // namespace modelchecker
94} // namespace storm
std::shared_ptr< MonotonicityBackend< SparseModelType::ValueType > > monotonicityBackend
storm::storage::ParameterRegion< ParametricType >::CoefficientType CoefficientType
storm::storage::ParameterRegion< ParametricType >::Valuation Valuation
storm::storage::ParameterRegion< ParametricType >::VariableType VariableType
virtual RegionResult analyzeRegion(Environment const &env, AnnotatedRegion< ParametricType > &region, RegionResultHypothesis const &hypothesis=RegionResultHypothesis::Unknown, bool sampleVerticesOfRegion=false) override
Analyzes the given region.
virtual CoefficientType getBoundAtInitState(Environment const &env, AnnotatedRegion< ParametricType > &region, storm::solver::OptimizationDirection const &dirForParameters) override
Over-approximates the value within the given region.
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) override
virtual bool isMonotonicitySupported(MonotonicityBackend< ParametricType > const &backend, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const override
Returns whether this region model checker can work together with the given monotonicity backend.
virtual std::pair< CoefficientType, Valuation > getAndEvaluateGoodPoint(Environment const &env, AnnotatedRegion< ParametricType > &region, storm::solver::OptimizationDirection const &dirForParameters) override
Heuristically finds a point within the region and computes the value at the initial state for that po...
virtual bool canHandle(std::shared_ptr< storm::models::ModelBase > parametricModel, CheckTask< storm::logic::Formula, typename SparseModelType::ValueType > const &checkTask) const override
RegionResult
The results for a single Parameter Region.
RegionResultHypothesis
hypothesis for the result for a single Parameter Region
LabParser.cpp.