28namespace modelchecker {
29namespace multiobjective {
30namespace preprocessing {
32template<
typename SparseModelType>
35 std::shared_ptr<SparseModelType> model;
46 }
else if (schedRestr.isPositional()) {
47 model = std::make_shared<SparseModelType>(originalModel);
49 STORM_LOG_THROW(
false, storm::exceptions::NotImplementedException,
"The given scheduler restriction has not been implemented.");
56 boost::optional<std::string> deadlockLabel;
57 removeIrrelevantStates(model, deadlockLabel, originalFormula);
59 PreprocessorData data(model);
60 data.deadlockLabel = deadlockLabel;
66 data.objectives.back()->originalFormula = subFormula;
67 data.finiteRewardCheckObjectives.resize(data.objectives.size(),
false);
68 data.upperResultBoundObjectives.resize(data.objectives.size(),
false);
69 STORM_LOG_THROW(data.objectives.back()->originalFormula->isOperatorFormula(), storm::exceptions::InvalidPropertyException,
70 "Could not preprocess the subformula " << *subFormula <<
" of " << originalFormula <<
" because it is not supported");
71 preprocessOperatorFormula(data.objectives.back()->originalFormula->asOperatorFormula(), data);
75 std::set<std::string> relevantRewardModels;
76 for (
auto const& obj : data.objectives) {
77 obj->formula->gatherReferencedRewardModels(relevantRewardModels);
79 data.model->restrictRewardModels(relevantRewardModels);
82 return buildResult(originalModel, originalFormula, data);
85template<
typename SparseModelType>
95template<
typename SparseModelType>
96void SparseMultiObjectivePreprocessor<SparseModelType>::removeIrrelevantStates(std::shared_ptr<SparseModelType>& model,
97 boost::optional<std::string>& deadlockLabel,
104 for (
auto const& opFormula : originalFormula.getSubformulas()) {
107 STORM_LOG_THROW(opFormula->isOperatorFormula(), storm::exceptions::InvalidPropertyException,
108 "Could not preprocess the subformula " << *opFormula <<
" of " << originalFormula <<
" because it is not supported");
109 auto const& pathFormula = opFormula->asOperatorFormula().getSubformula();
110 if (opFormula->isProbabilityOperatorFormula()) {
111 if (pathFormula.isUntilFormula()) {
112 auto lhs = mc.check(pathFormula.asUntilFormula().getLeftSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
113 auto rhs = mc.check(pathFormula.asUntilFormula().getRightSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
116 }
else if (pathFormula.isBoundedUntilFormula()) {
117 if (pathFormula.asBoundedUntilFormula().hasMultiDimensionalSubformulas()) {
120 for (uint64_t i = 0; i < pathFormula.asBoundedUntilFormula().getDimension(); ++i) {
121 auto subPathFormula = pathFormula.asBoundedUntilFormula().restrictToDimension(i);
123 mc.check(pathFormula.asBoundedUntilFormula().getLeftSubformula(i))->asExplicitQualitativeCheckResult().getTruthValuesVector();
125 mc.check(pathFormula.asBoundedUntilFormula().getRightSubformula(i))->asExplicitQualitativeCheckResult().getTruthValuesVector();
127 if (pathFormula.asBoundedUntilFormula().hasLowerBound(i)) {
132 absorbingStatesForSubformula &= absorbingStatesForSubSubformula;
135 auto lhs = mc.check(pathFormula.asBoundedUntilFormula().getLeftSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
136 auto rhs = mc.check(pathFormula.asBoundedUntilFormula().getRightSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
138 if (pathFormula.asBoundedUntilFormula().hasLowerBound()) {
144 }
else if (pathFormula.isGloballyFormula()) {
145 auto phi = mc.check(pathFormula.asGloballyFormula().getSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
149 }
else if (pathFormula.isEventuallyFormula()) {
150 auto phi = mc.check(pathFormula.asEventuallyFormula().getSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
154 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"The subformula of " << pathFormula <<
" is not supported.");
156 }
else if (opFormula->isRewardOperatorFormula()) {
157 auto const& baseRewardModel = opFormula->asRewardOperatorFormula().hasRewardModelName()
158 ? model->getRewardModel(opFormula->asRewardOperatorFormula().getRewardModelName())
159 : model->getUniqueRewardModel();
160 if (pathFormula.isEventuallyFormula()) {
165 auto phi = mc.check(pathFormula.asEventuallyFormula().getSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
168 model->getTransitionMatrix(), model->getTransitionMatrix().getRowGroupIndices(), backwardTransitions, statesWithoutReward, phi);
171 }
else if (pathFormula.isCumulativeRewardFormula()) {
176 }
else if (pathFormula.isTotalRewardFormula()) {
180 }
else if (pathFormula.isLongRunAverageRewardFormula()) {
186 absorbingStatesForSubformula =
190 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"The subformula of " << pathFormula <<
" is not supported.");
192 }
else if (opFormula->isTimeOperatorFormula()) {
193 if (pathFormula.isEventuallyFormula()) {
194 auto phi = mc.check(pathFormula.asEventuallyFormula().getSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector();
197 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"The subformula of " << pathFormula <<
" is not supported.");
199 }
else if (opFormula->isLongRunAverageOperatorFormula()) {
200 auto lraStates = mc.check(pathFormula)->asExplicitQualitativeCheckResult().getTruthValuesVector();
204 backwardTransitions, ~lraStates, forallGloballyNotLraStates);
207 "Could not preprocess the subformula " << *opFormula <<
" of " << originalFormula <<
" because it is not supported");
209 absorbingStates &= absorbingStatesForSubformula;
210 if (absorbingStates.empty()) {
215 if (!absorbingStates.empty()) {
218 for (
auto absorbingState : absorbingStates) {
219 for (uint64_t action = model->getTransitionMatrix().getRowGroupIndices()[absorbingState];
220 action < model->getTransitionMatrix().getRowGroupIndices()[absorbingState + 1]; ++action) {
221 subsystemActions.set(action,
false);
226 auto const& submodel =
228 STORM_LOG_INFO(
"Making states absorbing reduced the state space from " << model->getNumberOfStates() <<
" to " << submodel.model->getNumberOfStates()
230 model = submodel.model->template as<SparseModelType>();
231 deadlockLabel = submodel.deadlockLabel;
235template<
typename SparseModelType>
236SparseMultiObjectivePreprocessor<SparseModelType>::PreprocessorData::PreprocessorData(std::shared_ptr<SparseModelType> model) : model(model) {
238 rewardModelNamePrefix =
"obj";
240 bool prefixIsUnique =
true;
241 for (
auto const& rewardModels : model->getRewardModels()) {
242 if (rewardModelNamePrefix.size() <= rewardModels.first.size()) {
243 if (std::mismatch(rewardModelNamePrefix.begin(), rewardModelNamePrefix.end(), rewardModels.first.begin()).first ==
244 rewardModelNamePrefix.end()) {
245 prefixIsUnique =
false;
246 rewardModelNamePrefix =
"_" + rewardModelNamePrefix;
251 if (prefixIsUnique) {
262 if (considerComplementaryEvent) {
263 opInfo.
bound->threshold = opInfo.
bound->threshold.getManager().rational(storm::utility::one<storm::RationalNumber>()) - opInfo.
bound->threshold;
264 switch (opInfo.
bound->comparisonType) {
278 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"Current objective " << formula <<
" has unexpected comparison type");
282 opInfo.
optimalityType = storm::solver::OptimizationDirection::Maximize;
284 opInfo.
optimalityType = storm::solver::OptimizationDirection::Minimize;
287 "Optimization direction of formula " << formula <<
" ignored as the formula also specifies a threshold.");
291 if (considerComplementaryEvent) {
295 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"Objective " << formula <<
" does not specify whether to minimize or maximize");
300template<
typename SparseModelType>
301void SparseMultiObjectivePreprocessor<SparseModelType>::preprocessOperatorFormula(
storm::logic::OperatorFormula const& formula, PreprocessorData& data) {
319 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"Could not preprocess the objective " << formula <<
" because it is not supported");
323template<
typename SparseModelType>
326 PreprocessorData& data) {
328 data.objectives.back()->lowerResultBound = storm::utility::zero<ValueType>();
329 data.objectives.back()->upperResultBound = storm::utility::one<ValueType>();
340 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"The subformula of " << formula <<
" is not supported.");
344template<
typename SparseModelType>
347 PreprocessorData& data) {
348 std::string rewardModelName;
351 STORM_LOG_THROW(data.model->hasRewardModel(rewardModelName), storm::exceptions::InvalidPropertyException,
352 "The reward model specified by formula " << formula <<
" does not exist in the model");
356 auto prefixOf = [](std::string
const& left, std::string
const& right) {
357 return std::mismatch(left.begin(), left.end(), right.begin()).first == left.end();
359 bool uniqueRewardModelFound =
false;
360 for (
auto const& rewModel : data.model->getRewardModels()) {
361 if (prefixOf(data.rewardModelNamePrefix, rewModel.first)) {
365 STORM_LOG_THROW(!uniqueRewardModelFound, storm::exceptions::InvalidOperationException,
366 "The formula " << formula <<
" does not specify a reward model name and the reward model is not unique.");
367 uniqueRewardModelFound =
true;
368 rewardModelName = rewModel.first;
370 STORM_LOG_THROW(uniqueRewardModelFound, storm::exceptions::InvalidOperationException,
371 "The formula " << formula <<
" refers to an unnamed reward model but no reward model has been defined.");
374 data.objectives.back()->lowerResultBound = storm::utility::zero<ValueType>();
385 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"The subformula of " << formula <<
" is not supported.");
389template<
typename SparseModelType>
392 data.objectives.back()->lowerResultBound = storm::utility::zero<ValueType>();
397 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"The subformula of " << formula <<
" is not supported.");
401template<
typename SparseModelType>
404 PreprocessorData& data) {
405 data.objectives.back()->lowerResultBound = storm::utility::zero<ValueType>();
406 data.objectives.back()->upperResultBound = storm::utility::one<ValueType>();
410 std::string rewardModelName = data.rewardModelNamePrefix + std::to_string(data.objectives.size());
411 auto lraRewardFormula = std::make_shared<storm::logic::LongRunAverageRewardFormula>();
412 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(lraRewardFormula, rewardModelName, opInfo);
417 std::vector<typename SparseModelType::ValueType> lraRewards(data.model->getNumberOfStates(), storm::utility::zero<typename SparseModelType::ValueType>());
419 data.model->addRewardModel(rewardModelName,
typename SparseModelType::RewardModelType(std::move(lraRewards)));
422template<
typename SparseModelType>
425 std::shared_ptr<storm::logic::Formula const> subformula) {
432 STORM_LOG_THROW((data.model->getInitialStates() & rightSubformulaResult).empty(), storm::exceptions::NotImplementedException,
433 "The Probability for the objective "
434 << *data.objectives.back()->originalFormula
435 <<
" is always one as the rhs of the until formula is true in the initial state. This (trivial) case is currently not implemented.");
441 notLeftOrRight |= rightSubformulaResult;
444 storm::storage::BitVector allStates(data.model->getNumberOfStates(),
true), noStates(data.model->getNumberOfStates(),
false);
451 reachableFromInit &= ~notLeftOrRight;
453 if ((reachableFromInit & reachableFromGoal).empty()) {
454 STORM_LOG_INFO(
"Objective " << *data.objectives.back()->originalFormula <<
" is transformed to an expected total/cumulative reward property.");
458 std::vector<typename SparseModelType::ValueType> objectiveRewards(data.model->getTransitionMatrix().getRowCount(),
459 storm::utility::zero<typename SparseModelType::ValueType>());
460 for (
auto state : reachableFromInit) {
461 for (uint_fast64_t row = data.model->getTransitionMatrix().getRowGroupIndices()[state];
462 row < data.model->getTransitionMatrix().getRowGroupIndices()[state + 1]; ++row) {
463 objectiveRewards[row] = data.model->getTransitionMatrix().getConstrainedRowSum(row, rightSubformulaResult);
466 std::string rewardModelName = data.rewardModelNamePrefix + std::to_string(data.objectives.size());
467 data.model->addRewardModel(rewardModelName,
typename SparseModelType::RewardModelType(std::nullopt, std::move(objectiveRewards)));
468 if (subformula ==
nullptr) {
469 subformula = std::make_shared<storm::logic::TotalRewardFormula>();
471 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(subformula, rewardModelName, opInfo);
473 STORM_LOG_INFO(
"Objective " << *data.objectives.back()->originalFormula <<
" can not be transformed to an expected total/cumulative reward property.");
474 data.objectives.back()->formula = std::make_shared<storm::logic::ProbabilityOperatorFormula>(formula.
asSharedPointer(), opInfo);
478template<
typename SparseModelType>
483 STORM_LOG_INFO(
"Objective " << data.objectives.back()->originalFormula <<
" is not transformed to an expected cumulative reward property.");
484 data.objectives.back()->formula = std::make_shared<storm::logic::ProbabilityOperatorFormula>(formula.
asSharedPointer(), opInfo);
486 std::shared_ptr<storm::logic::Formula const> subformula;
489 subformula = std::make_shared<storm::logic::TotalRewardFormula>();
492 storm::exceptions::InvalidPropertyException,
493 "Bounded until formulas for Markov Automata are only allowed when time bounds are considered.");
495 subformula = std::make_shared<storm::logic::CumulativeRewardFormula>(bound, formula.
getTimeBoundReference());
498 opInfo, data, subformula);
500 STORM_LOG_THROW(
false, storm::exceptions::InvalidPropertyException,
"Property " << formula <<
"is not supported");
504template<
typename SparseModelType>
508 auto negatedSubformula = std::make_shared<storm::logic::UnaryBooleanStateFormula>(storm::logic::UnaryBooleanStateFormula::OperatorType::Not,
514template<
typename SparseModelType>
517 boost::optional<std::string>
const& optionalRewardModelName) {
519 preprocessUntilFormula(
529 storm::storage::BitVector allStates(data.model->getNumberOfStates(),
true), noStates(data.model->getNumberOfStates(),
false);
536 reachableFromInit &= ~subFormulaResult;
539 if ((reachableFromInit & reachableFromGoal).empty()) {
540 STORM_LOG_INFO(
"Objective " << *data.objectives.back()->originalFormula <<
" is transformed to an expected total reward property.");
543 std::string rewardModelName = data.rewardModelNamePrefix + std::to_string(data.objectives.size());
544 auto totalRewardFormula = std::make_shared<storm::logic::TotalRewardFormula>();
545 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(totalRewardFormula, rewardModelName, opInfo);
549 assert(optionalRewardModelName.is_initialized());
550 auto objectiveRewards =
554 objectiveRewards.reduceToStateBasedRewards(data.model->getTransitionMatrix(),
false);
555 if (objectiveRewards.hasStateRewards()) {
557 storm::utility::zero<typename SparseModelType::ValueType>());
559 if (objectiveRewards.hasStateActionRewards()) {
560 for (
auto state : reachableFromGoal) {
561 std::fill_n(objectiveRewards.getStateActionRewardVector().begin() + data.model->getTransitionMatrix().getRowGroupIndices()[state],
562 data.model->getTransitionMatrix().getRowGroupSize(state), storm::utility::zero<typename SparseModelType::ValueType>());
565 data.model->addRewardModel(rewardModelName, std::move(objectiveRewards));
568 std::vector<typename SparseModelType::ValueType> timeRewards(data.model->getNumberOfStates(),
569 storm::utility::zero<typename SparseModelType::ValueType>());
575 storm::utility::one<typename SparseModelType::ValueType>());
579 data.model->addRewardModel(rewardModelName,
typename SparseModelType::RewardModelType(std::move(timeRewards)));
582 "The formula " << formula <<
" neither considers reachability probabilities nor reachability rewards "
584 <<
". This is not supported.");
587 STORM_LOG_INFO(
"Objective " << *data.objectives.back()->originalFormula <<
" can not be transformed to an expected total/cumulative reward property.");
590 assert(optionalRewardModelName.is_initialized());
591 if (data.deadlockLabel) {
594 std::shared_ptr<storm::logic::Formula const> newSubSubformula =
595 std::make_shared<storm::logic::AtomicLabelFormula const>(data.deadlockLabel.get());
596 std::shared_ptr<storm::logic::Formula const> newSubformula = std::make_shared<storm::logic::BinaryBooleanStateFormula const>(
598 boost::optional<storm::logic::RewardAccumulation> newRewardAccumulation;
602 std::shared_ptr<storm::logic::Formula const> newFormula =
603 std::make_shared<storm::logic::EventuallyFormula const>(newSubformula, formula.
getContext(), newRewardAccumulation);
604 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(newFormula, optionalRewardModelName.get(), opInfo);
606 data.objectives.back()->formula =
607 std::make_shared<storm::logic::RewardOperatorFormula>(formula.
asSharedPointer(), optionalRewardModelName.get(), opInfo);
611 std::string rewardModelName = data.rewardModelNamePrefix + std::to_string(data.objectives.size());
613 if (data.deadlockLabel) {
616 std::shared_ptr<storm::logic::Formula const> newSubSubformula =
617 std::make_shared<storm::logic::AtomicLabelFormula const>(data.deadlockLabel.get());
618 newSubformula = std::make_shared<storm::logic::BinaryBooleanStateFormula const>(storm::logic::BinaryBooleanStateFormula::OperatorType::Or,
622 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(newFormula, rewardModelName, opInfo);
623 std::vector<typename SparseModelType::ValueType> timeRewards;
625 timeRewards.assign(data.model->getNumberOfStates(), storm::utility::zero<typename SparseModelType::ValueType>());
629 storm::utility::one<typename SparseModelType::ValueType>());
631 timeRewards.assign(data.model->getNumberOfStates(), storm::utility::one<typename SparseModelType::ValueType>());
633 data.model->addRewardModel(rewardModelName,
typename SparseModelType::RewardModelType(std::move(timeRewards)));
636 "The formula " << formula <<
" neither considers reachability probabilities nor reachability rewards "
638 <<
". This is not supported.");
641 data.finiteRewardCheckObjectives.set(data.objectives.size() - 1,
true);
644template<
typename SparseModelType>
647 PreprocessorData& data,
648 boost::optional<std::string>
const& optionalRewardModelName) {
650 "Cumulative reward formulas are not supported for the given model type.");
651 std::string rewardModelName = optionalRewardModelName.get();
654 if (filteredRewards.isDifferentFromUnfilteredModel()) {
655 std::string rewardModelName = data.rewardModelNamePrefix + std::to_string(data.objectives.size());
656 data.model->addRewardModel(rewardModelName, std::move(filteredRewards.extract()));
659 std::vector<storm::logic::TimeBoundReference> newTimeBoundReferences;
660 bool onlyRewardBounds =
true;
663 if (oldTbr.isRewardBound()) {
664 if (oldTbr.hasRewardAccumulation()) {
666 oldTbr.getRewardAccumulation(), data.model->isDiscreteTimeModel());
667 if (filteredBoundRewards.isDifferentFromUnfilteredModel()) {
668 std::string freshRewardModelName =
669 data.rewardModelNamePrefix + std::to_string(data.objectives.size()) + std::string(
"_" + std::to_string(i));
670 data.model->addRewardModel(freshRewardModelName, std::move(filteredBoundRewards.extract()));
671 newTimeBoundReferences.emplace_back(freshRewardModelName);
674 newTimeBoundReferences.emplace_back(oldTbr.getRewardName());
677 newTimeBoundReferences.push_back(oldTbr);
680 onlyRewardBounds =
false;
681 newTimeBoundReferences.push_back(oldTbr);
685 auto newFormula = std::make_shared<storm::logic::CumulativeRewardFormula>(formula.
getBounds(), newTimeBoundReferences);
686 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(newFormula, rewardModelName, opInfo);
688 if (onlyRewardBounds) {
689 data.finiteRewardCheckObjectives.set(data.objectives.size() - 1,
true);
693template<
typename SparseModelType>
696 boost::optional<std::string>
const& optionalRewardModelName) {
697 std::string rewardModelName = optionalRewardModelName.get();
699 if (filteredRewards.isDifferentFromUnfilteredModel()) {
700 std::string rewardModelName = data.rewardModelNamePrefix + std::to_string(data.objectives.size());
701 data.model->addRewardModel(rewardModelName, filteredRewards.extract());
703 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(formula.
stripRewardAccumulation(), rewardModelName, opInfo);
704 data.finiteRewardCheckObjectives.set(data.objectives.size() - 1,
true);
707template<
typename SparseModelType>
710 PreprocessorData& data,
711 boost::optional<std::string>
const& optionalRewardModelName) {
712 std::string rewardModelName = optionalRewardModelName.get();
714 if (filteredRewards.isDifferentFromUnfilteredModel()) {
715 std::string rewardModelName = data.rewardModelNamePrefix + std::to_string(data.objectives.size());
716 data.model->addRewardModel(rewardModelName, std::move(filteredRewards.extract()));
718 data.objectives.back()->formula = std::make_shared<storm::logic::RewardOperatorFormula>(formula.
stripRewardAccumulation(), rewardModelName, opInfo);
721template<
typename SparseModelType>
722typename SparseMultiObjectivePreprocessor<SparseModelType>::ReturnType SparseMultiObjectivePreprocessor<SparseModelType>::buildResult(
724 ReturnType result(originalFormula, originalModel);
725 auto backwardTransitions = data.model->getBackwardTransitions();
726 result.preprocessedModel = data.model;
728 for (
auto& obj : data.objectives) {
729 result.objectives.push_back(std::move(*obj));
731 result.queryType = getQueryType(result.objectives);
732 result.maybeInfiniteRewardObjectives = std::move(data.finiteRewardCheckObjectives);
737template<
typename SparseModelType>
738typename SparseMultiObjectivePreprocessor<SparseModelType>::ReturnType::QueryType SparseMultiObjectivePreprocessor<SparseModelType>::getQueryType(
739 std::vector<Objective<ValueType>>
const& objectives) {
740 uint_fast64_t numOfObjectivesWithThreshold = 0;
741 for (
auto& obj : objectives) {
742 if (obj.formula->hasBound()) {
743 ++numOfObjectivesWithThreshold;
746 if (numOfObjectivesWithThreshold == objectives.size()) {
747 return ReturnType::QueryType::Achievability;
748 }
else if (numOfObjectivesWithThreshold + 1 == objectives.size()) {
750 return ReturnType::QueryType::Quantitative;
751 }
else if (numOfObjectivesWithThreshold == 0) {
752 return ReturnType::QueryType::Pareto;
755 "Invalid Multi-objective query: The numer of qualitative objectives should be either 0 (Pareto query), 1 (quantitative query), or "
756 "#objectives (achievability query).");
760template class SparseMultiObjectivePreprocessor<storm::models::sparse::Mdp<double>>;
761template class SparseMultiObjectivePreprocessor<storm::models::sparse::MarkovAutomaton<double>>;
763template class SparseMultiObjectivePreprocessor<storm::models::sparse::Mdp<storm::RationalNumber>>;
764template class SparseMultiObjectivePreprocessor<storm::models::sparse::MarkovAutomaton<storm::RationalNumber>>;
ModelCheckerEnvironment & modelchecker()
MultiObjectiveModelCheckerEnvironment & multi()
bool isSchedulerRestrictionSet() const
storm::storage::SchedulerClass const & getSchedulerRestriction() const
bool isRewardBound() const
static ReturnType preprocess(Environment const &env, SparseModelType const &originalModel, storm::logic::MultiObjectiveFormula const &originalFormula)
Preprocesses the given model w.r.t.
This class represents a Markov automaton.
storm::storage::BitVector const & getMarkovianStates() const
Retrieves the set of Markovian states of the model.
A bit vector that is internally represented as a vector of 64-bit values.
void complement()
Negates all bits in the bit vector.
bool isSubsetOf(BitVector const &other) const
Checks whether all bits that are set in the current bit vector are also set in the given bit vector.
size_t size() const
Retrieves the number of bits this bit vector can store.
bool get(uint_fast64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.
A class that holds a possibly non-square matrix in the compressed row storage format.
#define STORM_LOG_INFO(message)
#define STORM_LOG_WARN_COND(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
bool isLowerBound(ComparisonType t)
storm::storage::BitVector getOnlyReachableViaPhi(SparseModelType const &model, storm::storage::BitVector const &phi)
storm::logic::OperatorInformation getOperatorInformation(storm::logic::OperatorFormula const &formula, bool considerComplementaryEvent)
OptimizationDirection constexpr invert(OptimizationDirection d)
storm::storage::BitVector getReachableStates(storm::storage::SparseMatrix< T > const &transitionMatrix, storm::storage::BitVector const &initialStates, storm::storage::BitVector const &constraintStates, storm::storage::BitVector const &targetStates, bool useStepBound, uint_fast64_t maximalSteps, boost::optional< storm::storage::BitVector > const &choiceFilter)
Performs a forward depth-first search through the underlying graph structure to identify the states t...
storm::storage::BitVector performProb1A(storm::models::sparse::NondeterministicModel< T, RM > const &model, storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates)
Computes the sets of states that have probability 1 of satisfying phi until psi under all possible re...
storm::storage::BitVector performProb0A(storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates)
void setVectorValues(std::vector< T > &vector, storm::storage::BitVector const &positions, std::vector< T > const &values)
Sets the provided values at the provided positions in the given vector.
FilteredRewardModel< RewardModelType > createFilteredRewardModel(RewardModelType const &baseRewardModel, storm::logic::RewardAccumulation const &acc, bool isDiscreteTimeModel)
bool isZero(ValueType const &a)
bool considersComplementaryEvent