Browse Source

Fixed bug where children of SEQ gates were not properly enabled

main
Matthias Volk 6 years ago
parent
commit
32dc2dbcc0
  1. 7
      src/storm-dft/storage/dft/DFTState.cpp

7
src/storm-dft/storage/dft/DFTState.cpp

@ -259,16 +259,16 @@ namespace storm {
STORM_LOG_ASSERT(restriction->containsChild(id), "Ids do not match."); STORM_LOG_ASSERT(restriction->containsChild(id), "Ids do not match.");
if (restriction->isSeqEnforcer()) { if (restriction->isSeqEnforcer()) {
for (auto it = restriction->children().cbegin(); it != restriction->children().cend(); ++it) { for (auto it = restriction->children().cbegin(); it != restriction->children().cend(); ++it) {
if ((*it)->isBasicElement()) {
if ((*it)->id() != id) { if ((*it)->id() != id) {
if (!hasFailed((*it)->id())) { if (!hasFailed((*it)->id())) {
// Failure should be prevented later on // Failure should be prevented later on
STORM_LOG_TRACE("Child " << (*it)->id() << " should have failed.");
STORM_LOG_TRACE("Child " << (*it)->name() << " should have failed.");
break;
} }
} else { } else {
// Current event has failed // Current event has failed
++it; ++it;
if (it != restriction->children().cend()) {
if (it != restriction->children().cend() && (*it)->isBasicElement()) {
// Enable next event // Enable next event
failableElements.addBE((*it)->id()); failableElements.addBE((*it)->id());
STORM_LOG_TRACE("Added possible BE failure: " << *(*it)); STORM_LOG_TRACE("Added possible BE failure: " << *(*it));
@ -277,7 +277,6 @@ namespace storm {
break; break;
} }
} }
}
} else if (restriction->isMutex()) { } else if (restriction->isMutex()) {
// Current element has failed and disables all other children // Current element has failed and disables all other children
for (auto const& child : restriction->children()) { for (auto const& child : restriction->children()) {

Loading…
Cancel
Save