Storm 1.13.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseLTLHelper.h
Go to the documentation of this file.
1#pragma once
2
9
10namespace storm {
11
12class Environment;
13
14namespace logic {
15class Formula;
16class PathFormula;
17} // namespace logic
18namespace automata {
20}
21
22namespace modelchecker {
23namespace helper {
24
30template<typename ValueType, bool Nondeterministic>
31class SparseLTLHelper : public SingleValueModelCheckerHelper<ValueType, storm::models::ModelRepresentation::Sparse> {
32 public:
34
38 using productModelType = typename std::conditional<Nondeterministic, storm::models::sparse::Mdp<ValueType>, storm::models::sparse::Dtmc<ValueType>>::type;
39
45
52
59 std::vector<ValueType> computeLTLProbabilities(Environment const& env, storm::logic::PathFormula const& formula,
60 CheckFormulaCallback const& formulaChecker);
61
68 static std::map<std::string, storm::storage::BitVector> computeApSets(std::map<std::string, std::shared_ptr<storm::logic::Formula const>> const& extracted,
69 CheckFormulaCallback const& formulaChecker);
70
78 std::map<std::string, storm::storage::BitVector>& apSatSets);
79
86 std::vector<ValueType> computeLTLProbabilities(Environment const& env, storm::logic::PathFormula const& formula,
87 std::map<std::string, storm::storage::BitVector>& apSatSets);
88
89 private:
102 storm::storage::BitVector computeAcceptingECs(automata::AcceptanceCondition const& acceptance,
103 storm::storage::SparseMatrix<ValueType> const& transitionMatrix,
104 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
106
112 storm::storage::BitVector computeAcceptingBCCs(automata::AcceptanceCondition const& acceptance,
113 storm::storage::SparseMatrix<ValueType> const& transitionMatrix);
114
115 storm::storage::SparseMatrix<ValueType> const& _transitionMatrix;
116
117 boost::optional<storm::modelchecker::helper::internal::SparseLTLSchedulerHelper<ValueType, Nondeterministic>> _schedulerHelper;
118};
119} // namespace helper
120} // namespace modelchecker
121} // namespace storm
std::function< storm::storage::BitVector(storm::logic::Formula const &)> CheckFormulaCallback
std::vector< ValueType > computeLTLProbabilities(Environment const &env, storm::logic::PathFormula const &formula, CheckFormulaCallback const &formulaChecker)
Computes the LTL probabilities.
storm::storage::Scheduler< ValueType > extractScheduler(storm::models::sparse::Model< ValueType > const &model)
typename std::conditional< Nondeterministic, storm::models::sparse::Mdp< ValueType >, storm::models::sparse::Dtmc< ValueType > >::type productModelType
The type of the product model (DTMC or MDP) that is used during the computation.
SparseLTLHelper(storm::storage::SparseMatrix< ValueType > const &transitionMatrix)
Initializes the helper for a discrete time model (i.e.
static std::map< std::string, storm::storage::BitVector > computeApSets(std::map< std::string, std::shared_ptr< storm::logic::Formula const > > const &extracted, CheckFormulaCallback const &formulaChecker)
Computes the states that are satisfying the AP.
std::vector< ValueType > computeDAProductProbabilities(Environment const &env, storm::automata::DeterministicAutomaton const &da, std::map< std::string, storm::storage::BitVector > &apSatSets)
Computes the (maximizing) probabilities for the constructed DA product.
This class represents a discrete-time Markov chain.
Definition Dtmc.h:13
Base class for all sparse models.
Definition Model.h:30
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
This class defines which action is chosen in a particular state of a non-deterministic model.
Definition Scheduler.h:18
A class that holds a possibly non-square matrix in the compressed row storage format.
std::shared_ptr< DAProduct< Model > > ptr
Definition DAProduct.h:13