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