Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
LexicographicModelChecking.cpp
Go to the documentation of this file.
2
7
8namespace storm {
9namespace modelchecker {
10namespace lexicographic {
11
12template<typename SparseModelType, typename ValueType>
15 CheckFormulaCallback const& formulaChecker) {
16 STORM_LOG_ASSERT(model.getInitialStates().getNumberOfSetBits() == 1,
17 "Lexicographic Model checking on model with multiple initial states is not supported.");
18 storm::logic::MultiObjectiveFormula const& formula = checkTask.getFormula();
19
20 // Define the helper that contains all functions
23
24 // get the product of (i) the product-automaton of all subformuale, and (ii) the model
25 auto res = lMC.getCompleteProductModel(model, formulaChecker);
26
27 std::shared_ptr<storm::transformer::DAProduct<SparseModelType>> completeProductModel = res.first;
28 std::vector<uint64_t> accCond = res.second;
29
30 // get the lexicogrpahic array for all MEC of the product-model
31 std::pair<storm::storage::MaximalEndComponentDecomposition<ValueType>, std::vector<std::vector<bool>>> result =
32 lMC.getLexArrays(completeProductModel, accCond);
34 std::vector<std::vector<bool>> mecLexArrays = result.second;
35
36 // solve the reachability query
37 // That is: solve reachability for the lexicographic highest condition, restrict the model to optimal actions, repeat
38 return lMC.lexReachability(mecs, mecLexArrays, completeProductModel, model);
39}
40
41template helper::MDPSparseModelCheckingHelperReturnType<double> check<storm::models::sparse::Mdp<double>, double>(
43 CheckFormulaCallback const& formulaChecker);
44template helper::MDPSparseModelCheckingHelperReturnType<storm::RationalNumber> check<storm::models::sparse::Mdp<storm::RationalNumber>, storm::RationalNumber>(
47} // namespace lexicographic
48} // namespace modelchecker
49} // namespace storm
FormulaType const & getFormula() const
Retrieves the formula from this task.
Definition CheckTask.h:140
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...
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
This class represents the decomposition of a nondeterministic model into its maximal end components.
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:11
helper::MDPSparseModelCheckingHelperReturnType< ValueType > check(Environment const &, SparseModelType const &model, CheckTask< storm::logic::MultiObjectiveFormula, ValueType > const &checkTask, CheckFormulaCallback const &formulaChecker)
check a lexicographic LTL-formula
std::function< storm::storage::BitVector(storm::logic::Formula const &)> CheckFormulaCallback