49 stream <<
"DFT has BE distributions which are neither exponential nor constant failed/failsafe.";
55 for (
auto module1 = spareModules.begin(); module1 != spareModules.end(); ++module1) {
56 auto const& module1Elements = module1->getElements();
57 if (!module1Elements.empty()) {
59 for (
auto module2 = std::next(module1); module2 != spareModules.end(); ++module2) {
61 auto const& module2Elements = module2->getElements();
62 std::vector<size_t> intersection;
63 std::set_intersection(module1Elements.begin(), module1Elements.end(), module2Elements.begin(), module2Elements.end(),
64 std::back_inserter(intersection));
65 if (!intersection.empty()) {
66 stream <<
"Spare modules of '" << dft.
getElement(module1->getRepresentative())->name() <<
"' and '"
67 << dft.
getElement(module2->getRepresentative())->name() <<
"' should not overlap.";
75 std::vector<size_t> primaryModuleIds;
77 primaryModuleIds.push_back(dft.
getGate(spareId)->children()[0]->id());
81 for (
size_t primaryModuleId : primaryModuleIds) {
86 auto beConst = std::static_pointer_cast<storm::dft::storage::elements::BEConst<ValueType>
const>(be);
87 if (beConst->canFail()) {
88 stream <<
"Spare module of '" << dft.
getElement(primaryModuleId)->name() <<
"' contains a constant failed BE '" << beConst->name()
98 for (
auto module1It = primaryModuleIds.begin(); module1It != primaryModuleIds.end(); ++module1It) {
99 for (
auto module2It = std::next(module1It); module2It != primaryModuleIds.end(); ++module2It) {
100 if (*module1It == *module2It) {
101 stream <<
"Module of '" << dft.
getElement(*module1It)->name() <<
"' is shared primary module of multiple SPAREs.";
112 stream <<
"DFT has more than one constant failed BE.";
118 stream <<
"DFT has dependency with more than one dependent event.";
127 bool potentialIssues =
false;
132 if (spareModule.getElements().empty()) {
133 stream <<
"Elements of spare module '" << dft.
getElement(spareModule.getRepresentative())->name()
134 <<
"' also contained in top module. All elements of this spare module will be activated from the beginning on.";
135 potentialIssues =
true;
142 auto spare = dft.
getGate(spareId);
143 for (
auto const& child : spare->children()) {
144 auto module = dft.module(child->id());
145 auto const& moduleElements =
module.getElements();
146 if (std::find(moduleElements.begin(), moduleElements.end(), spare->id()) != moduleElements.end()) {
147 stream <<
"Spare module '" << dft.
getElement(module.getRepresentative())->name() <<
"' also contains the parent SPARE-gate '" << spare->name()
148 <<
"'. This can prevent proper activation of the spare module. Consider introducing dependencies to properly separate the spare module "
149 <<
"from the SPARE-gate.";
150 potentialIssues =
true;
155 return potentialIssues;