Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
lexicographicModelCheckerHelper.h
Go to the documentation of this file.
1#pragma once
3
16
17namespace storm {
18
19class Environment;
20
21namespace modelchecker {
22namespace helper {
23namespace lexicographic {
24
25template<typename SparseModelType, typename ValueType, bool Nondeterministic>
26class lexicographicModelCheckerHelper : public helper::SingleValueModelCheckerHelper<ValueType, storm::models::ModelRepresentation::Sparse> {
27 public:
32
33 // init
35 : _transitionMatrix(transitionMatrix), formula(formula) {};
36
43 std::pair<std::shared_ptr<storm::transformer::DAProduct<SparseModelType>>, std::vector<uint>> getCompleteProductModel(
44 SparseModelType const& model, CheckFormulaCallback const& formulaChecker);
45
54 std::pair<storm::storage::MaximalEndComponentDecomposition<ValueType>, std::vector<std::vector<bool>>> getLexArrays(
55 std::shared_ptr<storm::transformer::DAProduct<productModelType>> productModel, std::vector<uint>& acceptanceConditions);
56
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<uint_fast64_t> const& oldToNewStateMapping,
112 uint const& condition, uint const numStates, std::vector<uint_fast64_t> const& compressedToReducedMapping,
113 std::map<uint, uint_fast64_t> const& bccToStStateMapping);
114
118 MDPSparseModelCheckingHelperReturnType<ValueType> solveOneReachability(std::vector<uint_fast64_t>& newInitalStates,
119 storm::storage::BitVector const& psiStates,
120 storm::storage::SparseMatrix<ValueType> const& transitionMatrix,
121 SparseModelType const& originalMdp,
122 std::vector<uint_fast64_t> const& compressedToReducedMapping,
123 std::vector<uint_fast64_t> const& oldToNewStateMapping);
124
131 SubsystemReturnType getReducedSubsystem(storm::storage::SparseMatrix<ValueType> const& transitionMatrix,
133 std::vector<uint_fast64_t> const& newInitalStates, storm::storage::BitVector const& goodStates);
134
138 std::pair<storm::storage::SparseMatrix<ValueType>, std::map<uint, uint_fast64_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.
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,...
lexicographicModelCheckerHelper(storm::logic::MultiObjectiveFormula const &formula, storm::storage::SparseMatrix< ValueType > const &transitionMatrix)
std::pair< std::shared_ptr< storm::transformer::DAProduct< SparseModelType > >, std::vector< uint > > 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...
std::pair< storm::storage::MaximalEndComponentDecomposition< ValueType >, std::vector< std::vector< bool > > > getLexArrays(std::shared_ptr< storm::transformer::DAProduct< productModelType > > productModel, std::vector< uint > &acceptanceConditions)
Given a product of an MDP and a automaton, returns the MECs and their corresponding Lex-Arrays First:...
std::function< storm::storage::BitVector(storm::logic::Formula const &)> CheckFormulaCallback
storm::transformer::SubsystemBuilderReturnType< ValueType, storm::models::sparse::StandardRewardModel< ValueType > > SubsystemReturnType
This class represents a (discrete-time) Markov decision process.
Definition Mdp.h:14
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
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.
LabParser.cpp.
Definition cli.cpp:18