From 19839036af3c26b3d348e6ceb883f4f0bdcef2ff Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Wed, 16 Dec 2020 11:47:01 +0100 Subject: [PATCH] AbstractMC passes game formula to the rpatl MC --- src/storm/modelchecker/AbstractModelChecker.cpp | 12 ++++++++++++ src/storm/modelchecker/AbstractModelChecker.h | 8 +++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/storm/modelchecker/AbstractModelChecker.cpp b/src/storm/modelchecker/AbstractModelChecker.cpp index 67f03bc9a..8ec5df265 100644 --- a/src/storm/modelchecker/AbstractModelChecker.cpp +++ b/src/storm/modelchecker/AbstractModelChecker.cpp @@ -15,6 +15,7 @@ #include "storm/models/sparse/Ctmc.h" #include "storm/models/sparse/Mdp.h" #include "storm/models/sparse/Pomdp.h" +#include "storm/models/sparse/Smg.h" #include "storm/models/symbolic/Dtmc.h" #include "storm/models/symbolic/Ctmc.h" #include "storm/models/symbolic/Mdp.h" @@ -53,6 +54,8 @@ namespace storm { return this->checkMultiObjectiveFormula(env, checkTask.substituteFormula(formula.asMultiObjectiveFormula())); } else if (formula.isQuantileFormula()){ return this->checkQuantileFormula(env, checkTask.substituteFormula(formula.asQuantileFormula())); + } else if(formula.isGameFormula()){ + return this->checkGameFormula(env, checkTask.substituteFormula(formula.asGameFormula())); } STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "The given formula '" << formula << "' is invalid."); } @@ -321,6 +324,11 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "This model checker (" << getClassName() << ") does not support the formula: " << checkTask.getFormula() << "."); } + template + std::unique_ptr AbstractModelChecker::checkGameFormula(Environment const& env, CheckTask const& checkTask) { + STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "This model checker (" << getClassName() << ") does not support the formula: " << checkTask.getFormula() << "."); + } + /////////////////////////////////////////////// // Explicitly instantiate the template class. /////////////////////////////////////////////// @@ -331,9 +339,11 @@ namespace storm { template class AbstractModelChecker>; template class AbstractModelChecker>; template class AbstractModelChecker>; + template class AbstractModelChecker>; #ifdef STORM_HAVE_CARL template class AbstractModelChecker>>; + template class AbstractModelChecker>>; template class AbstractModelChecker>; template class AbstractModelChecker>; @@ -341,12 +351,14 @@ namespace storm { template class AbstractModelChecker>; template class AbstractModelChecker>; template class AbstractModelChecker>; + template class AbstractModelChecker>; template class AbstractModelChecker>; template class AbstractModelChecker>; template class AbstractModelChecker>; template class AbstractModelChecker>; template class AbstractModelChecker>; + template class AbstractModelChecker>; #endif // DD template class AbstractModelChecker>; diff --git a/src/storm/modelchecker/AbstractModelChecker.h b/src/storm/modelchecker/AbstractModelChecker.h index 80bf18fb6..59149711c 100644 --- a/src/storm/modelchecker/AbstractModelChecker.h +++ b/src/storm/modelchecker/AbstractModelChecker.h @@ -88,13 +88,15 @@ namespace storm { virtual std::unique_ptr checkTimeOperatorFormula(Environment const& env, CheckTask const& checkTask); virtual std::unique_ptr checkLongRunAverageOperatorFormula(Environment const& env, CheckTask const& checkTask); virtual std::unique_ptr checkUnaryBooleanStateFormula(Environment const& env, CheckTask const& checkTask); - + // The methods to check multi-objective formulas. virtual std::unique_ptr checkMultiObjectiveFormula(Environment const& env, CheckTask const& checkTask); - + // The methods to check quantile formulas. virtual std::unique_ptr checkQuantileFormula(Environment const& env, CheckTask const& checkTask); - + + // The methods to check game formulas. + virtual std::unique_ptr checkGameFormula(Environment const& env, CheckTask const& checkTask); }; } }