Storm 1.11.1.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
67 std::vector<std::vector<bool>> const& mecLexArray,
68 std::shared_ptr<storm::transformer::DAProduct<SparseModelType>> const& productModel,
69 SparseModelType const& originalMdp);
70
71 private:
72 static std::map<std::string, storm::storage::BitVector> computeApSets(std::map<std::string, std::shared_ptr<storm::logic::Formula const>> const& extracted,
73 CheckFormulaCallback const& formulaChecker);
74
82 std::vector<storm::automata::AcceptanceCondition::acceptance_expr::ptr> getStreettPairs(
83 storm::automata::AcceptanceCondition::acceptance_expr::ptr const& current);
84
93 bool isAcceptingStreettConditions(storm::storage::MaximalEndComponent const& scc,
94 std::vector<storm::automata::AcceptanceCondition::acceptance_expr::ptr> const& acceptancePairs,
95 storm::automata::AcceptanceCondition::ptr const& acceptance, productModelType const& model);
96
109 std::vector<std::vector<bool>> const& bccLexArray, std::vector<uint64_t> const& oldToNewStateMapping,
110 uint64_t const& condition, uint64_t const numStates, std::vector<uint64_t> const& compressedToReducedMapping,
111 std::map<uint64_t, uint64_t> const& bccToStStateMapping);
112
116 MDPSparseModelCheckingHelperReturnType<ValueType> solveOneReachability(std::vector<uint64_t>& newInitalStates, storm::storage::BitVector const& psiStates,
117 storm::storage::SparseMatrix<ValueType> const& transitionMatrix,
118 SparseModelType const& originalMdp,
119 std::vector<uint64_t> const& compressedToReducedMapping,
120 std::vector<uint64_t> const& oldToNewStateMapping);
121
128 SubsystemReturnType getReducedSubsystem(storm::storage::SparseMatrix<ValueType> const& transitionMatrix,
130 std::vector<uint64_t> const& newInitalStates, storm::storage::BitVector const& goodStates);
131
135 std::pair<storm::storage::SparseMatrix<ValueType>, std::map<uint64_t, uint64_t>> addSinkStates(
137 std::shared_ptr<storm::transformer::DAProduct<SparseModelType>> const& productModel);
138
139 storm::storage::SparseMatrix<ValueType> const& _transitionMatrix;
141};
142
143} // namespace lexicographic
144} // namespace helper
145} // namespace modelchecker
146} // 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)
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:...
MDPSparseModelCheckingHelperReturnType< ValueType > lexReachability(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,...
This class represents a (discrete-time) Markov decision process.
Definition Mdp.h:13
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.