#include "src/modelchecker/propositional/SymbolicPropositionalModelChecker.h" #include "src/models/symbolic/Dtmc.h" #include "src/models/symbolic/Mdp.h" #include "src/modelchecker/results/SymbolicQualitativeCheckResult.h" #include "src/utility/macros.h" #include "src/exceptions/InvalidPropertyException.h" namespace storm { namespace modelchecker { template SymbolicPropositionalModelChecker::SymbolicPropositionalModelChecker(storm::models::symbolic::Model const& model) : model(model) { // Intentionally left empty. } template bool SymbolicPropositionalModelChecker::canHandle(storm::logic::Formula const& formula) const { return formula.isPropositionalFormula(); } template std::unique_ptr SymbolicPropositionalModelChecker::checkBooleanLiteralFormula(storm::logic::BooleanLiteralFormula const& stateFormula) { if (stateFormula.isTrueFormula()) { return std::unique_ptr(new SymbolicQualitativeCheckResult(model.getReachableStates(), model.getReachableStates())); } else { return std::unique_ptr(new SymbolicQualitativeCheckResult(model.getReachableStates(), model.getManager().getZero())); } } template std::unique_ptr SymbolicPropositionalModelChecker::checkAtomicLabelFormula(storm::logic::AtomicLabelFormula const& stateFormula) { STORM_LOG_THROW(model.hasLabel(stateFormula.getLabel()), storm::exceptions::InvalidPropertyException, "The property refers to unknown label '" << stateFormula.getLabel() << "'."); return std::unique_ptr(new SymbolicQualitativeCheckResult(model.getReachableStates(), model.getStates(stateFormula.getLabel()))); } template storm::models::symbolic::Model const& SymbolicPropositionalModelChecker::getModel() const { return model; } template template ModelType const& SymbolicPropositionalModelChecker::getModelAs() const { return dynamic_cast(model); } // Explicitly instantiate the template class. template storm::models::symbolic::Dtmc const& SymbolicPropositionalModelChecker::getModelAs() const; template storm::models::symbolic::Mdp const& SymbolicPropositionalModelChecker::getModelAs() const; template class SymbolicPropositionalModelChecker; } }