Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
NondeterministicModelBisimulationDecomposition.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_BISIMULATION_NONDETERMINISTICMODELBISIMULATIONDECOMPOSITION_H_
2#define STORM_STORAGE_BISIMULATION_NONDETERMINISTICMODELBISIMULATIONDECOMPOSITION_H_
3
6
8
9namespace storm {
10namespace storage {
11
15template<typename ModelType>
16class NondeterministicModelBisimulationDecomposition : public BisimulationDecomposition<ModelType, bisimulation::DeterministicBlockData> {
17 public:
19 typedef typename ModelType::ValueType ValueType;
20 typedef typename ModelType::RewardModelType RewardModelType;
21
32
33 protected:
34 virtual std::pair<storm::storage::BitVector, storm::storage::BitVector> getStatesWithProbability01() override;
35
36 virtual void buildQuotient() override;
37
39 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue) override;
40
41 virtual void initialize() override;
42
43 private:
44 // Creates the mapping from the choice indices to the states.
45 void createChoiceToStateMapping();
46
47 // Initializes the quotient distributions wrt. to the current partition.
48 void initializeQuotientDistributions();
49
50 // Retrieves whether the given block possibly needs refinement.
51 bool possiblyNeedsRefinement(bisimulation::Block<BlockDataType> const& block) const;
52
53 // Splits the given block according to the current quotient distributions.
54 bool splitBlockAccordingToCurrentQuotientDistributions(bisimulation::Block<BlockDataType>& block,
55 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
56
57 // Retrieves whether the quotient distributions of state 1 are considered to be less than the ones of state 2.
58 bool quotientDistributionsLess(storm::storage::sparse::state_type state1, storm::storage::sparse::state_type state2) const;
59
60 // Updates the ordered list of quotient distribution for the given state.
61 void updateOrderedQuotientDistributions(storm::storage::sparse::state_type state);
62
63 // Updates the quotient distributions of the predecessors of the new block by taking the probability mass
64 // away from the old block.
65 void updateQuotientDistributionsOfPredecessors(bisimulation::Block<BlockDataType> const& newBlock, bisimulation::Block<BlockDataType> const& oldBlock,
66 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
67
68 bool checkQuotientDistributions() const;
69 bool checkBlockStable(bisimulation::Block<BlockDataType> const& newBlock) const;
70 bool printDistributions(storm::storage::sparse::state_type state) const;
71 bool checkDistributionsDifferent(bisimulation::Block<BlockDataType> const& block, storm::storage::sparse::state_type end) const;
72
73 // A mapping from choice indices to the state state that has this choice.
74 std::vector<storm::storage::sparse::state_type> choiceToStateMapping;
75
76 // A vector that holds the quotient distributions for all nondeterministic choices of all states.
77 std::vector<storm::storage::DistributionWithReward<ValueType>> quotientDistributions;
78
79 // A vector that stores for each state the ordered list of quotient distributions.
80 std::vector<storm::storage::DistributionWithReward<ValueType> const*> orderedQuotientDistributions;
81};
82} // namespace storage
83} // namespace storm
84
85#endif /* STORM_STORAGE_BISIMULATION_NONDETERMINISTICMODELBISIMULATIONDECOMPOSITION_H_ */
This class is the superclass of all decompositions of a sparse model into its bisimulation quotient.
iterator end()
Retrieves an iterator that points past the last block of this decomposition.
This class represents the decomposition of a nondeterministic model into its bisimulation quotient.
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 ...
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.
LabParser.cpp.
Definition cli.cpp:18