@ -116,6 +116,8 @@ namespace storm {
return this - > computeNextProbabilities ( env , checkTask . substituteFormula ( formula . asNextFormula ( ) ) ) ;
return this - > computeNextProbabilities ( env , checkTask . substituteFormula ( formula . asNextFormula ( ) ) ) ;
} else if ( formula . isBoundedGloballyFormula ( ) ) {
} else if ( formula . isBoundedGloballyFormula ( ) ) {
return this - > computeBoundedGloballyProbabilities ( env , checkTask . substituteFormula ( formula . asBoundedGloballyFormula ( ) ) ) ;
return this - > computeBoundedGloballyProbabilities ( env , checkTask . substituteFormula ( formula . asBoundedGloballyFormula ( ) ) ) ;
} else if ( formula . isBoundedUntilFormula ( ) ) {
return this - > computeBoundedUntilProbabilities ( env , checkTask . substituteFormula ( formula . asBoundedUntilFormula ( ) ) ) ;
}
}
STORM_LOG_THROW ( false , storm : : exceptions : : InvalidArgumentException , " The given formula ' " < < formula < < " ' is invalid. " ) ;
STORM_LOG_THROW ( false , storm : : exceptions : : InvalidArgumentException , " The given formula ' " < < formula < < " ' is invalid. " ) ;
}
}
@ -197,6 +199,28 @@ namespace storm {
return result ;
return result ;
}
}
template < typename ModelType >
std : : unique_ptr < CheckResult > SparseSmgRpatlModelChecker < ModelType > : : computeBoundedUntilProbabilities ( Environment const & env , CheckTask < storm : : logic : : BoundedUntilFormula , ValueType > const & checkTask ) {
storm : : logic : : BoundedUntilFormula const & pathFormula = checkTask . getFormula ( ) ;
STORM_LOG_THROW ( checkTask . isOptimizationDirectionSet ( ) , storm : : exceptions : : InvalidPropertyException , " Formula needs to specify whether minimal or maximal values are to be computed on nondeterministic model. " ) ;
// check for upper and lower bounds
STORM_LOG_THROW ( pathFormula . hasUpperBound ( ) , storm : : exceptions : : InvalidPropertyException , " Formula needs to have (a single) upper step bound. " ) ;
STORM_LOG_THROW ( pathFormula . hasIntegerLowerBound ( ) , storm : : exceptions : : InvalidPropertyException , " Formula lower step bound must be discrete/integral. " ) ;
STORM_LOG_THROW ( pathFormula . hasIntegerUpperBound ( ) , storm : : exceptions : : InvalidPropertyException , " Formula needs to have discrete upper time bound. " ) ;
std : : unique_ptr < CheckResult > leftResultPointer = this - > check ( env , pathFormula . getLeftSubformula ( ) ) ;
std : : unique_ptr < CheckResult > rightResultPointer = this - > check ( env , pathFormula . getRightSubformula ( ) ) ;
ExplicitQualitativeCheckResult const & leftResult = leftResultPointer - > asExplicitQualitativeCheckResult ( ) ;
ExplicitQualitativeCheckResult const & rightResult = rightResultPointer - > asExplicitQualitativeCheckResult ( ) ;
auto ret = storm : : modelchecker : : helper : : SparseSmgRpatlHelper < ValueType > : : computeBoundedUntilProbabilities ( env , storm : : solver : : SolveGoal < ValueType > ( this - > getModel ( ) , checkTask ) , this - > getModel ( ) . getTransitionMatrix ( ) , this - > getModel ( ) . getBackwardTransitions ( ) , leftResult . getTruthValuesVector ( ) , rightResult . getTruthValuesVector ( ) , checkTask . isQualitativeSet ( ) , statesOfCoalition , checkTask . isProduceSchedulersSet ( ) , checkTask . getHint ( ) , pathFormula . getNonStrictLowerBound < uint64_t > ( ) , pathFormula . getNonStrictUpperBound < uint64_t > ( ) ) ;
std : : unique_ptr < CheckResult > result ( new ExplicitQuantitativeCheckResult < ValueType > ( std : : move ( ret . values ) ) ) ;
if ( checkTask . isShieldingTask ( ) ) {
tempest : : shields : : createShield < ValueType > ( std : : make_shared < storm : : models : : sparse : : Smg < ValueType > > ( this - > getModel ( ) ) , std : : move ( ret . choiceValues ) , checkTask . getShieldingExpression ( ) , checkTask . getOptimizationDirection ( ) , std : : move ( ret . relevantStates ) , ~ statesOfCoalition ) ;
}
return result ;
}
template < typename SparseSmgModelType >
template < typename SparseSmgModelType >
std : : unique_ptr < CheckResult > SparseSmgRpatlModelChecker < SparseSmgModelType > : : computeLongRunAverageProbabilities ( Environment const & env , CheckTask < storm : : logic : : StateFormula , ValueType > const & checkTask ) {
std : : unique_ptr < CheckResult > SparseSmgRpatlModelChecker < SparseSmgModelType > : : computeLongRunAverageProbabilities ( Environment const & env , CheckTask < storm : : logic : : StateFormula , ValueType > const & checkTask ) {
STORM_LOG_THROW ( false , storm : : exceptions : : NotImplementedException , " NYI " ) ;
STORM_LOG_THROW ( false , storm : : exceptions : : NotImplementedException , " NYI " ) ;