Storm 1.11.1.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>
12 : SparseInstantiationModelChecker<SparseModelType, ConstantType>(parametricModel), modelInstantiator(parametricModel) {
13 // Intentionally left empty
14}
15
16template<typename SparseModelType, typename ConstantType>
19 STORM_LOG_THROW(this->currentCheckTask, storm::exceptions::InvalidStateException, "Checking has been invoked but no property has been specified before.");
20 auto const& instantiatedModel = modelInstantiator.instantiate(valuation);
22
23 return modelChecker.check(env, *this->currentCheckTask);
24}
25
26template<typename SparseModelType, typename ConstantType>
29 auto const& instantiatedModel = modelInstantiator.instantiate(valuation);
30 // Check that all rates are non-negative.
31 for (auto const& entry : instantiatedModel.getTransitionMatrix()) {
32 if (!storm::utility::isNonNegative(entry.getValue())) {
33 return false;
34 }
35 }
36 return true;
37}
38
41} // namespace modelchecker
42} // 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
Class to efficiently check a formula on a parametric model with different parameter instantiations.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
std::map< typename VariableType< FunctionType >::type, typename CoefficientType< FunctionType >::type > Valuation
Definition parametric.h:43
bool isNonNegative(ValueType const &a)
Definition constants.cpp:68