Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseMdpParameterLiftingModelChecker.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <optional>
5#include <vector>
6
10
16
17namespace storm::modelchecker {
18
19template<typename SparseModelType, typename ConstantType>
21 public:
22 using ParametricType = typename SparseModelType::ValueType;
26
30
31 virtual bool canHandle(std::shared_ptr<storm::models::ModelBase> parametricModel,
32 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const override;
33 virtual void specify(Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel,
35 std::optional<RegionSplitEstimateKind> generateRegionSplitEstimates = std::nullopt,
36 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend = {}, bool allowModelSimplifications = true,
37 bool graphPreserving = true) override;
38
39 std::optional<storm::storage::Scheduler<ConstantType>> getCurrentMinScheduler();
40 std::optional<storm::storage::Scheduler<ConstantType>> getCurrentMaxScheduler();
41 std::optional<storm::storage::Scheduler<ConstantType>> getCurrentPlayer1Scheduler();
42
47 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const override;
48
49 protected:
51 virtual void specifyUntilFormula(Environment const& env, CheckTask<storm::logic::UntilFormula, ConstantType> const& checkTask) override;
54
56
57 virtual std::vector<ConstantType> computeQuantitativeValues(Environment const& env, AnnotatedRegion<ParametricType>& region,
58 storm::solver::OptimizationDirection const& dirForParameters) override;
59
60 virtual void reset() override;
61
62 private:
63 void computePlayer1Matrix(std::optional<storm::storage::BitVector> const& selectedRows = std::nullopt);
64
65 storm::storage::BitVector maybeStates;
66 std::vector<ConstantType> resultsForNonMaybeStates;
67 std::optional<uint64_t> stepBound;
68
69 std::unique_ptr<storm::modelchecker::SparseMdpInstantiationModelChecker<SparseModelType, ConstantType>> instantiationChecker;
70
71 std::unique_ptr<CheckTask<storm::logic::Formula, ParametricType>> currentCheckTaskNoBound;
72 std::shared_ptr<storm::logic::Formula const> currentFormulaNoBound;
73
75 std::unique_ptr<storm::transformer::ParameterLifter<ParametricType, ConstantType>> parameterLifter;
76 std::unique_ptr<storm::solver::GameSolverFactory<ConstantType>> solverFactory;
77
78 // Results from the most recent solver call.
79 std::optional<std::vector<uint64_t>> minSchedChoices, maxSchedChoices;
80 std::optional<std::vector<uint64_t>> player1SchedChoices;
81 std::vector<ConstantType> x;
82 std::optional<ConstantType> lowerResultBound, upperResultBound;
83 bool applyPreviousResultAsHint;
84};
85} // namespace storm::modelchecker
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
Class to efficiently check a formula on a parametric model with different parameter instantiations.
std::optional< storm::storage::Scheduler< ConstantType > > getCurrentMinScheduler()
virtual void specifyReachabilityRewardFormula(Environment const &env, CheckTask< storm::logic::EventuallyFormula, ConstantType > const &checkTask) override
std::optional< storm::storage::Scheduler< ConstantType > > getCurrentPlayer1Scheduler()
typename RegionModelChecker< ParametricType >::VariableType VariableType
std::optional< storm::storage::Scheduler< ConstantType > > getCurrentMaxScheduler()
virtual std::vector< ConstantType > computeQuantitativeValues(Environment const &env, AnnotatedRegion< ParametricType > &region, storm::solver::OptimizationDirection const &dirForParameters) 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 bool canHandle(std::shared_ptr< storm::models::ModelBase > parametricModel, CheckTask< storm::logic::Formula, ParametricType > const &checkTask) const override
virtual void specifyUntilFormula(Environment const &env, CheckTask< storm::logic::UntilFormula, ConstantType > const &checkTask) override
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 void specifyBoundedUntilFormula(const CheckTask< storm::logic::BoundedUntilFormula, ConstantType > &checkTask) override
typename RegionModelChecker< ParametricType >::CoefficientType CoefficientType
virtual storm::modelchecker::SparseInstantiationModelChecker< SparseModelType, ConstantType > & getInstantiationChecker(bool quantitative) override
virtual void specifyCumulativeRewardFormula(const CheckTask< storm::logic::CumulativeRewardFormula, ConstantType > &checkTask) override
typename RegionModelChecker< ParametricType >::Valuation Valuation
Class to approximately check a formula on a parametric model for all parameter valuations within a re...
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
A class that holds a possibly non-square matrix in the compressed row storage format.