Storm 1.14.0.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;
27
31
32 virtual bool canHandle(std::shared_ptr<storm::models::ModelBase> parametricModel,
33 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const override;
34 virtual void specify(
35 Environment const& env, std::shared_ptr<storm::models::ModelBase> parametricModel, CheckTask<storm::logic::Formula, ParametricType> const& checkTask,
36 std::optional<RegionSplitEstimateKind> generateRegionSplitEstimates = std::nullopt,
37 std::shared_ptr<MonotonicityBackend<ParametricType>> monotonicityBackend = {}, bool allowModelSimplifications = true,
39
40 std::optional<storm::storage::Scheduler<ConstantType>> getCurrentMinScheduler();
41 std::optional<storm::storage::Scheduler<ConstantType>> getCurrentMaxScheduler();
42 std::optional<storm::storage::Scheduler<ConstantType>> getCurrentPlayer1Scheduler();
43
48 CheckTask<storm::logic::Formula, ParametricType> const& checkTask) const override;
49
50 protected:
52 virtual void specifyUntilFormula(Environment const& env, CheckTask<storm::logic::UntilFormula, ConstantType> const& checkTask) override;
55
57 bool quantitative) override;
58
59 virtual std::vector<ExtendedConstantType> computeQuantitativeValues(Environment const& env, AnnotatedRegion<ParametricType>& region,
60 storm::solver::OptimizationDirection const& dirForParameters) override;
61
62 virtual void reset() override;
63
64 private:
65 void computePlayer1Matrix(std::optional<storm::storage::BitVector> const& selectedRows = std::nullopt);
66
67 storm::storage::BitVector maybeStates;
68 std::vector<ExtendedConstantType> resultsForNonMaybeStates;
69 std::optional<uint64_t> stepBound;
70
71 std::unique_ptr<storm::modelchecker::SparseMdpInstantiationModelChecker<SparseModelType, ConstantType>> instantiationChecker;
72
73 std::unique_ptr<CheckTask<storm::logic::Formula, ParametricType>> currentCheckTaskNoBound;
74 std::shared_ptr<storm::logic::Formula const> currentFormulaNoBound;
75
77 std::unique_ptr<storm::transformer::ParameterLifter<ParametricType, ConstantType>> parameterLifter;
78 std::unique_ptr<storm::solver::GameSolverFactory<ConstantType>> solverFactory;
79
80 // Results from the most recent solver call.
81 std::optional<std::vector<uint64_t>> minSchedChoices, maxSchedChoices;
82 std::optional<std::vector<uint64_t>> player1SchedChoices;
83 std::vector<ConstantType> x;
84 std::optional<ConstantType> lowerResultBound, upperResultBound;
85 bool applyPreviousResultAsHint;
86};
87} // 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
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
std::optional< storm::storage::Scheduler< ConstantType > > getCurrentMaxScheduler()
virtual std::vector< ExtendedConstantType > 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 storm::modelchecker::SparseInstantiationModelChecker< SparseModelType, ConstantType > & getInstantiationChecker(Environment const &env, bool quantitative) override
typename SparseParameterLiftingModelChecker< SparseModelType, ConstantType >::ExtendedConstantType ExtendedConstantType
virtual void specifyBoundedUntilFormula(const CheckTask< storm::logic::BoundedUntilFormula, ConstantType > &checkTask) override
typename RegionModelChecker< ParametricType >::CoefficientType CoefficientType
virtual void specifyCumulativeRewardFormula(const CheckTask< storm::logic::CumulativeRewardFormula, ConstantType > &checkTask) override
typename RegionModelChecker< ParametricType >::Valuation Valuation
storm::utility::ExtendedValueType< ConstantType > ExtendedConstantType
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.
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.