Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
verification.h
Go to the documentation of this file.
3
4namespace storm {
5namespace pomdp {
6namespace api {
7
18template<typename ValueType>
21 uint64_t sizeThreshold,
22 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>> additionalPomdpStateValues =
23 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>>()) {
25 options.useClipping = false;
26 options.useStateEliminationCutoff = false;
27 options.sizeThresholdInit = sizeThreshold;
29 return modelchecker.check(task.getFormula(), additionalPomdpStateValues);
30}
31
43template<typename ValueType>
46 uint64_t sizeThreshold, std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>> pomdpStateValues) {
48 options.skipHeuristicSchedulers = true;
49 options.useClipping = false;
50 options.useStateEliminationCutoff = false;
51 options.sizeThresholdInit = sizeThreshold;
53 return modelchecker.check(task.getFormula(), pomdpStateValues);
54}
55
56// Interactive Interface
65template<typename ValueType>
67 storm::Environment const& env, std::shared_ptr<storm::models::sparse::Pomdp<ValueType>> pomdp, bool useClipping) {
69 options.skipHeuristicSchedulers = false;
70 options.useClipping = useClipping;
71 options.useStateEliminationCutoff = false;
72 options.sizeThresholdInit = storm::utility::infinity<uint64_t>();
73 options.interactiveUnfolding = true;
74 options.refine = false;
75 options.gapThresholdInit = 0;
76 options.cutZeroGap = false;
78 return modelchecker;
79}
80
89template<typename ValueType>
92 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>> additionalPomdpStateValues =
93 std::vector<std::vector<std::unordered_map<uint64_t, ValueType>>>()) {
94 modelchecker.check(task.getFormula(), additionalPomdpStateValues);
95}
96
103template<typename ValueType>
104std::shared_ptr<storm::models::sparse::Model<ValueType>> extractSchedulerAsMarkovChain(
106 return modelcheckingResult.schedulerAsMarkovChain;
107}
108
116template<typename ValueType>
119 uint64_t schedId) {
120 return modelcheckingResult.cutoffSchedulers.at(schedId);
121}
122
129template<typename ValueType>
132 return modelcheckingResult.cutoffSchedulers.size();
133}
134} // namespace api
135} // namespace pomdp
136} // 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:15
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.
LabParser.cpp.
Definition cli.cpp:18
std::shared_ptr< storm::models::sparse::Model< ValueType > > schedulerAsMarkovChain