@ -31,7 +31,7 @@ namespace storm {
template < typename SparseDtmcModelType >
template < typename SparseDtmcModelType >
bool SparseDtmcPrctlModelChecker < SparseDtmcModelType > : : canHandle ( CheckTask < storm : : logic : : Formula , ValueType > const & checkTask ) const {
bool SparseDtmcPrctlModelChecker < SparseDtmcModelType > : : canHandle ( CheckTask < storm : : logic : : Formula , ValueType > const & checkTask ) const {
storm : : logic : : Formula const & formula = checkTask . getFormula ( ) ;
storm : : logic : : Formula const & formula = checkTask . getFormula ( ) ;
return formula . isInFragment ( storm : : logic : : prctl ( ) . setLongRunAverageRewardFormulasAllowed ( true ) . setLongRunAverageProbabilitiesAllowed ( true ) . setConditionalProbabilityFormulasAllowed ( true ) . setConditionalRewardFormulasAllowed ( true ) . setTotalRewardFormulasAllowed ( true ) . setOnlyEventuallyFormuluasInConditionalFormulasAllowed ( true ) . setRewardBoundedUntilFormulasAllowed ( true ) . setRewardBoundedCumulativeRewardFormulasAllowed ( true ) . setMultiDimensionalBoundedUntilFormulasAllowed ( true ) . setMultiDimensionalCumulativeRewardFormulasAllowed ( true ) ) ;
return formula . isInFragment ( storm : : logic : : prctl ( ) . setLongRunAverageRewardFormulasAllowed ( true ) . setLongRunAverageProbabilitiesAllowed ( true ) . setConditionalProbabilityFormulasAllowed ( true ) . setConditionalRewardFormulasAllowed ( true ) . setTotalRewardFormulasAllowed ( true ) . setOnlyEventuallyFormuluasInConditionalFormulasAllowed ( true ) . setRewardBoundedUntilFormulasAllowed ( true ) . setRewardBoundedCumulativeRewardFormulasAllowed ( true ) . setMultiDimensionalBoundedUntilFormulasAllowed ( true ) . setMultiDimensionalCumulativeRewardFormulasAllowed ( true ) . setTimeOperatorsAllowed ( true ) . setReachbilityTimeFormulasAllowed ( true ) ) ;
}
}
template < typename SparseDtmcModelType >
template < typename SparseDtmcModelType >
@ -124,6 +124,15 @@ namespace storm {
return std : : unique_ptr < CheckResult > ( new ExplicitQuantitativeCheckResult < ValueType > ( std : : move ( numericResult ) ) ) ;
return std : : unique_ptr < CheckResult > ( new ExplicitQuantitativeCheckResult < ValueType > ( std : : move ( numericResult ) ) ) ;
}
}
template < typename SparseDtmcModelType >
std : : unique_ptr < CheckResult > SparseDtmcPrctlModelChecker < SparseDtmcModelType > : : 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 ( ) ) ;
ExplicitQualitativeCheckResult const & subResult = subResultPointer - > asExplicitQualitativeCheckResult ( ) ;
std : : vector < ValueType > numericResult = storm : : modelchecker : : helper : : SparseDtmcPrctlHelper < ValueType > : : computeReachabilityTimes ( env , storm : : solver : : SolveGoal < ValueType > ( this - > getModel ( ) , checkTask ) , this - > getModel ( ) . getTransitionMatrix ( ) , this - > getModel ( ) . getBackwardTransitions ( ) , subResult . getTruthValuesVector ( ) , checkTask . isQualitativeSet ( ) , checkTask . getHint ( ) ) ;
return std : : unique_ptr < CheckResult > ( new ExplicitQuantitativeCheckResult < ValueType > ( std : : move ( numericResult ) ) ) ;
}
template < typename SparseDtmcModelType >
template < typename SparseDtmcModelType >
std : : unique_ptr < CheckResult > SparseDtmcPrctlModelChecker < SparseDtmcModelType > : : computeTotalRewards ( Environment const & env , storm : : logic : : RewardMeasureType , CheckTask < storm : : logic : : TotalRewardFormula , ValueType > const & checkTask ) {
std : : unique_ptr < CheckResult > SparseDtmcPrctlModelChecker < SparseDtmcModelType > : : computeTotalRewards ( Environment const & env , storm : : logic : : RewardMeasureType , CheckTask < storm : : logic : : TotalRewardFormula , ValueType > const & checkTask ) {
std : : vector < ValueType > numericResult = storm : : modelchecker : : helper : : SparseDtmcPrctlHelper < ValueType > : : computeTotalRewards ( env , storm : : solver : : SolveGoal < ValueType > ( this - > getModel ( ) , checkTask ) , this - > getModel ( ) . getTransitionMatrix ( ) , this - > getModel ( ) . getBackwardTransitions ( ) , checkTask . isRewardModelSet ( ) ? this - > getModel ( ) . getRewardModel ( checkTask . getRewardModel ( ) ) : this - > getModel ( ) . getRewardModel ( " " ) , checkTask . isQualitativeSet ( ) , checkTask . getHint ( ) ) ;
std : : vector < ValueType > numericResult = storm : : modelchecker : : helper : : SparseDtmcPrctlHelper < ValueType > : : computeTotalRewards ( env , storm : : solver : : SolveGoal < ValueType > ( this - > getModel ( ) , checkTask ) , this - > getModel ( ) . getTransitionMatrix ( ) , this - > getModel ( ) . getBackwardTransitions ( ) , checkTask . isRewardModelSet ( ) ? this - > getModel ( ) . getRewardModel ( checkTask . getRewardModel ( ) ) : this - > getModel ( ) . getRewardModel ( " " ) , checkTask . isQualitativeSet ( ) , checkTask . getHint ( ) ) ;