|
|
@ -387,10 +387,6 @@ namespace storm { |
|
|
|
queues.checkRestrictionLater(restr); |
|
|
|
} |
|
|
|
state.setFailed(this->mId); |
|
|
|
// TODO can this be moved towards DFTSpare? |
|
|
|
if (this->isSpareGate()) { |
|
|
|
this->finalizeSpare(state); |
|
|
|
} |
|
|
|
this->childrenDontCare(state, queues); |
|
|
|
} |
|
|
|
|
|
|
@ -401,30 +397,13 @@ namespace storm { |
|
|
|
} |
|
|
|
} |
|
|
|
state.setFailsafe(this->mId); |
|
|
|
if (this->isSpareGate()) { |
|
|
|
this->finalizeSpare(state); |
|
|
|
} |
|
|
|
this->childrenDontCare(state, queues); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void childrenDontCare(DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const { |
|
|
|
queues.propagateDontCare(mChildren); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Finish failed/failsafe spare gate by activating the children and setting the useIndex to the maximum value. |
|
|
|
* This prevents multiple fail states with different usages or activations. |
|
|
|
* @param state The current state. |
|
|
|
*/ |
|
|
|
void finalizeSpare(DFTState<ValueType>& state) const { |
|
|
|
state.finalizeUses(this->mId); |
|
|
|
for (auto child : this->children()) { |
|
|
|
if (!state.isActive(child->id())) { |
|
|
|
state.activate(child->id()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
bool hasFailsafeChild(DFTState<ValueType>& state) const { |
|
|
|
for(auto const& child : mChildren) { |
|
|
|
if(state.isFailsafe(child->id())) |
|
|
@ -959,6 +938,24 @@ namespace storm { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
void fail(DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const { |
|
|
|
DFTGate<ValueType>::fail(state, queues); |
|
|
|
state.finalizeUses(this->mId); |
|
|
|
} |
|
|
|
|
|
|
|
void failsafe(DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const { |
|
|
|
DFTGate<ValueType>::failsafe(state, queues); |
|
|
|
state.finalizeUses(this->mId); |
|
|
|
} |
|
|
|
|
|
|
|
bool checkDontCareAnymore(storm::storage::DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const override { |
|
|
|
if (DFTGate<ValueType>::checkDontCareAnymore(state, queues)) { |
|
|
|
state.finalizeUses(this->mId); |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
void checkFails(storm::storage::DFTState<ValueType>& state, DFTStateSpaceGenerationQueues<ValueType>& queues) const override { |
|
|
|
if(state.isOperational(this->mId)) { |
|
|
|
size_t uses = state.uses(this->mId); |
|
|
@ -979,6 +976,7 @@ namespace storm { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
template<typename ValueType> |
|
|
|