Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DeterministicBlockData.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace storm {
6namespace storage {
7namespace bisimulation {
9 public:
11 DeterministicBlockData(uint_fast64_t marker1, uint_fast64_t marker2);
12
13 uint_fast64_t marker1() const;
14 void setMarker1(uint_fast64_t newMarker1);
15 void incrementMarker1();
16 void decrementMarker1();
17
18 uint_fast64_t marker2() const;
19 void setMarker2(uint_fast64_t newMarker2);
20 void incrementMarker2();
21 void decrementMarker2();
22
30
31 // Checks whether the block is marked as a splitter.
32 bool splitter() const;
33
34 // Marks the block as being a splitter.
35 void setSplitter(bool value = true);
36
37 // Retrieves whether the block is marked as a predecessor.
38 bool needsRefinement() const;
39
40 // Marks the block as needing refinement (or not).
41 void setNeedsRefinement(bool value = true);
42
43 // Sets whether the block is to be interpreted as absorbing.
44 void setAbsorbing(bool absorbing);
45
46 // Retrieves whether the block is to be interpreted as absorbing.
47 bool absorbing() const;
48
49 // Sets whether the states in the block have rewards.
50 void setHasRewards(bool value = true);
51
52 // Retrieves whether the states in the block have rewards.
53 bool hasRewards() const;
54
55 // Sets the representative state of this block
57
58 // Retrieves whether this block has a representative state.
59 bool hasRepresentativeState() const;
60
61 // Retrieves the representative state for this block.
63
64 friend std::ostream& operator<<(std::ostream& out, DeterministicBlockData const& data);
65
66 public:
67 // Helpers to set/retrieve flags.
68 bool getFlag(uint64_t flag) const;
69 void setFlag(uint64_t flag, bool value);
70
71 // Two markers that can be used for various purposes. Whenever the block is split, both the markers are
72 // set to the beginning index of the block.
73 uint_fast64_t valMarker1;
74 uint_fast64_t valMarker2;
75
76 // Some bits to store flags: splitter flag, refinement flag, absorbing flag.
77 static constexpr uint64_t SPLITTER_FLAG = 1ull;
78 static constexpr uint64_t REFINEMENT_FLAG = 1ull << 1;
79 static constexpr uint64_t ABSORBING_FLAG = 1ull << 2;
80 static constexpr uint64_t REWARD_FLAG = 1ull << 3;
81 uint8_t flags;
82
83 // An optional representative state for the block. If this is set, this state is used to derive the
84 // atomic propositions of the meta state in the quotient model.
85 std::optional<storm::storage::sparse::state_type> valRepresentativeState;
86};
87
88std::ostream& operator<<(std::ostream& out, DeterministicBlockData const& data);
89} // namespace bisimulation
90} // namespace storage
91} // namespace storm
storm::storage::sparse::state_type representativeState() const
bool resetMarkers(Block< DeterministicBlockData > const &block)
This method needs to be called whenever the block was modified to reset the data of the change.
void setRepresentativeState(storm::storage::sparse::state_type representativeState)
friend std::ostream & operator<<(std::ostream &out, DeterministicBlockData const &data)
std::optional< storm::storage::sparse::state_type > valRepresentativeState