|
@ -117,41 +117,14 @@ namespace storm { |
|
|
template<typename SparseDtmcModelType> |
|
|
template<typename SparseDtmcModelType> |
|
|
std::unique_ptr<CheckResult> SparseDtmcPrctlModelChecker<SparseDtmcModelType>::computeHOAPathProbabilities(Environment const& env, CheckTask<storm::logic::HOAPathFormula, ValueType> const& checkTask) { |
|
|
std::unique_ptr<CheckResult> SparseDtmcPrctlModelChecker<SparseDtmcModelType>::computeHOAPathProbabilities(Environment const& env, CheckTask<storm::logic::HOAPathFormula, ValueType> const& checkTask) { |
|
|
storm::logic::HOAPathFormula const& pathFormula = checkTask.getFormula(); |
|
|
storm::logic::HOAPathFormula const& pathFormula = checkTask.getFormula(); |
|
|
|
|
|
|
|
|
storm::modelchecker::helper::SparseLTLHelper<ValueType, false> helper(this->getModel().getTransitionMatrix()); |
|
|
|
|
|
storm::modelchecker::helper::setInformationFromCheckTaskDeterministic(helper, checkTask, this->getModel()); |
|
|
|
|
|
|
|
|
|
|
|
auto formulaChecker = [&] (storm::logic::Formula const& formula) { return this->check(env, formula)->asExplicitQualitativeCheckResult().getTruthValuesVector(); }; |
|
|
|
|
|
auto apSets = helper.computeApSets(pathFormula.getAPMapping(), formulaChecker); |
|
|
|
|
|
std::vector<ValueType> numericResult = helper.computeDAProductProbabilities(env, *pathFormula.readAutomaton(), apSets); |
|
|
|
|
|
|
|
|
|
|
|
return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult))); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<typename SparseDtmcModelType> |
|
|
|
|
|
std::unique_ptr<CheckResult> SparseDtmcPrctlModelChecker<SparseDtmcModelType>::computeLTLProbabilities(Environment const& env, CheckTask<storm::logic::PathFormula, ValueType> const& checkTask) { |
|
|
|
|
|
storm::logic::PathFormula const& pathFormula = checkTask.getFormula(); |
|
|
|
|
|
|
|
|
|
|
|
storm::modelchecker::helper::SparseLTLHelper<ValueType, false> helper(this->getModel().getTransitionMatrix()); |
|
|
storm::modelchecker::helper::SparseLTLHelper<ValueType, false> helper(this->getModel().getTransitionMatrix()); |
|
|
storm::modelchecker::helper::setInformationFromCheckTaskDeterministic(helper, checkTask, this->getModel()); |
|
|
storm::modelchecker::helper::setInformationFromCheckTaskDeterministic(helper, checkTask, this->getModel()); |
|
|
|
|
|
|
|
|
auto formulaChecker = [&] (storm::logic::Formula const& formula) { return this->check(env, formula)->asExplicitQualitativeCheckResult().getTruthValuesVector(); }; |
|
|
|
|
|
std::vector<ValueType> numericResult = helper.computeLTLProbabilities(env, pathFormula, formulaChecker); |
|
|
|
|
|
|
|
|
|
|
|
return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult))); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<typename SparseDtmcModelType> |
|
|
|
|
|
std::unique_ptr<CheckResult> SparseDtmcPrctlModelChecker<SparseDtmcModelType>::computeHOAPathProbabilities(Environment const& env, CheckTask<storm::logic::HOAPathFormula, ValueType> const& checkTask) { |
|
|
|
|
|
storm::logic::HOAPathFormula const& pathFormula = checkTask.getFormula(); |
|
|
|
|
|
|
|
|
|
|
|
storm::modelchecker::helper::SparseLTLHelper<ValueType, false> helper(this->getModel().getTransitionMatrix()); |
|
|
|
|
|
storm::modelchecker::helper::setInformationFromCheckTaskDeterministic(helper, checkTask, this->getModel()); |
|
|
|
|
|
|
|
|
|
|
|
auto formulaChecker = [&] (storm::logic::Formula const& formula) { return this->check(env, formula)->asExplicitQualitativeCheckResult().getTruthValuesVector(); }; |
|
|
auto formulaChecker = [&] (storm::logic::Formula const& formula) { return this->check(env, formula)->asExplicitQualitativeCheckResult().getTruthValuesVector(); }; |
|
|
auto apSets = helper.computeApSets(pathFormula.getAPMapping(), formulaChecker); |
|
|
auto apSets = helper.computeApSets(pathFormula.getAPMapping(), formulaChecker); |
|
|
std::vector<ValueType> numericResult = helper.computeDAProductProbabilities(env, *pathFormula.readAutomaton(), apSets); |
|
|
std::vector<ValueType> numericResult = helper.computeDAProductProbabilities(env, *pathFormula.readAutomaton(), apSets); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult))); |
|
|
return std::unique_ptr<CheckResult>(new ExplicitQuantitativeCheckResult<ValueType>(std::move(numericResult))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -161,7 +134,7 @@ namespace storm { |
|
|
|
|
|
|
|
|
storm::modelchecker::helper::SparseLTLHelper<ValueType, false> helper(this->getModel().getTransitionMatrix()); |
|
|
storm::modelchecker::helper::SparseLTLHelper<ValueType, false> helper(this->getModel().getTransitionMatrix()); |
|
|
storm::modelchecker::helper::setInformationFromCheckTaskDeterministic(helper, checkTask, this->getModel()); |
|
|
storm::modelchecker::helper::setInformationFromCheckTaskDeterministic(helper, checkTask, this->getModel()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto formulaChecker = [&] (storm::logic::Formula const& formula) { return this->check(env, formula)->asExplicitQualitativeCheckResult().getTruthValuesVector(); }; |
|
|
auto formulaChecker = [&] (storm::logic::Formula const& formula) { return this->check(env, formula)->asExplicitQualitativeCheckResult().getTruthValuesVector(); }; |
|
|
std::vector<ValueType> numericResult = helper.computeLTLProbabilities(env, pathFormula, formulaChecker); |
|
|
std::vector<ValueType> numericResult = helper.computeLTLProbabilities(env, pathFormula, formulaChecker); |
|
|
|
|
|
|
|
|