Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
LexicographicModelCheckerHelper.h
Go to the documentation of this file.
1#pragma once
2
4
14
15namespace storm {
16
17class Environment;
18
19namespace modelchecker {
20namespace helper {
21namespace lexicographic {
22
23template<typename SparseModelType, typename ValueType, bool Nondeterministic>
24class LexicographicModelCheckerHelper : public helper::SingleValueModelCheckerHelper<ValueType, storm::models::ModelRepresentation::Sparse> {
25 public:
30
31 // init
33 : _transitionMatrix(transitionMatrix), formula(formula) {}
34
41 std::pair<std::shared_ptr<storm::transformer::DAProduct<SparseModelType>>, std::vector<uint64_t>> getCompleteProductModel(
42 SparseModelType const& model, CheckFormulaCallback const& formulaChecker);
43
52 std::pair<storm::storage::MaximalEndComponentDecomposition<ValueType>, std::vector<std::vector<bool>>> getLexArrays(
53 std::shared_ptr<storm::transformer::DAProduct<productModelType>> productModel, std::vector<uint64_t>& acceptanceConditions);
54
69 std::vector<std::vector<bool>> const& mecLexArray,
70 std::shared_ptr<storm::transformer::DAProduct<SparseModelType>> const& productModel,
71 SparseModelType const& originalMdp);
72
73 private:
74 static std::map<std::string, storm::storage::BitVector> computeApSets(std::map<std::string, std::shared_ptr<storm::logic::Formula const>> const& extracted,
75 CheckFormulaCallback const& formulaChecker);
76
84 std::vector<storm::automata::AcceptanceCondition::acceptance_expr::ptr> getStreettPairs(
85 storm::automata::AcceptanceCondition::acceptance_expr::ptr const& current);
86
95 bool isAcceptingStreettConditions(storm::storage::MaximalEndComponent const& scc,
96 std::vector<storm::automata::AcceptanceCondition::acceptance_expr::ptr> const& acceptancePairs,
97 storm::automata::AcceptanceCondition::ptr const& acceptance, productModelType const& model);
98
111 std::vector<std::vector<bool>> const& bccLexArray, std::vector<uint64_t> const& oldToNewStateMapping,
112 uint64_t const& condition, uint64_t const numStates, std::vector<uint64_t> const& compressedToReducedMapping,
113 std::map<uint64_t, uint64_t> const& bccToStStateMapping);
114
118 MDPSparseModelCheckingHelperReturnType<ValueType> solveOneReachability(Environment const& env, std::vector<uint64_t>& newInitalStates,
119 storm::storage::BitVector const& psiStates,
120 storm::storage::SparseMatrix<ValueType> const& transitionMatrix,
121 SparseModelType const& originalMdp,
122 std::vector<uint64_t> const& compressedToReducedMapping,
123 std::vector<uint64_t> const& oldToNewStateMapping);
124
131 SubsystemReturnType getReducedSubsystem(storm::storage::SparseMatrix<ValueType> const& transitionMatrix,
133 std::vector<uint64_t> const& newInitalStates, storm::storage::BitVector const& goodStates);
134
138 std::pair<storm::storage::SparseMatrix<ValueType>, std::map<uint64_t, uint64_t>> addSinkStates(
140 std::shared_ptr<storm::transformer::DAProduct<SparseModelType>> const& productModel);
141
142 storm::storage::SparseMatrix<ValueType> const& _transitionMatrix;
144};
145
146} // namespace lexicographic
147} // namespace helper
148} // namespace modelchecker
149} // namespace storm
std::shared_ptr< AcceptanceCondition > ptr
Helper for model checking queries where we are interested in (optimizing) a single value per state.
std::pair< std::shared_ptr< storm::transformer::DAProduct< SparseModelType > >, std::vector< uint64_t > > getCompleteProductModel(SparseModelType const &model, CheckFormulaCallback const &formulaChecker)
Returns the product of a model and the product-automaton of all sub-formulae of the multi-objective f...
LexicographicModelCheckerHelper(storm::logic::MultiObjectiveFormula const &formula, storm::storage::SparseMatrix< ValueType > const &transitionMatrix)
MDPSparseModelCheckingHelperReturnType< ValueType > lexReachability(Environment const &env, storm::storage::MaximalEndComponentDecomposition< ValueType > const &mecs, std::vector< std::vector< bool > > const &mecLexArray, std::shared_ptr< storm::transformer::DAProduct< SparseModelType > > const &productModel, SparseModelType const &originalMdp)
Solves the reachability query for a lexicographic objective In lexicographic order,...
storm::transformer::SubsystemBuilderReturnType< ValueType, storm::models::sparse::StandardRewardModel< ValueType > > SubsystemReturnType
std::function< storm::storage::BitVector(storm::logic::Formula const &)> CheckFormulaCallback
std::pair< storm::storage::MaximalEndComponentDecomposition< ValueType >, std::vector< std::vector< bool > > > getLexArrays(std::shared_ptr< storm::transformer::DAProduct< productModelType > > productModel, std::vector< uint64_t > &acceptanceConditions)
Given a product of an MDP and a automaton, returns the MECs and their corresponding Lex-Arrays First:...
This class represents a (discrete-time) Markov decision process.
Definition Mdp.h:16
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
This class represents the decomposition of a nondeterministic model into its maximal end components.
This class represents a maximal end-component of a nondeterministic model.
A class that holds a possibly non-square matrix in the compressed row storage format.