Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
InternalCuddSignatureRefiner.h
Go to the documentation of this file.
1#pragma once
2
3#include "storm-config.h"
4
5#pragma GCC diagnostic push
6#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
7#include <parallel_hashmap/phmap.h>
8#pragma GCC diagnostic pop
9#include <boost/optional.hpp>
10#include <set>
11
15
16namespace storm {
17namespace dd {
18
19template<storm::dd::DdType DdType>
20class DdManager;
21
22template<storm::dd::DdType DdType, typename ValueType>
23class Add;
24
25namespace bisimulation {
26
27template<storm::dd::DdType DdType, typename ValueType>
28class Partition;
29
30template<storm::dd::DdType DdType, typename ValueType>
31class Signature;
32
33template<typename ValueType>
35 public:
37 std::set<storm::expressions::Variable> const& stateVariables,
38 storm::dd::Bdd<storm::dd::DdType::CUDD> const& nondeterminismVariables,
39 storm::dd::Bdd<storm::dd::DdType::CUDD> const& nonBlockVariables,
41
44
45 private:
46#ifdef STORM_HAVE_CUDD
47 void clearCaches();
48
49 std::pair<storm::dd::Add<storm::dd::DdType::CUDD, ValueType>, boost::optional<storm::dd::Add<storm::dd::DdType::CUDD, ValueType>>> refine(
51
52 DdNodePtr encodeBlock(uint64_t blockIndex);
53
54 std::pair<DdNodePtr, DdNodePtr> reuseOrRelabel(DdNode* partitionNode, DdNode* nondeterminismVariablesNode, DdNode* nonBlockVariablesNode);
55
56 std::pair<DdNodePtr, DdNodePtr> refine(DdNode* partitionNode, DdNode* signatureNode, DdNode* nondeterminismVariablesNode, DdNode* nonBlockVariablesNode);
57
59 ::DdManager* ddman;
60 storm::expressions::Variable blockVariable;
61 std::set<storm::expressions::Variable> stateVariables;
62
63 // The cubes representing all non-block and all nondeterminism variables, respectively.
64 storm::dd::Bdd<storm::dd::DdType::CUDD> nondeterminismVariables;
66
67 // The provided options.
69
70 // The indices of the DD variables associated with the block variable.
71 std::vector<uint64_t> blockDdVariableIndices;
72
73 // A vector used for encoding block indices.
74 std::vector<int> blockEncoding;
75
76 // The current number of blocks of the new partition.
77 uint64_t nextFreeBlockIndex;
78
79 // The number of completed refinements.
80 uint64_t numberOfRefinements;
81
82 // The cache used to identify states with identical signature.
83 phmap::flat_hash_map<std::pair<DdNode const*, DdNode const*>, std::pair<DdNodePtr, DdNodePtr>, CuddPointerPairHash> signatureCache;
84
85 // The cache used to identify which old block numbers have already been reused.
86 phmap::flat_hash_map<DdNode const*, ReuseWrapper> reuseBlocksCache;
87#endif
88};
89
90} // namespace bisimulation
91} // namespace dd
92} // namespace storm