From 7d95a45633fc8ec43388727484ac9ecc628cedd4 Mon Sep 17 00:00:00 2001 From: dehnert Date: Sun, 10 Feb 2013 23:52:27 +0100 Subject: [PATCH] Fixed bug in AbstractModelChecker: it does now correctly inherit from a lot more interface classes. NOTE: checking a formula on a model checker that does not support it failed silently. This should NOT be the case. Re-enabled DEBUG option for cmake. NOTE: why was this disabled anyway? Introduced another layer AbstractDeterministicModel and AbstractNonDeterministicModel in model hierarchy to allow for easily distinguishing these classes. Made necessary adaptions in (hopefully) all classes. Move the graph analyzer to utility folder. --- CMakeLists.txt | 14 +- src/formula/ReachabilityReward.h | 1 - src/modelchecker/AbstractModelChecker.h | 13 +- src/modelchecker/DtmcPrctlModelChecker.h | 5 +- src/modelchecker/GmmxxDtmcPrctlModelChecker.h | 28 ++-- src/models/AbstractDeterministicModel.h | 61 +++++++ src/models/AbstractModel.h | 140 +++++++++++++++- src/models/AbstractNonDeterministicModel.h | 49 ++++++ src/models/Ctmc.h | 127 ++------------ src/models/Ctmdp.h | 152 ++--------------- src/models/Dtmc.h | 156 ++---------------- src/models/GraphTransitions.h | 6 +- src/models/Mdp.h | 152 ++--------------- src/parser/AutoParser.cpp | 79 --------- src/parser/AutoParser.h | 76 ++++++++- src/storm.cpp | 2 +- src/utility/GraphAnalyzer.h | 10 +- src/utility/IoUtility.cpp | 2 +- test/parser/ParseMdpTest.cpp | 2 +- 19 files changed, 414 insertions(+), 661 deletions(-) create mode 100644 src/models/AbstractDeterministicModel.h create mode 100644 src/models/AbstractNonDeterministicModel.h delete mode 100644 src/parser/AutoParser.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ffe20f22..8cf280117 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,13 +50,13 @@ option(USE_POPCNT "Sets whether the popcnt instruction is going to be used." ON) option(USE_BOOST_STATIC_LIBRARIES "Sets whether the Boost libraries should be linked statically." ON) # If the DEBUG option was turned on, we will target a debug version and a release version otherwise -#if (DEBUG) -# set (CMAKE_BUILD_TYPE "DEBUG") -# message(STATUS "Building DEBUG version.") -#else() -# set (CMAKE_BUILD_TYPE "RELEASE") -# message(STATUS "Building RELEASE version.") -#endif() +if (DEBUG) + set (CMAKE_BUILD_TYPE "DEBUG") + message(STATUS "Building DEBUG version.") +else() + set (CMAKE_BUILD_TYPE "RELEASE") + message(STATUS "Building RELEASE version.") +endif() message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") message(STATUS "CMAKE_BUILD_TYPE (ENV): $ENV{CMAKE_BUILD_TYPE}") diff --git a/src/formula/ReachabilityReward.h b/src/formula/ReachabilityReward.h index ad8171642..a725e202a 100644 --- a/src/formula/ReachabilityReward.h +++ b/src/formula/ReachabilityReward.h @@ -11,7 +11,6 @@ #include "src/formula/AbstractPathFormula.h" #include "src/formula/AbstractStateFormula.h" #include "src/formula/AbstractFormulaChecker.h" -#include "src/modelchecker/AbstractModelChecker.h" namespace storm { namespace formula { diff --git a/src/modelchecker/AbstractModelChecker.h b/src/modelchecker/AbstractModelChecker.h index 5e0920231..69bbeb9da 100644 --- a/src/modelchecker/AbstractModelChecker.h +++ b/src/modelchecker/AbstractModelChecker.h @@ -33,12 +33,19 @@ template class AbstractModelChecker : public virtual storm::formula::IApModelChecker, public virtual storm::formula::IAndModelChecker, + public virtual storm::formula::IOrModelChecker, + public virtual storm::formula::INotModelChecker, + public virtual storm::formula::IUntilModelChecker, public virtual storm::formula::IEventuallyModelChecker, public virtual storm::formula::IGloballyModelChecker, public virtual storm::formula::INextModelChecker, - public virtual storm::formula::INotModelChecker, - public virtual storm::formula::IOrModelChecker - { + public virtual storm::formula::IBoundedUntilModelChecker, + public virtual storm::formula::IBoundedEventuallyModelChecker, + public virtual storm::formula::INoBoundOperatorModelChecker, + public virtual storm::formula::IPathBoundOperatorModelChecker, + public virtual storm::formula::IReachabilityRewardModelChecker, + public virtual storm::formula::ICumulativeRewardModelChecker, + public virtual storm::formula::IInstantaneousRewardModelChecker { public: template