Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseCtmcInstantiationModelChecker.cpp
Go to the documentation of this file.
2
7
8namespace storm {
9namespace modelchecker {
10
11template<typename SparseModelType, typename ConstantType>
13 : SparseInstantiationModelChecker<SparseModelType, ConstantType>(parametricModel), modelInstantiator(parametricModel) {
14 // Intentionally left empty
15}
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
33 for (auto const& entry : instantiatedModel.getTransitionMatrix()) {
34 if (comparator.isLess(entry.getValue(), storm::utility::zero<ConstantType>())) {
35 return false;
36 }
37 }
38 return true;
39}
40
43} // namespace modelchecker
44} // 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.
bool isLess(ValueType const &value1, ValueType const &value2) const
#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
LabParser.cpp.