|
|
@ -31,7 +31,7 @@ namespace storm { |
|
|
|
|
|
|
|
template <typename SparseCtmcModelType> |
|
|
|
bool SparseCtmcCslModelChecker<SparseCtmcModelType>::canHandle(storm::logic::Formula const& formula) const { |
|
|
|
return formula.isCslStateFormula() || formula.isCslPathFormula() || formula.isRewardPathFormula(); |
|
|
|
return formula.isCslStateFormula() || formula.isCslPathFormula() || formula.isRewardPathFormula() || formula.isExpectedTimeOperatorFormula(); |
|
|
|
} |
|
|
|
|
|
|
|
template <typename SparseCtmcModelType> |
|
|
@ -101,8 +101,17 @@ namespace storm { |
|
|
|
storm::storage::SparseMatrix<ValueType> probabilityMatrix = storm::modelchecker::helper::SparseCtmcCslHelper<ValueType>::computeProbabilityMatrix(this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector()); |
|
|
|
std::vector<ValueType> numericResult = storm::modelchecker::helper::SparseCtmcCslHelper<ValueType>::computeLongRunAverage(probabilityMatrix, subResult.getTruthValuesVector(), &this->getModel().getExitRateVector(), qualitative, *linearEquationSolverFactory); |
|
|
|
return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult))); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
template <typename SparseCtmcModelType> |
|
|
|
std::unique_ptr<CheckResult> SparseCtmcCslModelChecker<SparseCtmcModelType>::computeExpectedTimes(storm::logic::EventuallyFormula const& eventuallyFormula, bool qualitative, boost::optional<OptimizationDirection> const& optimalityType) { |
|
|
|
std::unique_ptr<CheckResult> subResultPointer = this->check(eventuallyFormula.getSubformula()); |
|
|
|
ExplicitQualitativeCheckResult& subResult = subResultPointer->asExplicitQualitativeCheckResult(); |
|
|
|
|
|
|
|
std::vector<ValueType> numericResult = storm::modelchecker::helper::SparseCtmcCslHelper<ValueType>::computeExpectedTimes(this->getModel().getTransitionMatrix(), this->getModel().getBackwardTransitions(), this->getModel().getExitRateVector(), subResult.getTruthValuesVector(), qualitative, *linearEquationSolverFactory); |
|
|
|
return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult))); |
|
|
|
} |
|
|
|
|
|
|
|
// Explicitly instantiate the model checker.
|
|
|
|
template class SparseCtmcCslModelChecker<storm::models::sparse::Ctmc<double>>; |
|
|
|
|
|
|
|