Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseParametricMdpSimplifier.cpp
Go to the documentation of this file.
2
12#include "storm/utility/graph.h"
14
15namespace storm {
16namespace transformer {
17
18template<typename SparseModelType>
20 : SparseParametricModelSimplifier<SparseModelType>(model) {
21 // intentionally left empty
22}
23
24template<typename SparseModelType>
26 bool minimizing =
28
29 // Get the prob0, prob1 and the maybeStates
30 storm::modelchecker::SparsePropositionalModelChecker<SparseModelType> propositionalChecker(this->originalModel);
31 if (!propositionalChecker.canHandle(formula.getSubformula().asUntilFormula().getLeftSubformula()) ||
32 !propositionalChecker.canHandle(formula.getSubformula().asUntilFormula().getRightSubformula())) {
33 STORM_LOG_DEBUG("Can not simplify when Until-formula has non-propositional subformula(s). Formula: " << formula);
34 return false;
35 }
36 storm::storage::BitVector phiStates = std::move(
37 propositionalChecker.check(formula.getSubformula().asUntilFormula().getLeftSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector());
38 storm::storage::BitVector psiStates = std::move(
39 propositionalChecker.check(formula.getSubformula().asUntilFormula().getRightSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector());
40 std::pair<storm::storage::BitVector, storm::storage::BitVector> statesWithProbability01 =
41 minimizing ? storm::utility::graph::performProb01Min(this->originalModel, phiStates, psiStates)
42 : storm::utility::graph::performProb01Max(this->originalModel, phiStates, psiStates);
43
44 // Only consider the maybestates that are reachable from one initial state without hopping over a target (i.e., prob1) state
46 this->originalModel.getTransitionMatrix(), this->originalModel.getInitialStates() & ~statesWithProbability01.first, ~statesWithProbability01.first,
47 statesWithProbability01.second);
48 storm::storage::BitVector maybeStates = reachableGreater0States & ~statesWithProbability01.second;
49
50 // obtain the resulting subsystem
51 storm::transformer::GoalStateMerger<SparseModelType> goalStateMerger(this->originalModel);
53 goalStateMerger.mergeTargetAndSinkStates(maybeStates, statesWithProbability01.second, statesWithProbability01.first);
54 this->simplifiedModel = mergerResult.model;
55 statesWithProbability01.first = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
56 if (mergerResult.sinkState) {
57 statesWithProbability01.first.set(mergerResult.sinkState.get(), true);
58 }
59 std::string sinkLabel = "sink";
60 while (this->simplifiedModel->hasLabel(sinkLabel)) {
61 sinkLabel = "_" + sinkLabel;
62 }
63 this->simplifiedModel->getStateLabeling().addLabel(sinkLabel, std::move(statesWithProbability01.first));
64 statesWithProbability01.second = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
65 if (mergerResult.targetState) {
66 statesWithProbability01.second.set(mergerResult.targetState.get(), true);
67 }
68 std::string targetLabel = "target";
69 while (this->simplifiedModel->hasLabel(targetLabel)) {
70 targetLabel = "_" + targetLabel;
71 }
72 this->simplifiedModel->getStateLabeling().addLabel(targetLabel, std::move(statesWithProbability01.second));
73
74 // obtain the simplified formula for the simplified model
75 auto labelFormula = std::make_shared<storm::logic::AtomicLabelFormula const>(targetLabel);
76 auto eventuallyFormula = std::make_shared<storm::logic::EventuallyFormula const>(labelFormula, storm::logic::FormulaContext::Probability);
77 this->simplifiedFormula = std::make_shared<storm::logic::ProbabilityOperatorFormula const>(eventuallyFormula, formula.getOperatorInformation());
78
79 // Eliminate all states for which all outgoing transitions are constant
80 storm::storage::BitVector considerForElimination = ~this->simplifiedModel->getInitialStates();
81 if (mergerResult.targetState) {
82 considerForElimination.set(*mergerResult.targetState, false);
83 }
84 if (mergerResult.sinkState) {
85 considerForElimination.set(*mergerResult.sinkState, false);
86 }
87 this->simplifiedModel = this->eliminateConstantDeterministicStates(*this->simplifiedModel, considerForElimination);
88
89 // Eliminate the end components that do not contain a target or a sink state (only required if the probability is maximized)
90 if (!minimizing) {
91 this->simplifiedModel = this->eliminateNeutralEndComponents(
92 *this->simplifiedModel, this->simplifiedModel->getStates(targetLabel) | this->simplifiedModel->getStates(sinkLabel));
93 }
94
95 return true;
96}
97
98template<typename SparseModelType>
100 STORM_LOG_THROW(!formula.getSubformula().asBoundedUntilFormula().hasLowerBound(), storm::exceptions::NotSupportedException,
101 "Lower step bounds are not supported.");
102 STORM_LOG_THROW(formula.getSubformula().asBoundedUntilFormula().hasUpperBound(), storm::exceptions::UnexpectedException,
103 "Expected a bounded until formula with an upper bound.");
105 storm::exceptions::UnexpectedException, "Expected a bounded until formula with integral bounds.");
106
107 bool minimizing =
109 uint_fast64_t upperStepBound = formula.getSubformula().asBoundedUntilFormula().getUpperBound().evaluateAsInt();
111 STORM_LOG_THROW(upperStepBound > 0, storm::exceptions::UnexpectedException, "Expected a strict upper bound that is greater than zero.");
112 --upperStepBound;
113 }
114
115 // Get the prob0, target, and the maybeStates
116 storm::modelchecker::SparsePropositionalModelChecker<SparseModelType> propositionalChecker(this->originalModel);
117 if (!propositionalChecker.canHandle(formula.getSubformula().asBoundedUntilFormula().getLeftSubformula()) ||
118 !propositionalChecker.canHandle(formula.getSubformula().asBoundedUntilFormula().getRightSubformula())) {
119 STORM_LOG_DEBUG("Can not simplify when Until-formula has non-propositional subformula(s). Formula: " << formula);
120 return false;
121 }
122 storm::storage::BitVector phiStates = std::move(propositionalChecker.check(formula.getSubformula().asBoundedUntilFormula().getLeftSubformula())
123 ->asExplicitQualitativeCheckResult()
124 .getTruthValuesVector());
125 storm::storage::BitVector psiStates = std::move(propositionalChecker.check(formula.getSubformula().asBoundedUntilFormula().getRightSubformula())
126 ->asExplicitQualitativeCheckResult()
127 .getTruthValuesVector());
128 storm::storage::BitVector probGreater0States =
129 minimizing ? storm::utility::graph::performProbGreater0A(this->originalModel.getTransitionMatrix(),
130 this->originalModel.getTransitionMatrix().getRowGroupIndices(),
131 this->originalModel.getBackwardTransitions(), phiStates, psiStates, true, upperStepBound)
132 : storm::utility::graph::performProbGreater0E(this->originalModel.getBackwardTransitions(), phiStates, psiStates, true, upperStepBound);
133
134 // Only consider the maybestates that are reachable from one initial probGreater0 state within the given amount of steps and without hopping over a target
135 // state
136 storm::storage::BitVector reachableGreater0States =
137 storm::utility::graph::getReachableStates(this->originalModel.getTransitionMatrix(), this->originalModel.getInitialStates() & probGreater0States,
138 probGreater0States, psiStates, true, upperStepBound);
139 storm::storage::BitVector maybeStates = reachableGreater0States & ~psiStates;
140 storm::storage::BitVector prob0States = ~reachableGreater0States & ~psiStates;
141
142 // obtain the resulting subsystem
143 storm::transformer::GoalStateMerger<SparseModelType> goalStateMerger(this->originalModel);
145 goalStateMerger.mergeTargetAndSinkStates(maybeStates, psiStates, prob0States);
146 this->simplifiedModel = mergerResult.model;
147 psiStates = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
148 if (mergerResult.targetState) {
149 psiStates.set(mergerResult.targetState.get(), true);
150 }
151 std::string targetLabel = "target";
152 while (this->simplifiedModel->hasLabel(targetLabel)) {
153 targetLabel = "_" + targetLabel;
154 }
155 this->simplifiedModel->getStateLabeling().addLabel(targetLabel, std::move(psiStates));
156
157 // obtain the simplified formula for the simplified model
158 auto labelFormula = std::make_shared<storm::logic::AtomicLabelFormula const>(targetLabel);
159 auto boundedUntilFormula =
160 std::make_shared<storm::logic::BoundedUntilFormula const>(storm::logic::Formula::getTrueFormula(), labelFormula, boost::none,
164 this->simplifiedFormula = std::make_shared<storm::logic::ProbabilityOperatorFormula const>(boundedUntilFormula, formula.getOperatorInformation());
165
166 return true;
167}
168
169template<typename SparseModelType>
171 typename SparseModelType::RewardModelType const& originalRewardModel =
172 formula.hasRewardModelName() ? this->originalModel.getRewardModel(formula.getRewardModelName()) : this->originalModel.getUniqueRewardModel();
173
174 bool minimizing =
176
177 // Get the prob1 and the maybeStates
178 storm::modelchecker::SparsePropositionalModelChecker<SparseModelType> propositionalChecker(this->originalModel);
179 if (!propositionalChecker.canHandle(formula.getSubformula().asEventuallyFormula().getSubformula())) {
180 STORM_LOG_DEBUG("Can not simplify when reachability reward formula has non-propositional subformula(s). Formula: " << formula);
181 return false;
182 }
183 storm::storage::BitVector targetStates = std::move(
184 propositionalChecker.check(formula.getSubformula().asEventuallyFormula().getSubformula())->asExplicitQualitativeCheckResult().getTruthValuesVector());
185 // The set of target states can be extended by the states that reach target with probability 1 without collecting any reward
186 // TODO for the call of Prob1E we could restrict the analysis to actions with zero reward instead of states with zero reward
187 targetStates =
188 minimizing ? storm::utility::graph::performProb1E(this->originalModel, this->originalModel.getBackwardTransitions(),
189 originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), targetStates)
190 : storm::utility::graph::performProb1A(this->originalModel, this->originalModel.getBackwardTransitions(),
191 originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), targetStates);
192 storm::storage::BitVector statesWithProb1 =
193 minimizing ? storm::utility::graph::performProb1E(this->originalModel, this->originalModel.getBackwardTransitions(),
194 storm::storage::BitVector(this->originalModel.getNumberOfStates(), true), targetStates)
195 : storm::utility::graph::performProb1A(this->originalModel, this->originalModel.getBackwardTransitions(),
196 storm::storage::BitVector(this->originalModel.getNumberOfStates(), true), targetStates);
197 storm::storage::BitVector infinityStates = ~statesWithProb1;
198 // Only consider the states that are reachable from an initial state without hopping over a target state
200 this->originalModel.getTransitionMatrix(), this->originalModel.getInitialStates() & statesWithProb1, statesWithProb1, targetStates);
201 storm::storage::BitVector maybeStates = reachableStates & ~targetStates;
202
203 // obtain the resulting subsystem
204 std::vector<std::string> rewardModelNameAsVector(
205 1, formula.hasRewardModelName() ? formula.getRewardModelName() : this->originalModel.getRewardModels().begin()->first);
206 storm::transformer::GoalStateMerger<SparseModelType> goalStateMerger(this->originalModel);
208 goalStateMerger.mergeTargetAndSinkStates(maybeStates, targetStates, infinityStates, rewardModelNameAsVector);
209 this->simplifiedModel = mergerResult.model;
210 infinityStates = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
211 if (mergerResult.sinkState) {
212 infinityStates.set(mergerResult.sinkState.get(), true);
213 }
214 std::string sinkLabel = "sink";
215 while (this->simplifiedModel->hasLabel(sinkLabel)) {
216 sinkLabel = "_" + sinkLabel;
217 }
218 this->simplifiedModel->getStateLabeling().addLabel(sinkLabel, std::move(infinityStates));
219
220 targetStates = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
221 if (mergerResult.targetState) {
222 targetStates.set(mergerResult.targetState.get(), true);
223 }
224 std::string targetLabel = "target";
225 while (this->simplifiedModel->hasLabel(targetLabel)) {
226 targetLabel = "_" + targetLabel;
227 }
228 this->simplifiedModel->getStateLabeling().addLabel(targetLabel, std::move(targetStates));
229
230 // obtain the simplified formula for the simplified model
231 auto labelFormula = std::make_shared<storm::logic::AtomicLabelFormula const>(targetLabel);
232 auto eventuallyFormula = std::make_shared<storm::logic::EventuallyFormula const>(labelFormula, storm::logic::FormulaContext::Reward);
233 this->simplifiedFormula =
234 std::make_shared<storm::logic::RewardOperatorFormula const>(eventuallyFormula, rewardModelNameAsVector.front(), formula.getOperatorInformation());
235
236 // Eliminate all states for which all outgoing transitions are constant
237 storm::storage::BitVector considerForElimination = ~this->simplifiedModel->getInitialStates();
238 if (mergerResult.targetState) {
239 considerForElimination.set(*mergerResult.targetState, false);
240 }
241 if (mergerResult.sinkState) {
242 considerForElimination.set(*mergerResult.sinkState, false);
243 }
244 this->simplifiedModel = this->eliminateConstantDeterministicStates(*this->simplifiedModel, considerForElimination, rewardModelNameAsVector.front());
245
246 // Eliminate the end components in which no reward is collected (only required if rewards are minimized)
247 if (minimizing) {
248 this->simplifiedModel = this->eliminateNeutralEndComponents(*this->simplifiedModel,
249 this->simplifiedModel->getStates(targetLabel) | this->simplifiedModel->getStates(sinkLabel),
250 rewardModelNameAsVector.front());
251 }
252 return true;
253}
254
255template<typename SparseModelType>
258 storm::exceptions::UnexpectedException, "Expected a cumulative reward formula with integral bound.");
259
260 typename SparseModelType::RewardModelType const& originalRewardModel =
261 formula.hasRewardModelName() ? this->originalModel.getRewardModel(formula.getRewardModelName()) : this->originalModel.getUniqueRewardModel();
262
263 bool minimizing =
265 uint_fast64_t stepBound = formula.getSubformula().asCumulativeRewardFormula().getBound().evaluateAsInt();
267 STORM_LOG_THROW(stepBound > 0, storm::exceptions::UnexpectedException, "Expected a strict upper bound that is greater than zero.");
268 --stepBound;
269 }
270
271 // Get the states with non-zero reward
272 storm::storage::BitVector maybeStates =
274 this->originalModel.getTransitionMatrix(), this->originalModel.getTransitionMatrix().getRowGroupIndices(),
275 this->originalModel.getBackwardTransitions(), storm::storage::BitVector(this->originalModel.getNumberOfStates(), true),
276 ~originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), true, stepBound)
278 this->originalModel.getBackwardTransitions(), storm::storage::BitVector(this->originalModel.getNumberOfStates(), true),
279 ~originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), true, stepBound);
280 storm::storage::BitVector zeroRewardStates = ~maybeStates;
281 storm::storage::BitVector noStates(this->originalModel.getNumberOfStates(), false);
282
283 // obtain the resulting subsystem
284 std::vector<std::string> rewardModelNameAsVector(
285 1, formula.hasRewardModelName() ? formula.getRewardModelName() : this->originalModel.getRewardModels().begin()->first);
286 storm::transformer::GoalStateMerger<SparseModelType> goalStateMerger(this->originalModel);
288 goalStateMerger.mergeTargetAndSinkStates(maybeStates, noStates, zeroRewardStates, rewardModelNameAsVector);
289 this->simplifiedModel = mergerResult.model;
290
291 // obtain the simplified formula for the simplified model
292 this->simplifiedFormula = storm::logic::CloneVisitor().clone(formula);
293
294 return true;
295}
296
297template<typename SparseModelType>
299 SparseModelType const& model, storm::storage::BitVector const& ignoredStates, boost::optional<std::string> const& rewardModelName) {
300 // Get the actions that can be part of an EC
301 storm::storage::BitVector possibleECActions(model.getNumberOfChoices(), true);
302 for (auto const& state : ignoredStates) {
303 for (uint_fast64_t actionIndex = model.getTransitionMatrix().getRowGroupIndices()[state];
304 actionIndex < model.getTransitionMatrix().getRowGroupIndices()[state + 1]; ++actionIndex) {
305 possibleECActions.set(actionIndex, false);
306 }
307 }
308
309 // Get the action-based reward values and unselect non-zero reward actions
310 std::vector<typename SparseModelType::ValueType> actionRewards;
311 if (rewardModelName) {
312 actionRewards = model.getRewardModel(*rewardModelName).getTotalRewardVector(model.getTransitionMatrix());
313 uint_fast64_t actionIndex = 0;
314 for (auto const& actionReward : actionRewards) {
315 if (!storm::utility::isZero(actionReward)) {
316 possibleECActions.set(actionIndex, false);
317 }
318 ++actionIndex;
319 }
320 }
321
322 // Invoke EC Elimination
324 model.getTransitionMatrix(), storm::storage::BitVector(model.getNumberOfStates(), true), possibleECActions,
325 storm::storage::BitVector(model.getNumberOfStates(), false));
326
327 // obtain the reward model for the resulting system
328 std::unordered_map<std::string, typename SparseModelType::RewardModelType> rewardModels;
329 if (rewardModelName) {
330 std::vector<typename SparseModelType::ValueType> newActionRewards(ecEliminatorResult.matrix.getRowCount());
331 storm::utility::vector::selectVectorValues(newActionRewards, ecEliminatorResult.newToOldRowMapping, actionRewards);
332 rewardModels.insert(std::make_pair(*rewardModelName, typename SparseModelType::RewardModelType(std::nullopt, std::move(actionRewards))));
333 }
334
335 // the new labeling
336 storm::models::sparse::StateLabeling labeling(ecEliminatorResult.matrix.getRowGroupCount());
337 for (auto const& label : model.getStateLabeling().getLabels()) {
338 auto const& origStatesWithLabel = model.getStates(label);
339 storm::storage::BitVector newStatesWithLabel(ecEliminatorResult.matrix.getRowGroupCount(), false);
340 for (auto const& origState : origStatesWithLabel) {
341 newStatesWithLabel.set(ecEliminatorResult.oldToNewStateMapping[origState], true);
342 }
343 labeling.addLabel(label, std::move(newStatesWithLabel));
344 }
345
346 return std::make_shared<SparseModelType>(std::move(ecEliminatorResult.matrix), std::move(labeling), std::move(rewardModels));
347}
348
350} // namespace transformer
351} // namespace storm
virtual bool isIntegerLiteralExpression() const
int_fast64_t evaluateAsInt(Valuation const *valuation=nullptr) const
Evaluates the expression under the valuation of variables given by the valuation and returns the resu...
BaseExpression const & getBaseExpression() const
Retrieves the base expression underlying this expression object.
Formula const & getRightSubformula() const
Formula const & getLeftSubformula() const
storm::expressions::Expression const & getUpperBound(unsigned i=0) const
bool isUpperBoundStrict(unsigned i=0) const
std::shared_ptr< Formula > clone(Formula const &f) const
storm::expressions::Expression const & getBound() const
UntilFormula & asUntilFormula()
Definition Formula.cpp:325
BoundedUntilFormula & asBoundedUntilFormula()
Definition Formula.cpp:333
static std::shared_ptr< Formula const > getTrueFormula()
Definition Formula.cpp:213
EventuallyFormula & asEventuallyFormula()
Definition Formula.cpp:341
CumulativeRewardFormula & asCumulativeRewardFormula()
Definition Formula.cpp:429
Bound const & getBound() const
OperatorInformation const & getOperatorInformation() const
storm::solver::OptimizationDirection const & getOptimalityType() const
std::string const & getRewardModelName() const
Retrieves the name of the reward model this property refers to (if any).
bool hasRewardModelName() const
Retrieves whether the reward model refers to a specific reward model.
Formula const & getSubformula() const
Formula const & getSubformula() const
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 override
Determines whether the model checker can handle the given verification task.
void addLabel(std::string const &label)
Adds a new label to the labelings.
This class manages the labeling of the state space with a number of (atomic) labels.
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
void set(uint64_t index, bool value=true)
Sets the given truth value at the given index.
static EndComponentEliminatorReturnType transform(storm::storage::SparseMatrix< ValueType > const &originalMatrix, storm::storage::MaximalEndComponentDecomposition< ValueType > ecs, storm::storage::BitVector const &subsystemStates, storm::storage::BitVector const &addSinkRowStates, bool addSelfLoopAtSinkStates=false)
ReturnType mergeTargetAndSinkStates(storm::storage::BitVector const &maybeStates, storm::storage::BitVector const &targetStates, storm::storage::BitVector const &sinkStates, std::vector< std::string > const &selectedRewardModels=std::vector< std::string >(), boost::optional< storm::storage::BitVector > const &choiceFilter=boost::none) const
This class performs different steps to simplify the given (parametric) model.
virtual bool simplifyForBoundedUntilProbabilities(storm::logic::ProbabilityOperatorFormula const &formula) override
virtual bool simplifyForCumulativeRewards(storm::logic::RewardOperatorFormula const &formula) override
virtual bool simplifyForUntilProbabilities(storm::logic::ProbabilityOperatorFormula const &formula) override
static std::shared_ptr< SparseModelType > eliminateNeutralEndComponents(SparseModelType const &model, storm::storage::BitVector const &ignoredStates, boost::optional< std::string > const &rewardModelName=boost::none)
Eliminates all end components of the model satisfying.
virtual bool simplifyForReachabilityRewards(storm::logic::RewardOperatorFormula const &formula) override
This class performs different steps to simplify the given (parametric) model.
#define STORM_LOG_DEBUG(message)
Definition logging.h:18
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
bool isLowerBound(ComparisonType t)
bool constexpr minimize(OptimizationDirection d)
std::pair< storm::storage::BitVector, storm::storage::BitVector > performProb01Max(storm::storage::SparseMatrix< T > const &transitionMatrix, std::vector< uint_fast64_t > const &nondeterministicChoiceIndices, storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates)
Definition graph.cpp:819
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...
Definition graph.cpp:41
storm::storage::BitVector performProbGreater0A(storm::storage::SparseMatrix< T > const &transitionMatrix, std::vector< uint_fast64_t > const &nondeterministicChoiceIndices, storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, bool useStepBound, uint_fast64_t maximalSteps, boost::optional< storm::storage::BitVector > const &choiceConstraint)
Computes the sets of states that have probability greater 0 of satisfying phi until psi under any pos...
Definition graph.cpp:841
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...
Definition graph.cpp:981
storm::storage::BitVector performProbGreater0E(storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, bool useStepBound, uint_fast64_t maximalSteps)
Computes the sets of states that have probability greater 0 of satisfying phi until psi under at leas...
Definition graph.cpp:673
std::pair< storm::storage::BitVector, storm::storage::BitVector > performProb01Min(storm::storage::SparseMatrix< T > const &transitionMatrix, std::vector< uint_fast64_t > const &nondeterministicChoiceIndices, storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates)
Definition graph.cpp:1063
storm::storage::BitVector performProb1E(storm::storage::SparseMatrix< T > const &transitionMatrix, std::vector< uint_fast64_t > const &nondeterministicChoiceIndices, storm::storage::SparseMatrix< T > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, boost::optional< storm::storage::BitVector > const &choiceConstraint)
Computes the sets of states that have probability 1 of satisfying phi until psi under at least one po...
Definition graph.cpp:741
void selectVectorValues(std::vector< T > &vector, storm::storage::BitVector const &positions, std::vector< T > const &values)
Selects the elements from a vector at the specified positions and writes them consecutively into anot...
Definition vector.h:184
bool isZero(ValueType const &a)
Definition constants.cpp:39
ComparisonType comparisonType
Definition Bound.h:18
boost::optional< uint_fast64_t > sinkState
std::shared_ptr< SparseModelType > model
boost::optional< uint_fast64_t > targetState