|
@ -7,6 +7,7 @@ |
|
|
|
|
|
|
|
|
#include "storm/modelchecker/results/SymbolicQualitativeCheckResult.h"
|
|
|
#include "storm/modelchecker/results/SymbolicQualitativeCheckResult.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "storm/storage/dd/DdManager.h"
|
|
|
#include "storm/storage/dd/Add.h"
|
|
|
#include "storm/storage/dd/Add.h"
|
|
|
#include "storm/storage/dd/Bdd.h"
|
|
|
#include "storm/storage/dd/Bdd.h"
|
|
|
|
|
|
|
|
@ -30,14 +31,14 @@ namespace storm { |
|
|
template<typename CValueType, typename std::enable_if<storm::NumberTraits<CValueType>::SupportsExponential, int>::type> |
|
|
template<typename CValueType, typename std::enable_if<storm::NumberTraits<CValueType>::SupportsExponential, int>::type> |
|
|
bool HybridCtmcCslModelChecker<ModelType>::canHandleImplementation(CheckTask<storm::logic::Formula, CValueType> const& checkTask) const { |
|
|
bool HybridCtmcCslModelChecker<ModelType>::canHandleImplementation(CheckTask<storm::logic::Formula, CValueType> const& checkTask) const { |
|
|
storm::logic::Formula const& formula = checkTask.getFormula(); |
|
|
storm::logic::Formula const& formula = checkTask.getFormula(); |
|
|
return formula.isInFragment(storm::logic::csrl().setGloballyFormulasAllowed(false).setLongRunAverageRewardFormulasAllowed(true).setLongRunAverageProbabilitiesAllowed(true)); |
|
|
|
|
|
|
|
|
return formula.isInFragment(storm::logic::csrl().setGloballyFormulasAllowed(false).setLongRunAverageRewardFormulasAllowed(true).setLongRunAverageProbabilitiesAllowed(true).setTimeAllowed(true).setTimeOperatorsAllowed(true)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
template <typename ModelType> |
|
|
template <typename ModelType> |
|
|
template<typename CValueType, typename std::enable_if<!storm::NumberTraits<CValueType>::SupportsExponential, int>::type> |
|
|
template<typename CValueType, typename std::enable_if<!storm::NumberTraits<CValueType>::SupportsExponential, int>::type> |
|
|
bool HybridCtmcCslModelChecker<ModelType>::canHandleImplementation(CheckTask<storm::logic::Formula, CValueType> const& checkTask) const { |
|
|
bool HybridCtmcCslModelChecker<ModelType>::canHandleImplementation(CheckTask<storm::logic::Formula, CValueType> const& checkTask) const { |
|
|
storm::logic::Formula const& formula = checkTask.getFormula(); |
|
|
storm::logic::Formula const& formula = checkTask.getFormula(); |
|
|
return formula.isInFragment(storm::logic::prctl().setGloballyFormulasAllowed(false).setLongRunAverageRewardFormulasAllowed(true).setLongRunAverageProbabilitiesAllowed(true).setTimeBoundedUntilFormulasAllowed(false).setCumulativeRewardFormulasAllowed(false).setInstantaneousFormulasAllowed(false)); |
|
|
|
|
|
|
|
|
return formula.isInFragment(storm::logic::csrl().setGloballyFormulasAllowed(false).setLongRunAverageRewardFormulasAllowed(true).setLongRunAverageProbabilitiesAllowed(true).setTimeAllowed(true).setTimeOperatorsAllowed(true).setBoundedUntilFormulasAllowed(false).setCumulativeRewardFormulasAllowed(false).setInstantaneousFormulasAllowed(false)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
template<typename ModelType> |
|
|
template<typename ModelType> |
|
@ -60,7 +61,6 @@ namespace storm { |
|
|
return storm::modelchecker::helper::HybridCtmcCslHelper::computeNextProbabilities<DdType, ValueType>(env, this->getModel(), this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(), subResult.getTruthValuesVector()); |
|
|
return storm::modelchecker::helper::HybridCtmcCslHelper::computeNextProbabilities<DdType, ValueType>(env, this->getModel(), this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(), subResult.getTruthValuesVector()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename ModelType> |
|
|
template<typename ModelType> |
|
|
std::unique_ptr<CheckResult> HybridCtmcCslModelChecker<ModelType>::computeReachabilityRewards(Environment const& env, storm::logic::RewardMeasureType, CheckTask<storm::logic::EventuallyFormula, ValueType> const& checkTask) { |
|
|
std::unique_ptr<CheckResult> HybridCtmcCslModelChecker<ModelType>::computeReachabilityRewards(Environment const& env, storm::logic::RewardMeasureType, CheckTask<storm::logic::EventuallyFormula, ValueType> const& checkTask) { |
|
|
storm::logic::EventuallyFormula const& eventuallyFormula = checkTask.getFormula(); |
|
|
storm::logic::EventuallyFormula const& eventuallyFormula = checkTask.getFormula(); |
|
@ -70,6 +70,17 @@ namespace storm { |
|
|
return storm::modelchecker::helper::HybridCtmcCslHelper::computeReachabilityRewards<DdType, ValueType>(env, this->getModel(), this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(), checkTask.isRewardModelSet() ? this->getModel().getRewardModel(checkTask.getRewardModel()) : this->getModel().getRewardModel(""), subResult.getTruthValuesVector(), checkTask.isQualitativeSet()); |
|
|
return storm::modelchecker::helper::HybridCtmcCslHelper::computeReachabilityRewards<DdType, ValueType>(env, this->getModel(), this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(), checkTask.isRewardModelSet() ? this->getModel().getRewardModel(checkTask.getRewardModel()) : this->getModel().getRewardModel(""), subResult.getTruthValuesVector(), checkTask.isQualitativeSet()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<typename ModelType> |
|
|
|
|
|
std::unique_ptr<CheckResult> HybridCtmcCslModelChecker<ModelType>::computeReachabilityTimes(Environment const& env, storm::logic::RewardMeasureType, CheckTask<storm::logic::EventuallyFormula, ValueType> const& checkTask) { |
|
|
|
|
|
storm::logic::EventuallyFormula const& eventuallyFormula = checkTask.getFormula(); |
|
|
|
|
|
std::unique_ptr<CheckResult> subResultPointer = this->check(env, eventuallyFormula.getSubformula()); |
|
|
|
|
|
SymbolicQualitativeCheckResult<DdType> const& subResult = subResultPointer->asSymbolicQualitativeCheckResult<DdType>(); |
|
|
|
|
|
|
|
|
|
|
|
storm::models::symbolic::StandardRewardModel<DdType, ValueType> timeRewardModel(this->getModel().getManager().getConstant(storm::utility::one<ValueType>()), boost::none, boost::none); |
|
|
|
|
|
return storm::modelchecker::helper::HybridCtmcCslHelper::computeReachabilityRewards<DdType, ValueType>(env, this->getModel(), this->getModel().getTransitionMatrix(), this->getModel().getExitRateVector(), timeRewardModel, subResult.getTruthValuesVector(), checkTask.isQualitativeSet()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<typename ModelType> |
|
|
template<typename ModelType> |
|
|
std::unique_ptr<CheckResult> HybridCtmcCslModelChecker<ModelType>::computeBoundedUntilProbabilities(Environment const& env, CheckTask<storm::logic::BoundedUntilFormula, ValueType> const& checkTask) { |
|
|
std::unique_ptr<CheckResult> HybridCtmcCslModelChecker<ModelType>::computeBoundedUntilProbabilities(Environment const& env, CheckTask<storm::logic::BoundedUntilFormula, ValueType> const& checkTask) { |
|
|
storm::logic::BoundedUntilFormula const& pathFormula = checkTask.getFormula(); |
|
|
storm::logic::BoundedUntilFormula const& pathFormula = checkTask.getFormula(); |
|
|