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