Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DeterministicModelBisimulationDecomposition.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_BISIMULATION_DETERMINISTICMODELBISIMULATIONDECOMPOSITION_H_
2#define STORM_STORAGE_BISIMULATION_DETERMINISTICMODELBISIMULATIONDECOMPOSITION_H_
3
6
7namespace storm {
8namespace storage {
9
13template<typename ModelType>
14class DeterministicModelBisimulationDecomposition : 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 initializeMeasureDrivenPartition() override;
34
35 virtual void initializeLabelBasedPartition() override;
36
37 virtual void buildQuotient() override;
38
40 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue) override;
41
42 private:
43 // Post-processes the initial partition to properly initialize it.
44 void postProcessInitialPartition();
45
46 // Refines the given block wrt to strong bisimulation.
47 void refinePredecessorBlockOfSplitterStrong(bisimulation::Block<BlockDataType>& block, std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
48
49 // Refines the predecessor blocks wrt. strong bisimulation.
50 void refinePredecessorBlocksOfSplitterStrong(std::list<bisimulation::Block<BlockDataType>*> const& predecessorBlocks,
51 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
52
56 void initializeWeakDtmcBisimulation();
57
62 void splitOffDivergentStates();
63
67 void initializeSilentProbabilities();
68
69 // Retrieves the probability of going into the splitter for the given state.
70 ValueType const& getProbabilityToSplitter(storm::storage::sparse::state_type const& state) const;
71
72 // Retrieves the silent probability for the given state.
73 ValueType getSilentProbability(storm::storage::sparse::state_type const& state) const;
74
75 // Retrieves whether the given state is silent.
76 bool isSilent(storm::storage::sparse::state_type const& state) const;
77
78 // Retrieves whether the given state has a non-zero silent probability.
79 bool hasNonZeroSilentProbability(storm::storage::sparse::state_type const& state) const;
80
81 // Retrieves whether the given predecessor of the splitters possibly needs refinement.
82 bool possiblyNeedsRefinement(bisimulation::Block<BlockDataType> const& predecessorBlock) const;
83
84 // Moves the given state to the position marked by marker1 moves the marker one step further.
85 void moveStateToMarker1(storm::storage::sparse::state_type predecessor, bisimulation::Block<BlockDataType>& predecessorBlock);
86
87 // Moves the given state to the position marked by marker2 the marker one step further.
88 void moveStateToMarker2(storm::storage::sparse::state_type predecessor, bisimulation::Block<BlockDataType>& predecessorBlock);
89
90 // Moves the given state to a proper place in the splitter, depending on where the predecessor is located.
91 void moveStateInSplitter(storm::storage::sparse::state_type predecessor, bisimulation::Block<BlockDataType>& predecessorBlock,
92 storm::storage::sparse::state_type currentPositionInSplitter, uint_fast64_t& elementsToSkip);
93
94 // Increases the probability of moving to the current splitter for the given state.
95 void increaseProbabilityToSplitter(storm::storage::sparse::state_type predecessor, bisimulation::Block<BlockDataType> const& predecessorBlock,
96 ValueType const& value);
97
98 // Explores the remaining states of the splitter.
99 void exploreRemainingStatesOfSplitter(bisimulation::Block<BlockDataType>& splitter, std::list<bisimulation::Block<BlockDataType>*>& predecessorBlocks);
100
101 // Updates the silent probabilities of the states in the block based on the probabilities of going to the splitter.
102 void updateSilentProbabilitiesBasedOnProbabilitiesToSplitter(bisimulation::Block<BlockDataType>& block);
103
104 // Updates the silent probabilities of the states in the block based on a forward exploration of the transitions
105 // of the states.
106 void updateSilentProbabilitiesBasedOnTransitions(bisimulation::Block<BlockDataType>& block);
107
108 // Refines the given block wrt to weak bisimulation in DTMCs.
109 void refinePredecessorBlockOfSplitterWeak(bisimulation::Block<BlockDataType>& block, std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
110
111 // Refines the predecessor blocks of the splitter wrt. weak bisimulation in DTMCs.
112 void refinePredecessorBlocksOfSplitterWeak(bisimulation::Block<BlockDataType>& splitter,
113 std::list<bisimulation::Block<BlockDataType>*> const& predecessorBlocks,
114 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
115
116 // Converts the one-step probabilities of going into the splitter into the conditional probabilities needed
117 // for weak bisimulation (on DTMCs).
118 void computeConditionalProbabilitiesForNonSilentStates(bisimulation::Block<BlockDataType>& block);
119
120 // Computes the (indices of the) blocks of non-silent states within the block.
121 std::vector<uint_fast64_t> computeNonSilentBlocks(bisimulation::Block<BlockDataType>& block);
122
123 // Computes a labeling for all states of the block that identifies in which block they need to end up.
124 std::vector<storm::storage::BitVector> computeWeakStateLabelingBasedOnNonSilentBlocks(bisimulation::Block<BlockDataType> const& block,
125 std::vector<uint_fast64_t> const& nonSilentBlockIndices);
126
127 // Inserts the block into the list of predecessors if it is not already contained.
128 void insertIntoPredecessorList(bisimulation::Block<BlockDataType>& predecessorBlock, std::list<bisimulation::Block<BlockDataType>*>& predecessorBlocks);
129
130 // A vector that holds the probabilities of states going into the splitter. This is used by the method that
131 // refines a block based on probabilities.
132 std::vector<ValueType> probabilitiesToCurrentSplitter;
133
134 // A vector mapping each state to its silent probability.
135 std::vector<ValueType> silentProbabilities;
136};
137} // namespace storage
138} // namespace storm
139
140#endif /* STORM_STORAGE_BISIMULATION_DETERMINISTICMODELBISIMULATIONDECOMPOSITION_H_ */
This class is the superclass of all decompositions of a sparse model into its bisimulation quotient.
This class represents the decomposition of a deterministic model into its bisimulation quotient.
virtual void refinePartitionBasedOnSplitter(bisimulation::Block< BlockDataType > &splitter, std::vector< bisimulation::Block< BlockDataType > * > &splitterQueue) override
virtual void initializeLabelBasedPartition() override
Initializes the initial partition based on all respected labels.
virtual void initializeMeasureDrivenPartition() override
Creates the measure-driven initial partition for reaching psi states from phi states.
virtual void buildQuotient() override
Builds the quotient model based on the previously computed equivalence classes (stored in the blocks ...
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.
LabParser.cpp.
Definition cli.cpp:18