Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
NondeterministicModelBisimulationDecomposition.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace storm {
8namespace storage {
9
13template<typename ModelType>
14class NondeterministicModelBisimulationDecomposition : public BisimulationDecomposition<ModelType, bisimulation::DeterministicBlockData> {
15 public:
17 typedef typename ModelType::ValueType ValueType;
18 typedef typename ModelType::RewardModelType RewardModelType;
19
29
30 protected:
31 virtual std::pair<storm::storage::BitVector, storm::storage::BitVector> getStatesWithProbability01() override;
32
33 virtual void buildQuotient() override;
34
36 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue) override;
37
38 virtual void initialize() override;
39
40 private:
41 // Creates the mapping from the choice indices to the states.
42 void createChoiceToStateMapping();
43
44 // Initializes the quotient distributions wrt. to the current partition.
45 void initializeQuotientDistributions();
46
47 // Retrieves whether the given block possibly needs refinement.
48 bool possiblyNeedsRefinement(bisimulation::Block<BlockDataType> const& block) const;
49
50 // Splits the given block according to the current quotient distributions.
51 bool splitBlockAccordingToCurrentQuotientDistributions(bisimulation::Block<BlockDataType>& block,
52 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
53
54 // Retrieves whether the quotient distributions of state 1 are considered to be less than the ones of state 2.
55 bool quotientDistributionsLess(storm::storage::sparse::state_type state1, storm::storage::sparse::state_type state2) const;
56
57 // Updates the ordered list of quotient distribution for the given state.
58 void updateOrderedQuotientDistributions(storm::storage::sparse::state_type state);
59
60 // Updates the quotient distributions of the predecessors of the new block by taking the probability mass
61 // away from the old block.
62 void updateQuotientDistributionsOfPredecessors(bisimulation::Block<BlockDataType> const& newBlock, bisimulation::Block<BlockDataType> const& oldBlock,
63 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
64
65 bool checkQuotientDistributions() const;
66 bool checkBlockStable(bisimulation::Block<BlockDataType> const& newBlock) const;
67 bool printDistributions(storm::storage::sparse::state_type state) const;
68 bool checkDistributionsDifferent(bisimulation::Block<BlockDataType> const& block, storm::storage::sparse::state_type end) const;
69
70 // A mapping from choice indices to the state that has this choice.
71 std::vector<storm::storage::sparse::state_type> choiceToStateMapping;
72
73 // A vector that holds the quotient distributions for all nondeterministic choices of all states.
74 std::vector<storm::storage::DistributionWithReward<ValueType>> quotientDistributions;
75
76 // A vector that stores for each state the ordered list of quotient distributions.
77 std::vector<storm::storage::DistributionWithReward<ValueType> const*> orderedQuotientDistributions;
78};
79} // namespace storage
80} // namespace storm
virtual void refinePartitionBasedOnSplitter(bisimulation::Block< BlockDataType > &splitter, std::vector< bisimulation::Block< BlockDataType > * > &splitterQueue) override
virtual void buildQuotient() override
Builds the quotient model based on the previously computed equivalence classes (stored in the blocks ...
NondeterministicModelBisimulationDecomposition(ModelType const &model, typename BisimulationDecomposition< ModelType, BlockDataType >::Options const &options)
Computes the bisimulation relation for the given model.
virtual std::pair< storm::storage::BitVector, storm::storage::BitVector > getStatesWithProbability01() override
Computes the set of states with probability 0/1 for satisfying phi until psi.
virtual void initialize() override
A function that can initialize auxiliary data structures.