Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DftModularizer.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm::dft {
7namespace utility {
8
16template<typename ValueType>
18 public:
19 using DFTElementCPointer = std::shared_ptr<storm::dft::storage::elements::DFTElement<ValueType> const>;
20 using ElementId = size_t;
21
25 DftModularizer() = default;
26
33
34 private:
40 void populateDfsCounters(DFTElementCPointer const element);
41
47 void obtainModules(DFTElementCPointer const element);
48
54 static std::vector<DFTElementCPointer> getChildren(DFTElementCPointer const element);
55
61 static std::vector<DFTElementCPointer> getAffectingElements(DFTElementCPointer const element);
62
69 static bool containsElement(std::vector<DFTElementCPointer> const& list, DFTElementCPointer const element);
70
75 struct DfsCounter {
76 uint64_t firstVisit{0};
77 uint64_t secondVisit{0};
78 uint64_t lastVisit{0};
79
80 uint64_t minFirstVisit{0};
81 uint64_t maxLastVisit{0};
82 };
83 struct ModularizationInfo {
84 bool isModule = false;
85 std::set<ElementId> elements;
86 std::set<storm::dft::storage::DftIndependentModule> submodules;
87 bool isStatic = true;
88 bool fullyStatic = true;
89 };
90
91 std::map<ElementId, DfsCounter> dfsCounters{};
92 std::map<ElementId, ModularizationInfo> modInfos{};
93 uint64_t lastDate{};
94};
95
96} // namespace utility
97} // namespace storm::dft
Represents a Dynamic Fault Tree.
Definition DFT.h:52
Represents an independent module/subtree.
Definition DftModule.h:66
Find modules (independent subtrees) in DFT.
std::shared_ptr< storm::dft::storage::elements::DFTElement< ValueType > const > DFTElementCPointer
storm::dft::storage::DftIndependentModule computeModules(storm::dft::storage::DFT< ValueType > const &dft)
Compute modules of DFT by applying the LTA/DR algorithm.
DftModularizer()=default
Constructor.