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