Storm 1.11.1.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
30
31 protected:
32 virtual std::pair<storm::storage::BitVector, storm::storage::BitVector> getStatesWithProbability01() override;
33
34 virtual void buildQuotient() override;
35
37 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue) override;
38
39 virtual void initialize() override;
40
41 private:
42 // Creates the mapping from the choice indices to the states.
43 void createChoiceToStateMapping();
44
45 // Initializes the quotient distributions wrt. to the current partition.
46 void initializeQuotientDistributions();
47
48 // Retrieves whether the given block possibly needs refinement.
49 bool possiblyNeedsRefinement(bisimulation::Block<BlockDataType> const& block) const;
50
51 // Splits the given block according to the current quotient distributions.
52 bool splitBlockAccordingToCurrentQuotientDistributions(bisimulation::Block<BlockDataType>& block,
53 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
54
55 // Retrieves whether the quotient distributions of state 1 are considered to be less than the ones of state 2.
56 bool quotientDistributionsLess(storm::storage::sparse::state_type state1, storm::storage::sparse::state_type state2) const;
57
58 // Updates the ordered list of quotient distribution for the given state.
59 void updateOrderedQuotientDistributions(storm::storage::sparse::state_type state);
60
61 // Updates the quotient distributions of the predecessors of the new block by taking the probability mass
62 // away from the old block.
63 void updateQuotientDistributionsOfPredecessors(bisimulation::Block<BlockDataType> const& newBlock, bisimulation::Block<BlockDataType> const& oldBlock,
64 std::vector<bisimulation::Block<BlockDataType>*>& splitterQueue);
65
66 bool checkQuotientDistributions() const;
67 bool checkBlockStable(bisimulation::Block<BlockDataType> const& newBlock) const;
68 bool printDistributions(storm::storage::sparse::state_type state) const;
69 bool checkDistributionsDifferent(bisimulation::Block<BlockDataType> const& block, storm::storage::sparse::state_type end) const;
70
71 // A mapping from choice indices to the state that has this choice.
72 std::vector<storm::storage::sparse::state_type> choiceToStateMapping;
73
74 // A vector that holds the quotient distributions for all nondeterministic choices of all states.
75 std::vector<storm::storage::DistributionWithReward<ValueType>> quotientDistributions;
76
77 // A vector that stores for each state the ordered list of quotient distributions.
78 std::vector<storm::storage::DistributionWithReward<ValueType> const*> orderedQuotientDistributions;
79};
80} // namespace storage
81} // namespace storm
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.