/* * SteadyStateNoBoundOperator.h * * Created on: 09.04.2013 * Author: thomas */ #ifndef STORM_FORMULA_CSL_STEADYSTATENOBOUNDOPERATOR_H_ #define STORM_FORMULA_CSL_STEADYSTATENOBOUNDOPERATOR_H_ #include "AbstractStateFormula.h" #include "AbstractNoBoundOperator.h" #include "src/formula/abstract/SteadyStateNoBoundOperator.h" namespace storm { namespace property { namespace csl { template class SteadyStateNoBoundOperator; /*! * @brief Interface class for model checkers that support SteadyStateOperator. * * All model checkers that support the formula class SteadyStateOperator must inherit * this pure virtual class. */ template class ISteadyStateNoBoundOperatorModelChecker { public: /*! * @brief Evaluates SteadyStateOperator formula within a model checker. * * @param obj Formula object with subformulas. * @return Result of the formula for every node. */ virtual std::vector checkSteadyStateNoBoundOperator(const SteadyStateNoBoundOperator& obj) const = 0; }; template class SteadyStateNoBoundOperator: public storm::property::abstract::SteadyStateNoBoundOperator>, public AbstractNoBoundOperator { public: /*! * Empty constructor */ SteadyStateNoBoundOperator() : storm::property::abstract::SteadyStateNoBoundOperator>() { // Intentionally left empty } /*! * Constructor * * @param stateFormula The state formula that forms the subtree */ SteadyStateNoBoundOperator(AbstractStateFormula* stateFormula) : storm::property::abstract::SteadyStateNoBoundOperator>(stateFormula) { // Intentionally left empty } /*! * Destructor */ ~SteadyStateNoBoundOperator() { // Intentionally left empty } /*! * Clones the called object. * * Performs a "deep copy", i.e. the subtrees of the new object are clones of the original ones * * @returns a new BoundedUntil-object that is identical the called object. */ virtual AbstractNoBoundOperator * clone() const override { SteadyStateNoBoundOperator* result = new SteadyStateNoBoundOperator(); result->setStateFormula(this->getStateFormula().clone()); return result; } /*! * Calls the model checker to check this formula. * Needed to infer the correct type of formula class. * * @note This function should only be called in a generic check function of a model checker class. For other uses, * the methods of the model checker should be used. * * @returns A vector indicating the probability that the formula holds for each state. */ virtual std::vector check(const storm::modelchecker::csl::AbstractModelChecker& modelChecker, bool qualitative=false) const override { return modelChecker.template as()->checkSteadyStateNoBoundOperator(*this); } }; } /* namespace csl */ } /* namespace property */ } /* namespace storm */ #endif /* STORM_FORMULA_CSL_STEADYSTATENOBOUNDOPERATOR_H_ */