|
@ -8,6 +8,7 @@ |
|
|
#include "storm/models/sparse/Pomdp.h"
|
|
|
#include "storm/models/sparse/Pomdp.h"
|
|
|
#include "storm/models/sparse/MarkovAutomaton.h"
|
|
|
#include "storm/models/sparse/MarkovAutomaton.h"
|
|
|
#include "storm/models/sparse/StandardRewardModel.h"
|
|
|
#include "storm/models/sparse/StandardRewardModel.h"
|
|
|
|
|
|
#include "storm/models/sparse/Smg.h"
|
|
|
|
|
|
|
|
|
#include "storm/modelchecker/results/ExplicitQualitativeCheckResult.h"
|
|
|
#include "storm/modelchecker/results/ExplicitQualitativeCheckResult.h"
|
|
|
|
|
|
|
|
@ -22,13 +23,13 @@ namespace storm { |
|
|
SparsePropositionalModelChecker<SparseModelType>::SparsePropositionalModelChecker(SparseModelType const& model) : model(model) { |
|
|
SparsePropositionalModelChecker<SparseModelType>::SparsePropositionalModelChecker(SparseModelType const& model) : model(model) { |
|
|
// Intentionally left empty.
|
|
|
// Intentionally left empty.
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename SparseModelType> |
|
|
template<typename SparseModelType> |
|
|
bool SparsePropositionalModelChecker<SparseModelType>::canHandle(CheckTask<storm::logic::Formula, ValueType> const& checkTask) const { |
|
|
bool SparsePropositionalModelChecker<SparseModelType>::canHandle(CheckTask<storm::logic::Formula, ValueType> const& checkTask) const { |
|
|
storm::logic::Formula const& formula = checkTask.getFormula(); |
|
|
storm::logic::Formula const& formula = checkTask.getFormula(); |
|
|
return formula.isInFragment(storm::logic::propositional()); |
|
|
return formula.isInFragment(storm::logic::propositional()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename SparseModelType> |
|
|
template<typename SparseModelType> |
|
|
std::unique_ptr<CheckResult> SparsePropositionalModelChecker<SparseModelType>::checkBooleanLiteralFormula(Environment const& env, CheckTask<storm::logic::BooleanLiteralFormula, ValueType> const& checkTask) { |
|
|
std::unique_ptr<CheckResult> SparsePropositionalModelChecker<SparseModelType>::checkBooleanLiteralFormula(Environment const& env, CheckTask<storm::logic::BooleanLiteralFormula, ValueType> const& checkTask) { |
|
|
storm::logic::BooleanLiteralFormula const& stateFormula = checkTask.getFormula(); |
|
|
storm::logic::BooleanLiteralFormula const& stateFormula = checkTask.getFormula(); |
|
@ -38,19 +39,19 @@ namespace storm { |
|
|
return std::unique_ptr<CheckResult>(new ExplicitQualitativeCheckResult(storm::storage::BitVector(model.getNumberOfStates()))); |
|
|
return std::unique_ptr<CheckResult>(new ExplicitQualitativeCheckResult(storm::storage::BitVector(model.getNumberOfStates()))); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename SparseModelType> |
|
|
template<typename SparseModelType> |
|
|
std::unique_ptr<CheckResult> SparsePropositionalModelChecker<SparseModelType>::checkAtomicLabelFormula(Environment const& env, CheckTask<storm::logic::AtomicLabelFormula, ValueType> const& checkTask) { |
|
|
std::unique_ptr<CheckResult> SparsePropositionalModelChecker<SparseModelType>::checkAtomicLabelFormula(Environment const& env, CheckTask<storm::logic::AtomicLabelFormula, ValueType> const& checkTask) { |
|
|
storm::logic::AtomicLabelFormula const& stateFormula = checkTask.getFormula(); |
|
|
storm::logic::AtomicLabelFormula const& stateFormula = checkTask.getFormula(); |
|
|
STORM_LOG_THROW(model.hasLabel(stateFormula.getLabel()), storm::exceptions::InvalidPropertyException, "The property refers to unknown label '" << stateFormula.getLabel() << "'."); |
|
|
STORM_LOG_THROW(model.hasLabel(stateFormula.getLabel()), storm::exceptions::InvalidPropertyException, "The property refers to unknown label '" << stateFormula.getLabel() << "'."); |
|
|
return std::unique_ptr<CheckResult>(new ExplicitQualitativeCheckResult(model.getStates(stateFormula.getLabel()))); |
|
|
return std::unique_ptr<CheckResult>(new ExplicitQualitativeCheckResult(model.getStates(stateFormula.getLabel()))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename SparseModelType> |
|
|
template<typename SparseModelType> |
|
|
SparseModelType const& SparsePropositionalModelChecker<SparseModelType>::getModel() const { |
|
|
SparseModelType const& SparsePropositionalModelChecker<SparseModelType>::getModel() const { |
|
|
return model; |
|
|
return model; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Explicitly instantiate the template class.
|
|
|
// Explicitly instantiate the template class.
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Model<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Model<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Dtmc<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Dtmc<double>>; |
|
@ -58,9 +59,11 @@ namespace storm { |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Pomdp<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Pomdp<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::MarkovAutomaton<double>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::MarkovAutomaton<double>>; |
|
|
|
|
|
|
|
|
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Smg<double>>; |
|
|
|
|
|
|
|
|
#ifdef STORM_HAVE_CARL
|
|
|
#ifdef STORM_HAVE_CARL
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<double, storm::models::sparse::StandardRewardModel<storm::Interval>>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<double, storm::models::sparse::StandardRewardModel<storm::Interval>>>; |
|
|
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Smg<double, storm::models::sparse::StandardRewardModel<storm::Interval>>>; |
|
|
|
|
|
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Model<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Model<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Dtmc<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Dtmc<storm::RationalNumber>>; |
|
@ -68,12 +71,14 @@ namespace storm { |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Pomdp<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Pomdp<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::MarkovAutomaton<storm::RationalNumber>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::MarkovAutomaton<storm::RationalNumber>>; |
|
|
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Smg<storm::RationalNumber>>; |
|
|
|
|
|
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Model<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Model<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Dtmc<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Dtmc<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Ctmc<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Ctmc<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Mdp<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::MarkovAutomaton<storm::RationalFunction>>; |
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::MarkovAutomaton<storm::RationalFunction>>; |
|
|
|
|
|
template class SparsePropositionalModelChecker<storm::models::sparse::Smg<storm::RationalFunction>>; |
|
|
#endif
|
|
|
#endif
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |