Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseParametricMdpSimplifier.cpp
Go to the documentation of this file.
2
3#include <optional>
4
14#include "storm/utility/graph.h"
16
17namespace storm {
18namespace transformer {
19
20template<typename SparseModelType>
22 : SparseParametricModelSimplifier<SparseModelType>(model) {
23 // intentionally left empty
24}
25
26template<typename SparseModelType>
28 bool minimizing =
30
31 // Get the prob0, prob1 and the maybeStates
33 if (!propositionalChecker.canHandle(formula.getSubformula().asUntilFormula().getLeftSubformula()) ||
34 !propositionalChecker.canHandle(formula.getSubformula().asUntilFormula().getRightSubformula())) {
35 STORM_LOG_DEBUG("Can not simplify when Until-formula has non-propositional subformula(s). Formula: " << formula);
36 return false;
37 }
38 storm::storage::BitVector phiStates = std::move(propositionalChecker.check(formula.getSubformula().asUntilFormula().getLeftSubformula())
39 ->template asExplicitQualitativeCheckResult<typename SparseModelType::ValueType>()
40 .getTruthValuesVector());
41 storm::storage::BitVector psiStates = std::move(propositionalChecker.check(formula.getSubformula().asUntilFormula().getRightSubformula())
42 ->template asExplicitQualitativeCheckResult<typename SparseModelType::ValueType>()
43 .getTruthValuesVector());
44 std::pair<storm::storage::BitVector, storm::storage::BitVector> statesWithProbability01 =
45 minimizing ? storm::utility::graph::performProb01Min(this->originalModel, phiStates, psiStates)
46 : storm::utility::graph::performProb01Max(this->originalModel, phiStates, psiStates);
47
48 // Only consider the maybestates that are reachable from one initial state without hopping over a target (i.e., prob1) state
50 this->originalModel.getTransitionMatrix(), this->originalModel.getInitialStates() & ~statesWithProbability01.first, ~statesWithProbability01.first,
51 statesWithProbability01.second);
52 storm::storage::BitVector maybeStates = reachableGreater0States & ~statesWithProbability01.second;
53
54 // obtain the resulting subsystem
57 goalStateMerger.mergeTargetAndSinkStates(maybeStates, statesWithProbability01.second, statesWithProbability01.first);
58 this->simplifiedModel = mergerResult.model;
59 statesWithProbability01.first = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
60 if (mergerResult.sinkState) {
61 statesWithProbability01.first.set(mergerResult.sinkState.get(), true);
62 }
63 std::string sinkLabel = "sink";
64 while (this->simplifiedModel->hasLabel(sinkLabel)) {
65 sinkLabel = "_" + sinkLabel;
66 }
67 this->simplifiedModel->getStateLabeling().addLabel(sinkLabel, std::move(statesWithProbability01.first));
68 statesWithProbability01.second = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
69 if (mergerResult.targetState) {
70 statesWithProbability01.second.set(mergerResult.targetState.get(), true);
71 }
72 std::string targetLabel = "target";
73 while (this->simplifiedModel->hasLabel(targetLabel)) {
74 targetLabel = "_" + targetLabel;
75 }
76 this->simplifiedModel->getStateLabeling().addLabel(targetLabel, std::move(statesWithProbability01.second));
77
78 // obtain the simplified formula for the simplified model
79 auto labelFormula = std::make_shared<storm::logic::AtomicLabelFormula const>(targetLabel);
80 auto eventuallyFormula = std::make_shared<storm::logic::EventuallyFormula const>(labelFormula, storm::logic::FormulaContext::Probability);
81 this->simplifiedFormula = std::make_shared<storm::logic::ProbabilityOperatorFormula const>(eventuallyFormula, formula.getOperatorInformation());
82
83 // Eliminate all states for which all outgoing transitions are constant
84 storm::storage::BitVector considerForElimination = ~this->simplifiedModel->getInitialStates();
85 if (mergerResult.targetState) {
86 considerForElimination.set(*mergerResult.targetState, false);
87 }
88 if (mergerResult.sinkState) {
89 considerForElimination.set(*mergerResult.sinkState, false);
90 }
91 this->simplifiedModel = this->eliminateConstantDeterministicStates(*this->simplifiedModel, considerForElimination);
92
93 // Eliminate the end components that do not contain a target or a sink state (only required if the probability is maximized)
94 if (!minimizing) {
96 *this->simplifiedModel, this->simplifiedModel->getStates(targetLabel) | this->simplifiedModel->getStates(sinkLabel));
97 }
98
99 return true;
100}
101
102template<typename SparseModelType>
104 STORM_LOG_THROW(!formula.getSubformula().asBoundedUntilFormula().hasLowerBound(), storm::exceptions::NotSupportedException,
105 "Lower step bounds are not supported.");
106 STORM_LOG_THROW(formula.getSubformula().asBoundedUntilFormula().hasUpperBound(), storm::exceptions::UnexpectedException,
107 "Expected a bounded until formula with an upper bound.");
109 storm::exceptions::UnexpectedException, "Expected a bounded until formula with integral bounds.");
110
111 bool minimizing =
113 uint_fast64_t upperStepBound = formula.getSubformula().asBoundedUntilFormula().getUpperBound().evaluateAsInt();
115 STORM_LOG_THROW(upperStepBound > 0, storm::exceptions::UnexpectedException, "Expected a strict upper bound that is greater than zero.");
116 --upperStepBound;
117 }
118
119 // Get the prob0, target, and the maybeStates
121 if (!propositionalChecker.canHandle(formula.getSubformula().asBoundedUntilFormula().getLeftSubformula()) ||
122 !propositionalChecker.canHandle(formula.getSubformula().asBoundedUntilFormula().getRightSubformula())) {
123 STORM_LOG_DEBUG("Can not simplify when Until-formula has non-propositional subformula(s). Formula: " << formula);
124 return false;
125 }
126 storm::storage::BitVector phiStates = std::move(propositionalChecker.check(formula.getSubformula().asBoundedUntilFormula().getLeftSubformula())
127 ->template asExplicitQualitativeCheckResult<typename SparseModelType::ValueType>()
128 .getTruthValuesVector());
129 storm::storage::BitVector psiStates = std::move(propositionalChecker.check(formula.getSubformula().asBoundedUntilFormula().getRightSubformula())
130 ->template asExplicitQualitativeCheckResult<typename SparseModelType::ValueType>()
131 .getTruthValuesVector());
132 storm::storage::BitVector probGreater0States =
133 minimizing ? storm::utility::graph::performProbGreater0A(this->originalModel.getTransitionMatrix(),
134 this->originalModel.getTransitionMatrix().getRowGroupIndices(),
135 this->originalModel.getBackwardTransitions(), phiStates, psiStates, true, upperStepBound)
136 : storm::utility::graph::performProbGreater0E(this->originalModel.getBackwardTransitions(), phiStates, psiStates, true, upperStepBound);
137
138 // Only consider the maybestates that are reachable from one initial probGreater0 state within the given amount of steps and without hopping over a target
139 // state
140 storm::storage::BitVector reachableGreater0States =
141 storm::utility::graph::getReachableStates(this->originalModel.getTransitionMatrix(), this->originalModel.getInitialStates() & probGreater0States,
142 probGreater0States, psiStates, true, upperStepBound);
143 storm::storage::BitVector maybeStates = reachableGreater0States & ~psiStates;
144 storm::storage::BitVector prob0States = ~reachableGreater0States & ~psiStates;
145
146 // obtain the resulting subsystem
149 goalStateMerger.mergeTargetAndSinkStates(maybeStates, psiStates, prob0States);
150 this->simplifiedModel = mergerResult.model;
151 psiStates = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
152 if (mergerResult.targetState) {
153 psiStates.set(mergerResult.targetState.get(), true);
154 }
155 std::string targetLabel = "target";
156 while (this->simplifiedModel->hasLabel(targetLabel)) {
157 targetLabel = "_" + targetLabel;
158 }
159 this->simplifiedModel->getStateLabeling().addLabel(targetLabel, std::move(psiStates));
160
161 // obtain the simplified formula for the simplified model
162 auto labelFormula = std::make_shared<storm::logic::AtomicLabelFormula const>(targetLabel);
163 auto boundedUntilFormula =
164 std::make_shared<storm::logic::BoundedUntilFormula const>(storm::logic::Formula::getTrueFormula(), labelFormula, std::nullopt,
168 this->simplifiedFormula = std::make_shared<storm::logic::ProbabilityOperatorFormula const>(boundedUntilFormula, formula.getOperatorInformation());
169
170 return true;
171}
172
173template<typename SparseModelType>
175 typename SparseModelType::RewardModelType const& originalRewardModel =
176 formula.hasRewardModelName() ? this->originalModel.getRewardModel(formula.getRewardModelName()) : this->originalModel.getUniqueRewardModel();
177
178 bool minimizing =
180
181 // Get the prob1 and the maybeStates
183 if (!propositionalChecker.canHandle(formula.getSubformula().asEventuallyFormula().getSubformula())) {
184 STORM_LOG_DEBUG("Can not simplify when reachability reward formula has non-propositional subformula(s). Formula: " << formula);
185 return false;
186 }
187 storm::storage::BitVector targetStates = std::move(propositionalChecker.check(formula.getSubformula().asEventuallyFormula().getSubformula())
188 ->template asExplicitQualitativeCheckResult<typename SparseModelType::ValueType>()
189 .getTruthValuesVector());
190 // The set of target states can be extended by the states that reach target with probability 1 without collecting any reward
191 // TODO for the call of Prob1E we could restrict the analysis to actions with zero reward instead of states with zero reward
192 targetStates =
193 minimizing ? storm::utility::graph::performProb1E(this->originalModel, this->originalModel.getBackwardTransitions(),
194 originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), targetStates)
195 : storm::utility::graph::performProb1A(this->originalModel, this->originalModel.getBackwardTransitions(),
196 originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), targetStates);
197 storm::storage::BitVector statesWithProb1 =
198 minimizing ? storm::utility::graph::performProb1E(this->originalModel, this->originalModel.getBackwardTransitions(),
199 storm::storage::BitVector(this->originalModel.getNumberOfStates(), true), targetStates)
200 : storm::utility::graph::performProb1A(this->originalModel, this->originalModel.getBackwardTransitions(),
201 storm::storage::BitVector(this->originalModel.getNumberOfStates(), true), targetStates);
202 storm::storage::BitVector infinityStates = ~statesWithProb1;
203 // Only consider the states that are reachable from an initial state without hopping over a target state
205 this->originalModel.getTransitionMatrix(), this->originalModel.getInitialStates() & statesWithProb1, statesWithProb1, targetStates);
206 storm::storage::BitVector maybeStates = reachableStates & ~targetStates;
207
208 // obtain the resulting subsystem
209 std::vector<std::string> rewardModelNameAsVector(
210 1, formula.hasRewardModelName() ? formula.getRewardModelName() : this->originalModel.getRewardModels().begin()->first);
213 goalStateMerger.mergeTargetAndSinkStates(maybeStates, targetStates, infinityStates, rewardModelNameAsVector);
214 this->simplifiedModel = mergerResult.model;
215 infinityStates = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
216 if (mergerResult.sinkState) {
217 infinityStates.set(mergerResult.sinkState.get(), true);
218 }
219 std::string sinkLabel = "sink";
220 while (this->simplifiedModel->hasLabel(sinkLabel)) {
221 sinkLabel = "_" + sinkLabel;
222 }
223 this->simplifiedModel->getStateLabeling().addLabel(sinkLabel, std::move(infinityStates));
224
225 targetStates = storm::storage::BitVector(this->simplifiedModel->getNumberOfStates(), false);
226 if (mergerResult.targetState) {
227 targetStates.set(mergerResult.targetState.get(), true);
228 }
229 std::string targetLabel = "target";
230 while (this->simplifiedModel->hasLabel(targetLabel)) {
231 targetLabel = "_" + targetLabel;
232 }
233 this->simplifiedModel->getStateLabeling().addLabel(targetLabel, std::move(targetStates));
234
235 // obtain the simplified formula for the simplified model
236 auto labelFormula = std::make_shared<storm::logic::AtomicLabelFormula const>(targetLabel);
237 auto eventuallyFormula = std::make_shared<storm::logic::EventuallyFormula const>(labelFormula, storm::logic::FormulaContext::Reward);
238 this->simplifiedFormula =
239 std::make_shared<storm::logic::RewardOperatorFormula const>(eventuallyFormula, rewardModelNameAsVector.front(), formula.getOperatorInformation());
240
241 // Eliminate all states for which all outgoing transitions are constant
242 storm::storage::BitVector considerForElimination = ~this->simplifiedModel->getInitialStates();
243 if (mergerResult.targetState) {
244 considerForElimination.set(*mergerResult.targetState, false);
245 }
246 if (mergerResult.sinkState) {
247 considerForElimination.set(*mergerResult.sinkState, false);
248 }
249 this->simplifiedModel = this->eliminateConstantDeterministicStates(*this->simplifiedModel, considerForElimination, rewardModelNameAsVector.front());
250
251 // Eliminate the end components in which no reward is collected (only required if rewards are minimized)
252 if (minimizing) {
254 *this->simplifiedModel, this->simplifiedModel->getStates(targetLabel) | this->simplifiedModel->getStates(sinkLabel),
255 rewardModelNameAsVector.front());
256 }
257 return true;
258}
259
260template<typename SparseModelType>
263 storm::exceptions::UnexpectedException, "Expected a cumulative reward formula with integral bound.");
264
265 typename SparseModelType::RewardModelType const& originalRewardModel =
266 formula.hasRewardModelName() ? this->originalModel.getRewardModel(formula.getRewardModelName()) : this->originalModel.getUniqueRewardModel();
267
268 bool minimizing =
270 uint_fast64_t stepBound = formula.getSubformula().asCumulativeRewardFormula().getBound().evaluateAsInt();
272 STORM_LOG_THROW(stepBound > 0, storm::exceptions::UnexpectedException, "Expected a strict upper bound that is greater than zero.");
273 --stepBound;
274 }
275
276 // Get the states with non-zero reward
277 storm::storage::BitVector maybeStates =
279 this->originalModel.getTransitionMatrix(), this->originalModel.getTransitionMatrix().getRowGroupIndices(),
280 this->originalModel.getBackwardTransitions(), storm::storage::BitVector(this->originalModel.getNumberOfStates(), true),
281 ~originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), true, stepBound)
283 this->originalModel.getBackwardTransitions(), storm::storage::BitVector(this->originalModel.getNumberOfStates(), true),
284 ~originalRewardModel.getStatesWithZeroReward(this->originalModel.getTransitionMatrix()), true, stepBound);
285 storm::storage::BitVector zeroRewardStates = ~maybeStates;
286 storm::storage::BitVector noStates(this->originalModel.getNumberOfStates(), false);
287
288 // obtain the resulting subsystem
289 std::vector<std::string> rewardModelNameAsVector(
290 1, formula.hasRewardModelName() ? formula.getRewardModelName() : this->originalModel.getRewardModels().begin()->first);
293 goalStateMerger.mergeTargetAndSinkStates(maybeStates, noStates, zeroRewardStates, rewardModelNameAsVector);
294 this->simplifiedModel = mergerResult.model;
295
296 // obtain the simplified formula for the simplified model
298
299 return true;
300}
301
302template<typename SparseModelType>
304 SparseModelType const& model, storm::storage::BitVector const& ignoredStates, boost::optional<std::string> const& rewardModelName) {
305 // Get the actions that can be part of an EC
306 storm::storage::BitVector possibleECActions(model.getNumberOfChoices(), true);
307 for (uint64_t state : ignoredStates) {
308 for (uint_fast64_t actionIndex = model.getTransitionMatrix().getRowGroupIndices()[state];
309 actionIndex < model.getTransitionMatrix().getRowGroupIndices()[state + 1]; ++actionIndex) {
310 possibleECActions.set(actionIndex, false);
311 }
312 }
313
314 // Get the action-based reward values and unselect non-zero reward actions
315 std::vector<typename SparseModelType::ValueType> actionRewards;
316 if (rewardModelName) {
317 actionRewards = model.getRewardModel(*rewardModelName).getTotalRewardVector(model.getTransitionMatrix());
318 uint_fast64_t actionIndex = 0;
319 for (auto const& actionReward : actionRewards) {
320 if (!storm::utility::isZero(actionReward)) {
321 possibleECActions.set(actionIndex, false);
322 }
323 ++actionIndex;
324 }
325 }
326
327 // Invoke EC Elimination
329 model.getTransitionMatrix(), storm::storage::BitVector(model.getNumberOfStates(), true), possibleECActions,
330 storm::storage::BitVector(model.getNumberOfStates(), false));
331
332 // obtain the reward model for the resulting system
333 std::unordered_map<std::string, typename SparseModelType::RewardModelType> rewardModels;
334 if (rewardModelName) {
335 std::vector<typename SparseModelType::ValueType> newActionRewards(ecEliminatorResult.matrix.getRowCount());
336 storm::utility::vector::selectVectorValues(newActionRewards, ecEliminatorResult.newToOldRowMapping, actionRewards);
337 rewardModels.insert(std::make_pair(*rewardModelName, typename SparseModelType::RewardModelType(std::nullopt, std::move(actionRewards))));
338 }
339
340 // the new labeling
341 storm::models::sparse::StateLabeling labeling(ecEliminatorResult.matrix.getRowGroupCount());
342 for (auto const& label : model.getStateLabeling().getLabels()) {
343 auto const& origStatesWithLabel = model.getStates(label);
344 storm::storage::BitVector newStatesWithLabel(ecEliminatorResult.matrix.getRowGroupCount(), false);
345 for (auto const& origState : origStatesWithLabel) {
346 newStatesWithLabel.set(ecEliminatorResult.oldToNewStateMapping[origState], true);
347 }
348 labeling.addLabel(label, std::move(newStatesWithLabel));
349 }
350
351 return std::make_shared<SparseModelType>(std::move(ecEliminatorResult.matrix), std::move(labeling), std::move(rewardModels));
352}
353
355} // namespace transformer
356} // 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
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
std::shared_ptr< SparseModelType > eliminateConstantDeterministicStates(SparseModelType const &model, storm::storage::BitVector const &consideredStates, boost::optional< std::string > const &rewardModelName=boost::none)
Eliminates all states that satisfy.
std::shared_ptr< storm::logic::Formula const > simplifiedFormula
#define STORM_LOG_DEBUG(message)
Definition logging.h:21
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:28
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:42
ComparisonType comparisonType
Definition Bound.h:17
boost::optional< uint_fast64_t > sinkState
std::shared_ptr< SparseModelType > model
boost::optional< uint_fast64_t > targetState