Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
verification.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7namespace pomdp {
8namespace api {
9
20template<typename ValueType>
23 uint64_t sizeThreshold,
24 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>> additionalPomdpStateValues =
25 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>>()) {
27 options.useClipping = false;
28 options.useStateEliminationCutoff = false;
29 options.sizeThresholdInit = sizeThreshold;
31 return modelchecker.check(task.getFormula(), additionalPomdpStateValues);
32}
33
45template<typename ValueType>
48 uint64_t sizeThreshold, std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>> pomdpStateValues) {
50 options.skipHeuristicSchedulers = true;
51 options.useClipping = false;
52 options.useStateEliminationCutoff = false;
53 options.sizeThresholdInit = sizeThreshold;
55 return modelchecker.check(task.getFormula(), pomdpStateValues);
56}
57
58// Interactive Interface
67template<typename ValueType>
69 storm::Environment const& env, std::shared_ptr<storm::models::sparse::Pomdp<ValueType>> pomdp, bool useClipping) {
71 options.skipHeuristicSchedulers = false;
72 options.useClipping = useClipping;
73 options.useStateEliminationCutoff = false;
74 options.sizeThresholdInit = storm::utility::infinity<uint64_t>();
75 options.interactiveUnfolding = true;
76 options.refine = false;
77 options.gapThresholdInit = 0;
78 options.cutZeroGap = false;
80 return modelchecker;
81}
82
91template<typename ValueType>
94 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>> additionalPomdpStateValues =
95 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>>()) {
96 modelchecker.check(task.getFormula(), additionalPomdpStateValues);
97}
98
105template<typename ValueType>
106std::shared_ptr<storm::models::sparse::Model<ValueType>> extractSchedulerAsMarkovChain(
108 return modelcheckingResult.schedulerAsMarkovChain;
109}
110
118template<typename ValueType>
121 uint64_t schedId) {
122 return modelcheckingResult.cutoffSchedulers.at(schedId);
123}
124
131template<typename ValueType>
134 return modelcheckingResult.cutoffSchedulers.size();
135}
136} // namespace api
137} // namespace pomdp
138} // namespace storm
FormulaType const & getFormula() const
Retrieves the formula from this task.
Definition CheckTask.h:140
This class represents a partially observable Markov decision process.
Definition Pomdp.h:13
Model checker for checking reachability queries on POMDPs using approximations based on exploration o...
Result check(storm::Environment const &env, storm::logic::Formula const &formula, storm::Environment const &preProcEnv, std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > > const &additionalUnderApproximationBounds=std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > >())
Performs model checking of the given POMDP with regards to a formula using the previously specified o...
This class defines which action is chosen in a particular state of a non-deterministic model.
Definition Scheduler.h:18
storm::storage::Scheduler< ValueType > getCutoffScheduler(typename storm::pomdp::modelchecker::BeliefExplorationPomdpModelChecker< storm::models::sparse::Pomdp< ValueType > >::Result modelcheckingResult, uint64_t schedId)
Get a specific scheduler used to generate cut-off values from the result struct.
uint64_t getNumberOfPreprocessingSchedulers(typename storm::pomdp::modelchecker::BeliefExplorationPomdpModelChecker< storm::models::sparse::Pomdp< ValueType > >::Result modelcheckingResult)
Get the overall number of schedulers generated by the pre-processing for the under-approximation from...
storm::pomdp::modelchecker::BeliefExplorationPomdpModelChecker< storm::models::sparse::Pomdp< ValueType > >::Result underapproximateWithoutHeuristicValues(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > pomdp, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task, uint64_t sizeThreshold, std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > > pomdpStateValues)
Uses the belief exploration with cut-offs without the pre-processing to generate cut-off values to un...
storm::pomdp::modelchecker::BeliefExplorationPomdpModelChecker< storm::models::sparse::Pomdp< ValueType > >::Result underapproximateWithCutoffs(std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > pomdp, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task, uint64_t sizeThreshold, std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > > additionalPomdpStateValues=std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > >())
Uses the belief exploration with cut-offs to under-approximate the given objective on a POMDP.
std::shared_ptr< storm::models::sparse::Model< ValueType > > extractSchedulerAsMarkovChain(typename storm::pomdp::modelchecker::BeliefExplorationPomdpModelChecker< storm::models::sparse::Pomdp< ValueType > >::Result modelcheckingResult)
Extract the scheduler generated by an under-approximation from the given result struct.
void startInteractiveExploration(storm::pomdp::modelchecker::BeliefExplorationPomdpModelChecker< storm::models::sparse::Pomdp< ValueType > > &modelchecker, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task, std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > > additionalPomdpStateValues=std::vector< std::vector< std::unordered_map< uint64_t, ValueType > > >())
Start an interactive unfolding to under approximate the given objective.
storm::pomdp::modelchecker::BeliefExplorationPomdpModelChecker< storm::models::sparse::Pomdp< ValueType > > createInteractiveUnfoldingModelChecker(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Pomdp< ValueType > > pomdp, bool useClipping)
Create a model checker with the correct settings for an interactive unfolding.
std::shared_ptr< storm::models::sparse::Model< ValueType > > schedulerAsMarkovChain