44template<
typename ValueType>
45 requires(!storm::IsIntervalType<ValueType>)
47 bool onlyInitialStatesRelevant =
false) {
51template<
typename ValueType>
52 requires(storm::IsIntervalType<ValueType>)
55 bool onlyInitialStatesRelevant =
false) {
64template<
typename ValueType>
68 if (!std::is_same_v<ValueType, double>) {
69 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Exploration engine does not support data type.");
71 STORM_LOG_THROW(model.
isPrismProgram(), storm::exceptions::NotSupportedException,
"Exploration engine is currently only applicable to PRISM models.");
74 std::unique_ptr<storm::modelchecker::CheckResult> result;
78 result = checker.
check(env, task);
83 result = checker.
check(env, task);
87 "The model type " << program.
getModelType() <<
" is not supported by the exploration engine.");
94template<
typename ValueType>
104template<
typename ValueType>
108 std::unique_ptr<storm::modelchecker::CheckResult> result;
109 if (storm::settings::getModule<storm::settings::modules::CoreSettings>().getEquationSolver() == storm::solver::EquationSolverType::Elimination &&
110 storm::settings::getModule<storm::settings::modules::EliminationSettings>().isUseDedicatedModelCheckerSet()) {
111 if constexpr (storm::IsIntervalType<ValueType>) {
112 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"We do not yet support using the elimination checker with intervals models.");
114 auto newTask = task.template convertValueType<
117 if (modelchecker.canHandle(newTask)) {
118 result = modelchecker.check(env, newTask);
123 task.template convertValueType<typename storm::modelchecker::SparseDtmcPrctlModelChecker<storm::models::sparse::Dtmc<ValueType>>::SolutionType>();
125 result = modelchecker.
check(env, newTask);
131template<
typename ValueType>
138template<
typename ValueType>
142 if constexpr (storm::IsIntervalType<ValueType>) {
143 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Sparse engine cannot verify interval CTMCs.");
145 std::unique_ptr<storm::modelchecker::CheckResult> result;
148 result = modelchecker.
check(env, task);
154template<
typename ValueType>
161template<
typename ValueType>
165 using ModelCheckerType = std::conditional_t<std::is_same_v<ValueType, storm::RationalFunction>,
169 std::unique_ptr<storm::modelchecker::CheckResult> result;
170 ModelCheckerType modelchecker(*mdp);
173 auto newTask = task.template convertValueType<typename ModelCheckerType::SolutionType>();
174 if (modelchecker.canHandle(newTask)) {
175 result = modelchecker.check(env, newTask);
180template<
typename ValueType>
187template<
typename ValueType>
191 if constexpr (std::is_same_v<ValueType, storm::RationalFunction> || storm::IsIntervalType<ValueType>) {
192 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Sparse engine cannot verify MAs with this data type.");
194 std::unique_ptr<storm::modelchecker::CheckResult> result;
197 if (!ma->isClosed()) {
198 STORM_LOG_WARN(
"Closing Markov automaton. Consider closing the MA before verification.");
204 result = modelchecker.
check(env, task);
210template<
typename ValueType>
217template<
typename ValueType>
221 if constexpr (std::is_same_v<ValueType, storm::RationalFunction> || storm::IsIntervalType<ValueType>) {
222 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Sparse engine cannot verify SMGs with this data type.");
224 std::unique_ptr<storm::modelchecker::CheckResult> result;
227 result = modelchecker.
check(env, task);
233template<
typename ValueType>
240template<
typename ValueType>
244 std::unique_ptr<storm::modelchecker::CheckResult> result;
256 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"The model type " << model->getType() <<
" is not supported by the sparse engine.");
261template<
typename ValueType>
268template<
typename ValueType>
271 if constexpr (storm::IsIntervalType<ValueType>) {
272 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Can not compute steady state distributions for interval models.");
274 std::unique_ptr<storm::modelchecker::CheckResult> result;
280template<
typename ValueType>
283 if constexpr (storm::IsIntervalType<ValueType>) {
284 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Can not compute steady state distributions for interval models.");
286 std::unique_ptr<storm::modelchecker::CheckResult> result;
292template<
typename ValueType>
295 std::unique_ptr<storm::modelchecker::CheckResult> result;
302 "Computing the long run average distribution for the model type " << model->getType() <<
" is not supported.");
307template<
typename ValueType>
310 if constexpr (storm::IsIntervalType<ValueType>) {
311 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Can not compute expected visiting times for interval models.");
313 std::unique_ptr<storm::modelchecker::CheckResult> result;
319template<
typename ValueType>
322 if constexpr (storm::IsIntervalType<ValueType>) {
323 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Can not compute expected visiting times for interval models.");
325 std::unique_ptr<storm::modelchecker::CheckResult> result;
331template<
typename ValueType>
334 std::unique_ptr<storm::modelchecker::CheckResult> result;
341 "Computing expected visiting times for the model type " << model->getType() <<
" is not supported.");
349template<storm::dd::DdType DdType,
typename ValueType>
353 if constexpr (storm::IsIntervalType<ValueType>) {
354 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Hybrid engine cannot verify DTMC with this data type.");
356 std::unique_ptr<storm::modelchecker::CheckResult> result;
357 dtmc->getManager().execute([&]() {
360 result = modelchecker.
check(env, task);
367template<storm::dd::DdType DdType,
typename ValueType>
374template<storm::dd::DdType DdType,
typename ValueType>
378 if constexpr (storm::IsIntervalType<ValueType>) {
379 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Hybrid engine cannot verify CTMC with this data type.");
381 std::unique_ptr<storm::modelchecker::CheckResult> result;
382 ctmc->getManager().execute([&]() {
385 result = modelchecker.
check(env, task);
392template<storm::dd::DdType DdType,
typename ValueType>
399template<storm::dd::DdType DdType,
typename ValueType>
403 if constexpr (std::is_same_v<ValueType, storm::RationalFunction> || storm::IsIntervalType<ValueType>) {
404 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Hybrid engine cannot verify MDPs with this data type.");
406 std::unique_ptr<storm::modelchecker::CheckResult> result;
407 mdp->getManager().execute([&]() {
410 result = modelchecker.
check(env, task);
417template<storm::dd::DdType DdType,
typename ValueType>
424template<storm::dd::DdType DdType,
typename ValueType>
428 if constexpr (std::is_same_v<ValueType, storm::RationalFunction> || storm::IsIntervalType<ValueType>) {
429 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Hybrid engine cannot verify MDPs with this data type.");
431 std::unique_ptr<storm::modelchecker::CheckResult> result;
432 ma->getManager().execute([&]() {
435 result = modelchecker.
check(env, task);
442template<storm::dd::DdType DdType,
typename ValueType>
449template<storm::dd::DdType DdType,
typename ValueType>
453 std::unique_ptr<storm::modelchecker::CheckResult> result;
463 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"The model type " << model->getType() <<
" is not supported by the hybrid engine.");
468template<storm::dd::DdType DdType,
typename ValueType>
478template<storm::dd::DdType DdType,
typename ValueType>
482 if constexpr (storm::IsIntervalType<ValueType>) {
483 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Dd engine cannot verify DTMC with this data type.");
485 std::unique_ptr<storm::modelchecker::CheckResult> result;
486 dtmc->getManager().execute([&]() {
489 result = modelchecker.
check(env, task);
496template<storm::dd::DdType DdType,
typename ValueType>
503template<storm::dd::DdType DdType,
typename ValueType>
507 if constexpr (std::is_same_v<ValueType, storm::RationalFunction> || storm::IsIntervalType<ValueType>) {
508 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"Dd engine cannot verify MDPs with this data type.");
510 std::unique_ptr<storm::modelchecker::CheckResult> result;
511 mdp->getManager().execute([&]() {
514 result = modelchecker.
check(env, task);
521template<storm::dd::DdType DdType,
typename ValueType>
528template<storm::dd::DdType DdType,
typename ValueType>
532 std::unique_ptr<storm::modelchecker::CheckResult> result;
538 STORM_LOG_THROW(
false, storm::exceptions::NotSupportedException,
"The model type " << model->getType() <<
" is not supported by the dd engine.");
543template<storm::dd::DdType DdType,
typename ValueType>
virtual std::unique_ptr< CheckResult > check(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
Checks the provided formula.
void setUncertaintyResolutionMode(UncertaintyResolutionMode uncertaintyResolutionMode)
Sets the mode which decides how the uncertainty will be resolved.
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
std::unique_ptr< CheckResult > computeExpectedVisitingTimes(Environment const &env)
Computes for each state the expected number of times we visit that state.
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
std::unique_ptr< CheckResult > computeSteadyStateDistribution(Environment const &env)
Computes the long run average (or: steady state) distribution over all states Assumes a uniform distr...
std::unique_ptr< CheckResult > computeExpectedVisitingTimes(Environment const &env)
Computes for each state the expected number of times we visit that state.
virtual bool canHandle(CheckTask< storm::logic::Formula, SolutionType > const &checkTask) const override
Determines whether the model checker can handle the given verification task.
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 bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
virtual bool canHandle(CheckTask< storm::logic::Formula, ValueType > const &checkTask) const override
This class represents a continuous-time Markov chain.
This class represents a discrete-time Markov chain.
This class represents a Markov automaton.
This class represents a (discrete-time) Markov decision process.
Base class for all sparse models.
This class represents a stochastic multiplayer game.
This class represents a continuous-time Markov chain.
This class represents a discrete-time Markov chain.
This class represents a discrete-time Markov decision process.
This class represents a discrete-time Markov decision process.
Base class for all symbolic models.
ModelType getModelType() const
Retrieves the model type of the model.
storm::prism::Program const & asPrismProgram() const
bool isPrismProgram() const
#define STORM_LOG_WARN(message)
#define STORM_LOG_THROW(cond, exception, message)
std::unique_ptr< storm::modelchecker::CheckResult > verifyWithHybridEngine(storm::Environment const &env, std::shared_ptr< storm::models::symbolic::Dtmc< DdType, ValueType > > const &dtmc, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task)
storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > createTask(std::shared_ptr< const storm::logic::Formula > const &formula, bool onlyInitialStatesRelevant=false)
std::unique_ptr< storm::modelchecker::CheckResult > verifyWithExplorationEngine(storm::Environment const &env, storm::storage::SymbolicModelDescription const &model, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task)
std::unique_ptr< storm::modelchecker::CheckResult > computeExpectedVisitingTimesWithSparseEngine(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Dtmc< ValueType > > const &dtmc)
std::unique_ptr< storm::modelchecker::CheckResult > verifyWithDdEngine(storm::Environment const &env, std::shared_ptr< storm::models::symbolic::Dtmc< DdType, ValueType > > const &dtmc, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task)
std::unique_ptr< storm::modelchecker::CheckResult > verifyWithSparseEngine(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Dtmc< ValueType > > const &dtmc, storm::modelchecker::CheckTask< storm::logic::Formula, ValueType > const &task)
std::unique_ptr< storm::modelchecker::CheckResult > computeSteadyStateDistributionWithSparseEngine(storm::Environment const &env, std::shared_ptr< storm::models::sparse::Dtmc< ValueType > > const &dtmc)
UncertaintyResolutionMode