Storm 2.0.0.3
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseCtmcCslModelChecker.cpp
Go to the documentation of this file.
2
3#include <algorithm>
4
20#include "storm/utility/graph.h"
22
23namespace storm {
24namespace modelchecker {
25template<typename SparseCtmcModelType>
27 : SparsePropositionalModelChecker<SparseCtmcModelType>(model) {
28 // Intentionally left empty.
29}
30
31template<typename ModelType>
33 auto fragment = storm::logic::csrlstar()
36 .setTimeAllowed(true)
41 fragment.setBoundedUntilFormulasAllowed(false).setCumulativeRewardFormulasAllowed(false).setInstantaneousFormulasAllowed(false);
42 }
43 return checkTask.getFormula().isInFragment(fragment);
44}
45
46template<typename SparseCtmcModelType>
50
51template<typename SparseCtmcModelType>
55 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Computing bounded until probabilities is not supported for this numeric type.");
56 return nullptr;
57 } else {
58 storm::logic::BoundedUntilFormula const& pathFormula = checkTask.getFormula();
59 std::unique_ptr<CheckResult> leftResultPointer = this->check(env, pathFormula.getLeftSubformula());
60 std::unique_ptr<CheckResult> rightResultPointer = this->check(env, pathFormula.getRightSubformula());
61 ExplicitQualitativeCheckResult<ValueType> const& leftResult = leftResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
62 ExplicitQualitativeCheckResult<ValueType> const& rightResult = rightResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
63
64 STORM_LOG_THROW(pathFormula.getTimeBoundReference().isTimeBound(), storm::exceptions::NotImplementedException,
65 "Currently step-bounded or reward-bounded properties on CTMCs are not supported.");
66 ValueType lowerBound = 0;
67 std::optional<ValueType> upperBound;
68 if (pathFormula.hasLowerBound()) {
69 lowerBound = pathFormula.getLowerBound<ValueType>();
70 }
71 if (pathFormula.hasUpperBound()) {
72 upperBound = pathFormula.getNonStrictUpperBound<ValueType>();
73 }
74
76 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), this->getModel().getTransitionMatrix(),
77 this->getModel().getBackwardTransitions(), leftResult.getTruthValuesVector(), rightResult.getTruthValuesVector(),
78 this->getModel().getExitRateVector(), checkTask.isQualitativeSet(), lowerBound, upperBound);
79 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
80 }
81}
82
83template<typename SparseCtmcModelType>
86 storm::logic::NextFormula const& pathFormula = checkTask.getFormula();
87 std::unique_ptr<CheckResult> subResultPointer = this->check(env, pathFormula.getSubformula());
88 ExplicitQualitativeCheckResult<ValueType> const& subResult = subResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
90 env, this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(), subResult.getTruthValuesVector());
91 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
92}
93
94template<typename SparseCtmcModelType>
97 storm::logic::GloballyFormula const& pathFormula = checkTask.getFormula();
98 std::unique_ptr<CheckResult> subResultPointer = this->check(env, pathFormula.getSubformula());
99 ExplicitQualitativeCheckResult<ValueType> const& subResult = subResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
100 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
102 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), probabilisticTransitions,
103 probabilisticTransitions.transpose(), subResult.getTruthValuesVector(), checkTask.isQualitativeSet())
104 .values;
105 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
106}
107
108template<typename SparseCtmcModelType>
111 storm::logic::UntilFormula const& pathFormula = checkTask.getFormula();
112 std::unique_ptr<CheckResult> leftResultPointer = this->check(env, pathFormula.getLeftSubformula());
113 std::unique_ptr<CheckResult> rightResultPointer = this->check(env, pathFormula.getRightSubformula());
114 ExplicitQualitativeCheckResult<ValueType> const& leftResult = leftResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
115 ExplicitQualitativeCheckResult<ValueType> const& rightResult = rightResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
116 if (checkTask.isProduceCertificateSet()) {
118 STORM_LOG_INFO("Computing reachability probabilities with certificate ...");
119 std::optional<storm::storage::BitVector> constraintStates;
120 std::optional<std::string> constraintLabel;
121 if (!pathFormula.getLeftSubformula().isTrueFormula()) {
122 constraintStates = leftResult.getTruthValuesVector();
123 constraintLabel = pathFormula.getLeftSubformula().toString();
124 }
125 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
126 auto certificate =
127 storm::modelchecker::computeReachabilityProbabilityCertificate(env, std::nullopt, probabilisticTransitions, rightResult.getTruthValuesVector(),
128 constraintStates, pathFormula.getRightSubformula().toString(), constraintLabel);
129 storm::storage::BitVector allStates(this->getModel().getNumberOfStates(), true);
130 return std::make_unique<ExplicitCertificateCheckResult<ValueType>>(std::move(certificate), std::move(allStates));
131 } else {
132 STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "Certificates are not implemented for this value type.");
133 }
134 }
136 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), this->getModel().getTransitionMatrix(),
137 this->getModel().getBackwardTransitions(), this->getModel().getExitRateVector(), leftResult.getTruthValuesVector(), rightResult.getTruthValuesVector(),
138 checkTask.isQualitativeSet());
139 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
140}
141
142template<typename SparseCtmcModelType>
145 storm::logic::HOAPathFormula const& pathFormula = checkTask.getFormula();
146
147 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
150
151 auto formulaChecker = [&](storm::logic::Formula const& formula) {
152 return this->check(env, formula)->template asExplicitQualitativeCheckResult<ValueType>().getTruthValuesVector();
153 };
154 auto apSets = helper.computeApSets(pathFormula.getAPMapping(), formulaChecker);
155 std::vector<ValueType> numericResult = helper.computeDAProductProbabilities(env, *pathFormula.readAutomaton(), apSets);
156
157 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
158}
159
160template<typename SparseCtmcModelType>
163 storm::logic::PathFormula const& pathFormula = checkTask.getFormula();
164
165 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
168
169 auto formulaChecker = [&](storm::logic::Formula const& formula) {
170 return this->check(env, formula)->template asExplicitQualitativeCheckResult<ValueType>().getTruthValuesVector();
171 };
172 std::vector<ValueType> numericResult = helper.computeLTLProbabilities(env, pathFormula, formulaChecker);
173
174 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
175}
176
177template<typename SparseCtmcModelType>
181 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Computing instantaneous rewards is not supported for this numeric type.");
182 return nullptr;
183 } else {
184 storm::logic::InstantaneousRewardFormula const& rewardPathFormula = checkTask.getFormula();
185 STORM_LOG_THROW(!rewardPathFormula.isStepBounded(), storm::exceptions::NotImplementedException,
186 "Currently step-bounded properties on CTMCs are not supported.");
188 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(),
189 checkTask.isRewardModelSet() ? this->getModel().getRewardModel(checkTask.getRewardModel()) : this->getModel().getRewardModel(""),
190 rewardPathFormula.getBound<ValueType>());
191 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
192 }
193}
194
195template<typename SparseCtmcModelType>
199 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Computing cumulative rewards is not supported for this numeric type.");
200 return nullptr;
201 } else {
202 storm::logic::CumulativeRewardFormula const& rewardPathFormula = checkTask.getFormula();
203 STORM_LOG_THROW(rewardPathFormula.getTimeBoundReference().isTimeBound(), storm::exceptions::NotImplementedException,
204 "Currently step-bounded and reward-bounded properties on CTMCs are not supported.");
205 auto rewardModel = storm::utility::createFilteredRewardModel(this->getModel(), checkTask);
207 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(),
208 rewardModel.get(), rewardPathFormula.getNonStrictBound<ValueType>());
209 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
210 }
211}
212
213template<typename SparseCtmcModelType>
216 storm::logic::EventuallyFormula const& eventuallyFormula = checkTask.getFormula();
217 std::unique_ptr<CheckResult> subResultPointer = this->check(env, eventuallyFormula.getSubformula());
218 ExplicitQualitativeCheckResult<ValueType> const& subResult = subResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
219 auto rewardModel = storm::utility::createFilteredRewardModel(this->getModel(), checkTask);
220 if (checkTask.isProduceCertificateSet()) {
222 STORM_LOG_INFO("Computing reachability rewards with certificate ...");
223 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
224 auto weights = this->getModel().getExitRateVector();
225 STORM_LOG_ASSERT(std::all_of(weights.begin(), weights.end(), [](auto const& rate) { return rate > storm::utility::zero<ValueType>(); }),
226 "Exit rates of a CTMC must be positive.");
227 std::transform(weights.begin(), weights.end(), weights.begin(), [](auto const& rate) { return storm::utility::one<ValueType>() / rate; });
228 auto rewardVector = rewardModel.get().getTotalActionRewardVector(probabilisticTransitions, weights);
230 env, std::nullopt, std::move(probabilisticTransitions), subResult.getTruthValuesVector(), std::move(rewardVector),
231 eventuallyFormula.getSubformula().toString(), checkTask.isRewardModelSet() ? checkTask.getRewardModel() : "");
232 storm::storage::BitVector allStates(this->getModel().getNumberOfStates(), true);
233 return std::make_unique<ExplicitCertificateCheckResult<ValueType>>(std::move(certificate), std::move(allStates));
234 } else {
235 STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "Certificates are not implemented for this value type.");
236 }
237 }
238 std::vector<ExtendedValueType> numericResult = storm::modelchecker::helper::SparseCtmcCslHelper::computeReachabilityRewards(
239 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), this->getModel().getTransitionMatrix(),
240 this->getModel().getBackwardTransitions(), this->getModel().getExitRateVector(), rewardModel.get(), subResult.getTruthValuesVector(),
241 checkTask.isQualitativeSet());
242 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
243}
244
245template<typename SparseCtmcModelType>
248 auto rewardModel = storm::utility::createFilteredRewardModel(this->getModel(), checkTask);
249 std::vector<ExtendedValueType> numericResult = storm::modelchecker::helper::SparseCtmcCslHelper::computeTotalRewards(
250 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), this->getModel().getTransitionMatrix(),
251 this->getModel().getBackwardTransitions(), this->getModel().getExitRateVector(), rewardModel.get(), checkTask.isQualitativeSet());
252 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
253}
254
255template<typename SparseCtmcModelType>
258 storm::logic::StateFormula const& stateFormula = checkTask.getFormula();
259 std::unique_ptr<CheckResult> subResultPointer = this->check(env, stateFormula);
260 ExplicitQualitativeCheckResult<ValueType> const& subResult = subResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
261
262 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
263 storm::modelchecker::helper::SparseDeterministicInfiniteHorizonHelper<ValueType> helper(probabilisticTransitions, this->getModel().getExitRateVector());
265 auto values = helper.computeLongRunAverageProbabilities(env, subResult.getTruthValuesVector());
266
267 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(values)));
268}
269
270template<typename SparseCtmcModelType>
273 auto rewardModel = storm::utility::createFilteredRewardModel(this->getModel(), checkTask);
274 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
275 storm::modelchecker::helper::SparseDeterministicInfiniteHorizonHelper<ValueType> helper(probabilisticTransitions, this->getModel().getExitRateVector());
277 auto values = helper.computeLongRunAverageRewards(env, rewardModel.get());
278 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(values)));
279}
280
281template<typename SparseCtmcModelType>
284 storm::logic::EventuallyFormula const& eventuallyFormula = checkTask.getFormula();
285 std::unique_ptr<CheckResult> subResultPointer = this->check(env, eventuallyFormula.getSubformula());
286 ExplicitQualitativeCheckResult<ValueType>& subResult = subResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
287 if (checkTask.isProduceCertificateSet()) {
289 STORM_LOG_INFO("Computing reachability times with certificate ...");
290 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
291 auto weights = this->getModel().getExitRateVector();
292 STORM_LOG_ASSERT(std::all_of(weights.begin(), weights.end(), [](auto const& rate) { return rate > storm::utility::zero<ValueType>(); }),
293 "Exit rates of a CTMC must be positive.");
294 std::transform(weights.begin(), weights.end(), weights.begin(),
295 [](auto const& rate) -> ValueType { return storm::utility::one<ValueType>() / rate; });
296 auto certificate = storm::modelchecker::computeReachabilityRewardCertificate(env, std::nullopt, std::move(probabilisticTransitions),
297 subResult.getTruthValuesVector(), std::move(weights),
298 eventuallyFormula.getSubformula().toString(), "time");
299 storm::storage::BitVector allStates(this->getModel().getNumberOfStates(), true);
300 return std::make_unique<ExplicitCertificateCheckResult<ValueType>>(std::move(certificate), std::move(allStates));
301 } else {
302 STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "Certificates are not implemented for this value type.");
303 }
304 }
305 std::vector<ExtendedValueType> numericResult = storm::modelchecker::helper::SparseCtmcCslHelper::computeReachabilityTimes(
306 env, storm::solver::SolveGoal<ValueType>(this->getModel(), checkTask), this->getModel().getTransitionMatrix(),
307 this->getModel().getBackwardTransitions(), this->getModel().getExitRateVector(), subResult.getTruthValuesVector(), checkTask.isQualitativeSet());
308 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult)));
309}
310
311template<typename SparseCtmcModelType>
315 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Computing transient probabilities is not supported for this numeric type.");
316 return {};
317 } else {
318 storm::logic::BoundedUntilFormula const& pathFormula = checkTask.getFormula();
319 STORM_LOG_THROW(pathFormula.getTimeBoundReference().isTimeBound(), storm::exceptions::NotImplementedException,
320 "Currently step-bounded or reward-bounded properties on CTMCs are not supported.");
321 STORM_LOG_THROW(pathFormula.hasUpperBound(), storm::exceptions::NotImplementedException, "Computation needs upper limit for time bound.");
322 ValueType upperBound = pathFormula.getNonStrictUpperBound<ValueType>();
323
324 std::unique_ptr<CheckResult> leftResultPointer = this->check(env, pathFormula.getLeftSubformula());
325 std::unique_ptr<CheckResult> rightResultPointer = this->check(env, pathFormula.getRightSubformula());
326 ExplicitQualitativeCheckResult<ValueType> const& leftResult = leftResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
327 ExplicitQualitativeCheckResult<ValueType> const& rightResult = rightResultPointer->template asExplicitQualitativeCheckResult<ValueType>();
328
330 env, this->getModel().getTransitionMatrix(), this->getModel().getInitialStates(), leftResult.getTruthValuesVector(),
331 rightResult.getTruthValuesVector(), this->getModel().getExitRateVector(), upperBound);
332 return result;
333 }
334}
335
336template<typename SparseCtmcModelType>
338 // Initialize helper
339 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
340 storm::modelchecker::helper::SparseDeterministicInfiniteHorizonHelper<ValueType> helper(probabilisticTransitions, this->getModel().getExitRateVector());
341
342 // Compute result
343 std::vector<ValueType> result;
344 auto const& initialStates = this->getModel().getInitialStates();
345 uint64_t numInitStates = initialStates.getNumberOfSetBits();
346 if (numInitStates == 1) {
347 result = helper.computeLongRunAverageStateDistribution(env, *initialStates.begin());
348 } else {
349 STORM_LOG_WARN("Multiple initial states found. A uniform distribution over initial states is assumed.");
351 result = helper.computeLongRunAverageStateDistribution(env, [&initialStates, &initProb](uint64_t const& stateIndex) {
352 return initialStates.get(stateIndex) ? initProb : storm::utility::zero<ValueType>();
353 });
354 }
355
356 // Return CheckResult
357 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(result)));
358}
359
360template<typename SparseCtmcModelType>
362 // Initialize helper
363 auto probabilisticTransitions = this->getModel().computeProbabilityMatrix();
364 storm::modelchecker::helper::SparseDeterministicVisitingTimesHelper<ValueType> helper(probabilisticTransitions, this->getModel().getExitRateVector());
365
366 // Compute result
367 auto const& initialStates = this->getModel().getInitialStates();
368 uint64_t numInitStates = initialStates.getNumberOfSetBits();
369 STORM_LOG_THROW(numInitStates > 0, storm::exceptions::InvalidOperationException, "No initial states given. Cannot compute expected visiting times.");
370 STORM_LOG_WARN_COND(numInitStates == 1, "Multiple initial states found. A uniform distribution over initial states is assumed.");
371 std::vector<ExtendedValueType> result = helper.computeExpectedVisitingTimes(env, initialStates);
372
373 // Return CheckResult
374 return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(result)));
375}
376
377// Explicitly instantiate the model checker.
379
382
383} // namespace modelchecker
384} // namespace storm
Formula const & getRightSubformula() const
Formula const & getLeftSubformula() const
TimeBoundReference const & getTimeBoundReference(unsigned i=0) const
ValueType getNonStrictUpperBound(unsigned i=0) const
storm::expressions::Expression const & getLowerBound(unsigned i=0) const
TimeBoundReference const & getTimeBoundReference() const
std::string toString() const
Definition Formula.cpp:617
virtual bool isTrueFormula() const
Definition Formula.cpp:70
FragmentSpecification & setRewardAccumulationAllowed(bool newValue)
FragmentSpecification & setTimeOperatorsAllowed(bool newValue)
FragmentSpecification & setTotalRewardFormulasAllowed(bool newValue)
FragmentSpecification & setLongRunAverageRewardFormulasAllowed(bool newValue)
FragmentSpecification & setLongRunAverageProbabilitiesAllowed(bool newValue)
FragmentSpecification & setTimeAllowed(bool newValue)
const ap_to_formula_map & getAPMapping() const
std::shared_ptr< storm::automata::DeterministicAutomaton > readAutomaton() const
storm::expressions::Expression const & getBound() const
Formula const & getSubformula() const
virtual std::unique_ptr< CheckResult > check(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
bool isProduceCertificateSet() const
Retrieves whether certificate(s) are to be produced (if supported).
Definition CheckTask.h:295
bool isRewardModelSet() const
Retrieves whether a reward model was set.
Definition CheckTask.h:192
bool isQualitativeSet() const
Retrieves whether the computation only needs to be performed qualitatively, because the values will o...
Definition CheckTask.h:259
std::string const & getRewardModel() const
Retrieves the reward model over which to perform the checking (if set).
Definition CheckTask.h:199
FormulaType const & getFormula() const
Retrieves the formula from this task.
Definition CheckTask.h:142
A qualitative check result over the states of a sparse model.
vector_type const & getTruthValuesVector() const
Retrieves the truth values, one per state this result is for.
A quantitative check result over the states of a sparse model.
virtual std::unique_ptr< CheckResult > computeCumulativeRewards(Environment const &env, CheckTask< storm::logic::CumulativeRewardFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeLTLProbabilities(Environment const &env, CheckTask< storm::logic::PathFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeReachabilityTimes(Environment const &env, CheckTask< storm::logic::EventuallyFormula, ValueType > const &checkTask) override
std::unique_ptr< CheckResult > computeExpectedVisitingTimes(Environment const &env)
Computes for each state the expected number of times we visit that state.
virtual std::unique_ptr< CheckResult > computeInstantaneousRewards(Environment const &env, CheckTask< storm::logic::InstantaneousRewardFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeLongRunAverageProbabilities(Environment const &env, CheckTask< storm::logic::StateFormula, ValueType > const &checkTask) override
static bool canHandleStatic(CheckTask< storm::logic::Formula, ValueType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeBoundedUntilProbabilities(Environment const &env, CheckTask< storm::logic::BoundedUntilFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeReachabilityRewards(Environment const &env, CheckTask< storm::logic::EventuallyFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeLongRunAverageRewards(Environment const &env, CheckTask< storm::logic::LongRunAverageRewardFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeNextProbabilities(Environment const &env, CheckTask< storm::logic::NextFormula, ValueType > const &checkTask) override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
SparseCtmcCslModelChecker(SparseCtmcModelType const &model)
std::unique_ptr< CheckResult > computeSteadyStateDistribution(Environment const &env)
Computes the long run average (or: steady state) distribution over all states Assumes a uniform distr...
virtual std::unique_ptr< CheckResult > computeTotalRewards(Environment const &env, CheckTask< storm::logic::TotalRewardFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeGloballyProbabilities(Environment const &env, CheckTask< storm::logic::GloballyFormula, ValueType > const &checkTask) override
std::vector< ValueType > computeAllTransientProbabilities(Environment const &env, CheckTask< storm::logic::BoundedUntilFormula, ValueType > const &checkTask)
Compute transient probabilities for all states.
virtual std::unique_ptr< CheckResult > computeUntilProbabilities(Environment const &env, CheckTask< storm::logic::UntilFormula, ValueType > const &checkTask) override
virtual std::unique_ptr< CheckResult > computeHOAPathProbabilities(Environment const &env, CheckTask< storm::logic::HOAPathFormula, ValueType > const &checkTask) override
static std::vector< ValueType > computeUntilProbabilities(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, bool qualitative)
static std::vector< ValueType > computeCumulativeRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, ValueType timeBound)
static std::vector< storm::utility::ExtendedValueType< ValueType > > computeReachabilityTimes(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, storm::storage::BitVector const &targetStates, bool qualitative)
static std::vector< ValueType > computeAllTransientProbabilities(Environment const &env, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::BitVector const &initialStates, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, std::vector< ValueType > const &exitRates, ValueType timeBound)
static std::vector< storm::utility::ExtendedValueType< ValueType > > computeReachabilityRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, storm::storage::BitVector const &targetStates, bool qualitative)
static std::vector< ValueType > computeBoundedUntilProbabilities(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, std::vector< ValueType > const &exitRates, bool qualitative, ValueType lowerBound, std::optional< ValueType > const &upperBound)
static std::vector< storm::utility::ExtendedValueType< ValueType > > computeTotalRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, bool qualitative)
static std::vector< ValueType > computeNextProbabilities(Environment const &env, storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRateVector, storm::storage::BitVector const &nextStates)
static std::vector< ValueType > computeInstantaneousRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, ValueType timeBound)
Helper class for model checking queries that depend on the long run behavior of the (nondeterministic...
Helper class for computing for each state the expected number of times to visit that state assuming a...
static DTMCSparseModelCheckingHelperReturnType< SolutionType > computeGloballyProbabilities(Environment const &env, storm::solver::SolveGoal< ValueType, SolutionType > &&goal, storm::storage::SparseMatrix< ValueType > const &transitionMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, storm::storage::BitVector const &psiStates, bool qualitative)
Helper class for LTL model checking.
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
#define STORM_LOG_INFO(message)
Definition logging.h:34
#define STORM_LOG_WARN(message)
Definition logging.h:35
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:9
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:54
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:39
FragmentSpecification csrlstar()
void setInformationFromCheckTaskDeterministic(HelperType &helper, storm::modelchecker::CheckTask< FormulaType, typename ModelType::ValueType > const &checkTask, ModelType const &model)
Forwards relevant information stored in the given CheckTask to the given helper.
constexpr bool SupportsCertificates
Certificates can be computed for models with these value types.
Definition Certificate.h:27
std::unique_ptr< ReachabilityRewardCertificate< ValueType > > computeReachabilityRewardCertificate(storm::Environment const &env, std::optional< storm::OptimizationDirection > dir, storm::storage::SparseMatrix< ValueType > const &transitionProbabilityMatrix, storm::storage::BitVector targetStates, std::vector< ValueType > stateActionRewardVector, std::string targetLabel, std::string rewardModelName)
Computes a certificate for expected rewards accumulated until reaching the target states.
std::unique_ptr< ReachabilityProbabilityCertificate< ValueType > > computeReachabilityProbabilityCertificate(storm::Environment const &env, std::optional< storm::OptimizationDirection > dir, storm::storage::SparseMatrix< ValueType > const &transitionProbabilityMatrix, storm::storage::BitVector targetStates, std::optional< storm::storage::BitVector > constraintStates, std::string targetLabel, std::optional< std::string > constraintLabel)
Computes a certificate for reachability probabilities (or constrained reachability probabilities if c...
FilteredRewardModel< RewardModelType > createFilteredRewardModel(RewardModelType const &baseRewardModel, storm::logic::RewardAccumulation const &acc, bool isDiscreteTimeModel)
ValueType zero()
Definition constants.cpp:26
ValueType one()
Definition constants.cpp:21
TargetType convertNumber(SourceType const &number)
The contract of a DD backend.
static const bool SupportsExponential