Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseCtmcInstantiationModelChecker.cpp
Go to the documentation of this file.
2
6
7namespace storm {
8namespace modelchecker {
9
10template<typename SparseModelType, typename ConstantType>
16
17template<typename SparseModelType, typename ConstantType>
20 STORM_LOG_THROW(this->currentCheckTask, storm::exceptions::InvalidStateException, "Checking has been invoked but no property has been specified before.");
21 auto const& instantiatedModel = modelInstantiator.instantiate(valuation);
23
24 return modelChecker.check(env, *this->currentCheckTask);
25}
26
27template<typename SparseModelType, typename ConstantType>
30 auto const& instantiatedModel = modelInstantiator.instantiate(valuation);
31 // Check that all rates are non-negative.
32 for (auto const& entry : instantiatedModel.getTransitionMatrix()) {
33 if (!storm::utility::isNonNegative(entry.getValue())) {
34 return false;
35 }
36 }
37 return true;
38}
39
42} // namespace modelchecker
43} // namespace storm
virtual std::unique_ptr< CheckResult > check(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
Checks the provided formula.
Class to efficiently check a formula on a parametric model with different parameter instantiations.
virtual bool isWellDefined(storm::utility::parametric::Valuation< typename SparseModelType::ValueType > const &valuation) override
Checks if the given valuation is valid for the current model.
virtual std::unique_ptr< CheckResult > check(Environment const &env, storm::utility::parametric::Valuation< typename SparseModelType::ValueType > const &valuation) override
SparseCtmcInstantiationModelChecker(Environment const &env, SparseModelType const &parametricModel)
storm::utility::ModelInstantiator< SparseModelType, storm::models::sparse::Ctmc< ConstantType > > modelInstantiator
SparseInstantiationModelChecker(Environment const &env, SparseModelType const &parametricModel)
std::unique_ptr< CheckTask< storm::logic::Formula, ConstantType > > currentCheckTask
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:39
std::map< typename VariableType< FunctionType >::type, typename CoefficientType< FunctionType >::type > Valuation
Definition parametric.h:43
bool isNonNegative(ValueType const &a)
Definition constants.cpp:74