Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
verification.h
Go to the documentation of this file.
1#pragma once
2
9
10namespace storm::gbar {
11namespace api {
12
13//
14// Verifying with Abstraction Refinement engine
15//
17
18template<storm::dd::DdType DdType, typename ValueType>
19typename std::enable_if<!std::is_same<ValueType, storm::RationalFunction>::value, std::unique_ptr<storm::modelchecker::CheckResult>>::type
23 std::unique_ptr<storm::modelchecker::CheckResult> result;
26 if (modelchecker.canHandle(task)) {
27 result = modelchecker.check(env, task);
28 }
31 if (modelchecker.canHandle(task)) {
32 result = modelchecker.check(env, task);
33 }
34 } else {
35 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException,
36 "The model type " << model.getModelType() << " is not supported by the abstraction refinement engine.");
37 }
38 return result;
39}
40
41template<storm::dd::DdType DdType, typename ValueType>
42typename std::enable_if<std::is_same<ValueType, storm::RationalFunction>::value, std::unique_ptr<storm::modelchecker::CheckResult>>::type
46 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Abstraction-refinement engine does not support data type.");
47}
48
49template<storm::dd::DdType DdType, typename ValueType>
56
57template<storm::dd::DdType DdType, typename ValueType>
58typename std::enable_if<std::is_same<ValueType, double>::value, std::unique_ptr<storm::modelchecker::CheckResult>>::type verifyWithAbstractionRefinementEngine(
59 storm::Environment const& env, std::shared_ptr<storm::models::symbolic::Model<DdType, ValueType>> const& model,
62 std::unique_ptr<storm::modelchecker::CheckResult> result;
63 model->getManager().execute([&]() {
64 if (model->getType() == storm::models::ModelType::Dtmc) {
66 *model->template as<storm::models::symbolic::Dtmc<DdType, double>>(), options);
67 if (modelchecker.canHandle(task)) {
68 result = modelchecker.check(env, task);
69 }
70 } else if (model->getType() == storm::models::ModelType::Mdp) {
72 *model->template as<storm::models::symbolic::Mdp<DdType, double>>(), options);
73 if (modelchecker.canHandle(task)) {
74 result = modelchecker.check(env, task);
75 }
76 } else {
77 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException,
78 "The model type " << model->getType() << " is not supported by the abstraction refinement engine.");
79 }
80 });
81 return result;
82}
83
84template<storm::dd::DdType DdType, typename ValueType>
85typename std::enable_if<!std::is_same<ValueType, double>::value, std::unique_ptr<storm::modelchecker::CheckResult>>::type verifyWithAbstractionRefinementEngine(
88 STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Abstraction-refinement engine does not support data type.");
89}
90
91template<storm::dd::DdType DdType, typename ValueType>
99
100} // namespace api
101} // namespace storm::gbar
This class represents a discrete-time Markov chain.
Definition Dtmc.h:13
This class represents a discrete-time Markov decision process.
Definition Mdp.h:13
Base class for all symbolic models.
Definition Model.h:42
storm::expressions::ExpressionManager & getManager() const
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:39
std::enable_if<!std::is_same< ValueType, storm::RationalFunction >::value, std::unique_ptr< storm::modelchecker::CheckResult > >::type verifyWithAbstractionRefinementEngine(storm::Environment const &env, storm::storage::SymbolicModelDescription const &model, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task, AbstractionRefinementOptions const &options=AbstractionRefinementOptions())
storm::gbar::abstraction::AbstractionOptions AbstractionRefinementOptions
Options that configure the game-based abstraction-refinement procedure.