3#include <boost/core/typeinfo.hpp>
38template<
typename ModelType>
40 return std::string(boost::core::demangled_name(BOOST_CORE_TYPEID(*
this)));
43template<
typename ModelType>
46 return this->
check(env, checkTask);
49template<
typename ModelType>
53 "The model checker (" <<
getClassName() <<
") is not able to check the formula '" << formula <<
"'.");
57 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"The given formula '" << formula <<
"' is invalid.");
60template<
typename ModelType>
87 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"The given formula '" << formula <<
"' is invalid.");
90template<
typename ModelType>
97template<
typename ModelType>
101 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
104template<
typename ModelType>
112template<
typename ModelType>
116 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
119template<
typename ModelType>
123 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
126template<
typename ModelType>
133template<
typename ModelType>
136 STORM_LOG_THROW(
false, storm::exceptions::NotImplementedException,
"This model checker does not support the formula: " << checkTask.
getFormula() <<
".");
139template<
typename ModelType>
142 STORM_LOG_THROW(
false, storm::exceptions::NotImplementedException,
"This model checker does not support the formula: " << checkTask.
getFormula() <<
".");
145template<
typename ModelType>
149 std::unique_ptr<CheckResult> resultPointer = this->
check(env, checkTask.
getFormula());
150 if (resultPointer->isExplicitQualitativeCheckResult()) {
152 return std::make_unique<ExplicitQuantitativeCheckResult<SolutionType>>(resultPointer->template asExplicitQualitativeCheckResult<SolutionType>());
154 STORM_LOG_ASSERT(resultPointer->isSymbolicQualitativeCheckResult(),
"Unexpected result type.");
158 auto const& qualRes = resultPointer->asSymbolicQualitativeCheckResult<ddType>();
159 return std::make_unique<SymbolicQuantitativeCheckResult<ddType, SolutionType>>(qualRes);
166template<
typename ModelType>
187 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"The given formula '" << rewardFormula <<
"' is invalid.");
190template<
typename ModelType>
194 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
197template<
typename ModelType>
201 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
204template<
typename ModelType>
208 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
211template<
typename ModelType>
215 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
218template<
typename ModelType>
222 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
225template<
typename ModelType>
229 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
232template<
typename ModelType>
236 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
239template<
typename ModelType>
243 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
246template<
typename ModelType>
250 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
253template<
typename ModelType>
261 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
264template<
typename ModelType>
268 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
271template<
typename ModelType>
297 if (mof.isLexicographic()) {
300 STORM_LOG_ASSERT(mof.isTradeoff(),
"Unexpected multi-objective formula type.");
306 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"The given formula '" << stateFormula <<
"' is invalid.");
309template<
typename ModelType>
313 std::stringstream stream;
318template<
typename ModelType>
322 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
325template<
typename ModelType>
330 storm::exceptions::InvalidArgumentException,
"The given formula is invalid.");
332 std::unique_ptr<CheckResult> leftResult =
334 std::unique_ptr<CheckResult> rightResult =
337 STORM_LOG_THROW(leftResult->isQualitative() && rightResult->isQualitative(), storm::exceptions::InternalTypeErrorException,
338 "Expected qualitative results.");
340 if (stateFormula.
isAnd()) {
341 leftResult->asQualitativeCheckResult() &= rightResult->asQualitativeCheckResult();
342 }
else if (stateFormula.
isOr()) {
343 leftResult->asQualitativeCheckResult() |= rightResult->asQualitativeCheckResult();
345 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"The given formula '" << stateFormula <<
"' is invalid.");
351template<
typename ModelType>
355 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
358template<
typename ModelType>
365 STORM_LOG_THROW(result->isQuantitative(), storm::exceptions::InvalidOperationException,
366 "Unable to perform comparison operation on non-quantitative result.");
373template<
typename ModelType>
380 STORM_LOG_THROW(result->isQuantitative(), storm::exceptions::InvalidOperationException,
381 "Unable to perform comparison operation on non-quantitative result.");
388template<
typename ModelType>
397 STORM_LOG_THROW(result->isQuantitative(), storm::exceptions::InvalidOperationException,
398 "Unable to perform comparison operation on non-quantitative result.");
405template<
typename ModelType>
411 std::unique_ptr<CheckResult> result =
415 STORM_LOG_THROW(result->isQuantitative(), storm::exceptions::InvalidOperationException,
416 "Unable to perform comparison operation on non-quantitative result.");
423template<
typename ModelType>
427 std::unique_ptr<CheckResult> subResult = this->
check(env, checkTask.template substituteFormula<storm::logic::Formula>(stateFormula.
getSubformula()));
428 STORM_LOG_THROW(subResult->isQualitative(), storm::exceptions::InternalTypeErrorException,
"Expected qualitative result.");
429 if (stateFormula.
isNot()) {
430 subResult->asQualitativeCheckResult().complement();
432 STORM_LOG_THROW(
false, storm::exceptions::InvalidArgumentException,
"The given formula '" << stateFormula <<
"' is invalid.");
437template<
typename ModelType>
441 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
444template<
typename ModelType>
448 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
451template<
typename ModelType>
455 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
458template<
typename ModelType>
462 "This model checker (" <<
getClassName() <<
") does not support the formula: " << checkTask.
getFormula() <<
".");
virtual std::unique_ptr< CheckResult > computeProbabilities(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeCumulativeRewards(Environment const &env, CheckTask< storm::logic::CumulativeRewardFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeDiscountedCumulativeRewards(Environment const &env, CheckTask< storm::logic::DiscountedCumulativeRewardFormula, SolutionType > const &checkTask)
typename GetSolutionType< ValueType, void >::type SolutionType
virtual std::unique_ptr< CheckResult > computeGloballyProbabilities(Environment const &env, CheckTask< storm::logic::GloballyFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkLongRunAverageOperatorFormula(Environment const &env, CheckTask< storm::logic::LongRunAverageOperatorFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > check(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
Checks the provided formula.
virtual bool canHandle(CheckTask< storm::logic::Formula, SolutionType > const &checkTask) const =0
Determines whether the model checker can handle the given verification task.
virtual std::unique_ptr< CheckResult > computeLTLProbabilities(Environment const &env, CheckTask< storm::logic::PathFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkRewardOperatorFormula(Environment const &env, CheckTask< storm::logic::RewardOperatorFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkAtomicLabelFormula(Environment const &env, CheckTask< storm::logic::AtomicLabelFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkQuantileFormula(Environment const &env, CheckTask< storm::logic::QuantileFormula, SolutionType > const &checkTask)
std::unique_ptr< CheckResult > computeStateFormulaProbabilities(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkUnaryBooleanStateFormula(Environment const &env, CheckTask< storm::logic::UnaryBooleanStateFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkProbabilityOperatorFormula(Environment const &env, CheckTask< storm::logic::ProbabilityOperatorFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeTimes(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeConditionalRewards(Environment const &env, CheckTask< storm::logic::ConditionalFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkGameFormula(Environment const &env, CheckTask< storm::logic::GameFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkTimeOperatorFormula(Environment const &env, CheckTask< storm::logic::TimeOperatorFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkStateFormula(Environment const &env, CheckTask< storm::logic::StateFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeReachabilityRewards(Environment const &env, CheckTask< storm::logic::EventuallyFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkBinaryBooleanStateFormula(Environment const &env, CheckTask< storm::logic::BinaryBooleanStateFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeLongRunAverageProbabilities(Environment const &env, CheckTask< storm::logic::StateFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeUntilProbabilities(Environment const &env, CheckTask< storm::logic::UntilFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkLexObjectiveFormula(Environment const &env, CheckTask< storm::logic::MultiObjectiveFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeLongRunAverageRewards(Environment const &env, CheckTask< storm::logic::LongRunAverageRewardFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeHOAPathProbabilities(Environment const &env, CheckTask< storm::logic::HOAPathFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkMultiObjectiveFormula(Environment const &env, CheckTask< storm::logic::MultiObjectiveFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeReachabilityProbabilities(Environment const &env, CheckTask< storm::logic::EventuallyFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeConditionalProbabilities(Environment const &env, CheckTask< storm::logic::ConditionalFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkBooleanLiteralFormula(Environment const &env, CheckTask< storm::logic::BooleanLiteralFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeRewards(Environment const &env, CheckTask< storm::logic::Formula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeInstantaneousRewards(Environment const &env, CheckTask< storm::logic::InstantaneousRewardFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeNextProbabilities(Environment const &env, CheckTask< storm::logic::NextFormula, SolutionType > const &checkTask)
virtual std::string getClassName() const
Returns the name of the model checker class (e.g., for display in error messages).
virtual std::unique_ptr< CheckResult > computeReachabilityTimes(Environment const &env, CheckTask< storm::logic::EventuallyFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > checkAtomicExpressionFormula(Environment const &env, CheckTask< storm::logic::AtomicExpressionFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeTotalRewards(Environment const &env, CheckTask< storm::logic::TotalRewardFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeBoundedUntilProbabilities(Environment const &env, CheckTask< storm::logic::BoundedUntilFormula, SolutionType > const &checkTask)
virtual std::unique_ptr< CheckResult > computeDiscountedTotalRewards(Environment const &env, CheckTask< storm::logic::DiscountedTotalRewardFormula, SolutionType > const &checkTask)
bool isBoundSet() const
Retrieves whether there is a bound with which the values for the states will be compared.
ValueType getBoundThreshold() const
Retrieves the value of the bound (if set).
storm::logic::ComparisonType const & getBoundComparisonType() const
Retrieves the comparison type of the bound (if set).
CheckTask< NewFormulaType, ValueType > substituteFormula(NewFormulaType const &newFormula) const
Copies the check task from the source while replacing the formula with the new one.
FormulaType const & getFormula() const
Retrieves the formula from this task.
#define STORM_LOG_THROW_UNCONDITIONALLY(exception, message)
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
std::unique_ptr< CheckResult > computeConditionalProbabilities(Environment const &env, storm::solver::SolveGoal< ValueType, SolutionType > &&goal, bool produceSchedulers, storm::storage::SparseMatrix< ValueType > const &transitionMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, storm::storage::BitVector const &targetStates, storm::storage::BitVector const &conditionStates)
The contract of a DD backend.
static const storm::dd::DdType ddType