Storm 1.14.0.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 ExtendedCoefficientType = typename RegionModelChecker<ParametricType>::ExtendedCoefficientType;
20 using VariableType = typename RegionModelChecker<ParametricType>::VariableType;
21 using Valuation = typename RegionModelChecker<ParametricType>::Valuation;
22
23 public:
26
27 virtual bool canHandle(std::shared_ptr<storm::models::ModelBase> parametricModel,
29
30 virtual void specify(
31 Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel, CheckTask<storm::logic::Formula, ParametricType> const& checkTask,
32 std::optional<RegionSplitEstimateKind> generateRegionSplitEstimates = std::nullopt,
33 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend = {}, bool allowModelSimplifications = true,
35
47 bool sampleVerticesOfRegion = false) override;
48
57 virtual ExtendedCoefficientType getBoundAtInitState(Environment const& env, AnnotatedRegion<ParametricType>& region,
58 storm::solver::OptimizationDirection const& dirForParameters) override;
59
68 virtual std::pair<ExtendedCoefficientType, Valuation> getAndEvaluateGoodPoint(Environment const& env, AnnotatedRegion<ParametricType>& region,
69 storm::solver::OptimizationDirection const& dirForParameters) override;
70
75 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const override;
76
77 private:
78 static constexpr bool IsMDP = std::is_same_v<SparseModelType, storm::models::sparse::Mdp<ParametricType>>;
79 static constexpr bool IsDTMC = std::is_same_v<SparseModelType, storm::models::sparse::Dtmc<ParametricType>>;
80 static_assert(IsMDP || IsDTMC, "Model type is neither MDP nor DTMC.");
81
82 template<typename T>
83 using UnderlyingCheckerType = typename std::conditional_t<IsMDP, SparseMdpParameterLiftingModelChecker<SparseModelType, T>,
85
86 UnderlyingCheckerType<ImpreciseType> impreciseChecker;
87 UnderlyingCheckerType<PreciseType> preciseChecker;
88
89 void applyHintsToPreciseChecker();
90
91 // Information for statistics
92 uint_fast64_t numOfWrongRegions;
93};
94} // namespace modelchecker
95} // namespace storm
storm::utility::ExtendedValueType< CoefficientType > ExtendedCoefficientType
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 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) override
virtual RegionResult analyzeRegion(Environment const &env, AnnotatedRegion< ParametricType > &region, RegionResultHypothesis const &hypothesis=RegionResultHypothesis::Unknown, bool sampleVerticesOfRegion=false) override
Analyzes the given region.
virtual std::pair< ExtendedCoefficientType, 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 ExtendedCoefficientType getBoundAtInitState(Environment const &env, AnnotatedRegion< ParametricType > &region, storm::solver::OptimizationDirection const &dirForParameters) override
Over-approximates the value within the given region.
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 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
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.
static const bool IsExact