Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
WeakBisimulationData.cpp
Go to the documentation of this file.
2
3#include <utility>
4
6
7namespace storm::bisimulation {
8
12 STORM_LOG_ASSERT(this->divergentStates.size() == this->stepSensitiveStates.size() && this->divergentStates.size() == this->silentStates.size(),
13 "Weak bisimulation data has inconsistent sizes.");
14 STORM_LOG_ASSERT(this->divergentStates.isSubsetOf(this->silentStates), "A divergent state cannot leave its block and thus has to be silent.");
15}
16
18 STORM_LOG_ASSERT(!block.empty(), "Tried to inspect an empty block.");
19 return divergentStates.get(block.front());
20}
21
23 STORM_LOG_ASSERT(!block.empty(), "Tried to inspect an empty block.");
24 return stepSensitiveStates.get(block.front());
25}
26
28 bool result = true;
29 partition.forEachBlock([this, &result](Partition::Block const& block) {
30 bool const divergent = isDivergent(block);
31 bool const stepSensitive = isStepSensitive(block);
32 for (uint64_t const state : block) {
33 result = result && divergentStates.get(state) == divergent && stepSensitiveStates.get(state) == stepSensitive;
34 }
35 });
36 return result;
37}
38
39} // namespace storm::bisimulation
Represents a partition of a set of consecutive indices.
Definition Partition.h:20
void forEachBlock(Func const &f) const
Applies the given function on each block in the partition.
Definition Partition.h:184
std::span< ElementIndex const > Block
A contiguous range of elements that form a (possibly proper super-) block of the partition.
Definition Partition.h:27
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
bool isSubsetOf(BitVector const &other) const
Checks whether all bits that are set in the current bit vector are also set in the given bit vector.
size_t size() const
Retrieves the number of bits this bit vector can store.
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:9
WeakBisimulationData(storm::storage::BitVector divergentStates, storm::storage::BitVector stepSensitiveStates, storm::storage::BitVector silentStates)
bool isDivergent(Partition::Block const &block) const
bool isStepSensitive(Partition::Block const &block) const
storm::storage::BitVector const stepSensitiveStates
The states for which the number of steps taken within their own block is observable,...
storm::storage::BitVector silentStates
The states that cannot leave their block in a single step.
storm::storage::BitVector const divergentStates
The states from which no state outside of their own block can be reached.
bool checkBlockHomogeneity(Partition const &partition) const
Checks that every block of the given partition is homogeneous with respect to divergentStates and ste...