diff --git a/src/modelchecker/AbstractModelChecker.h b/src/modelchecker/AbstractModelChecker.h index 5517dbacd..d7538defc 100644 --- a/src/modelchecker/AbstractModelChecker.h +++ b/src/modelchecker/AbstractModelChecker.h @@ -1,5 +1,5 @@ /* - * DtmcPrctlModelChecker.h + * AbstractModelChecker.h * * Created on: 22.10.2012 * Author: Thomas Heinemann @@ -8,31 +8,42 @@ #ifndef STORM_MODELCHECKER_ABSTRACTMODELCHECKER_H_ #define STORM_MODELCHECKER_ABSTRACTMODELCHECKER_H_ -namespace storm { namespace modelChecker { -template class AbstractModelChecker; -}} +// Forward declaration of abstract model checker class needed by the formula classes. +namespace storm { +namespace modelChecker { + + template class AbstractModelChecker; + +} +} #include "src/exceptions/InvalidPropertyException.h" #include "src/formula/Formulas.h" #include "src/storage/BitVector.h" #include "src/models/AbstractModel.h" +#include "log4cplus/logger.h" +#include "log4cplus/loggingmacros.h" + #include +extern log4cplus::Logger logger; + namespace storm { namespace modelChecker { /*! * @brief - * Interface for model checker classes. - * - * This class provides basic functions that are the same for all subclasses, but mainly only declares - * abstract methods that are to be implemented in concrete instances. + * (Abstract) interface for all model checker classes. * - * @attention This class is abstract. + * This class provides basic functions that are common to all model checkers (i.e. subclasses). It mainly declares + * abstract methods that are implemented in the concrete subclasses, but also covers checking procedures that are common + * to all model checkers for state-based models. */ template class AbstractModelChecker : + // A list of interfaces the model checker supports. Typically, for each of the interfaces, a check method needs to + // be implemented that performs the corresponding check. public virtual storm::formula::IApModelChecker, public virtual storm::formula::IAndModelChecker, public virtual storm::formula::IOrModelChecker, @@ -51,32 +62,64 @@ class AbstractModelChecker : public virtual storm::formula::IInstantaneousRewardModelChecker { public: - explicit AbstractModelChecker(storm::models::AbstractModel& model) - : model(model) { - // Nothing to do here... + /*! + * Constructs an AbstractModelChecker with the given model. + */ + explicit AbstractModelChecker(storm::models::AbstractModel const& model) : model(model) { + // Intentionally left empty. } - explicit AbstractModelChecker(AbstractModelChecker* modelChecker) - : model(modelChecker->model) { + /*! + * Copy constructs an AbstractModelChecker from the given model checker. In particular, this means that the newly + * constructed model checker will have the model of the given model checker as its associated model. + */ + explicit AbstractModelChecker(AbstractModelChecker const& modelChecker) : model(modelChecker.model) { + // Intentionally left empty. } + /*! + * Returns a pointer to the model checker object that is of the requested type as given by the template parameters. + * @returns A pointer to the model checker object that is of the requested type as given by the template parameters. + * If the model checker is not of the requested type, type casting will fail and result in an exception. + */ template