16template<
typename ValueType>
31 std::shared_ptr<DFTElement<ValueType>>
clone()
const override {
40 return this->
isInclusive() ?
"PAND (incl)" :
"PAND (excl)";
54 bool childOperationalBefore =
false;
55 for (
auto const& child : this->
children()) {
57 childOperationalBefore =
true;
58 }
else if (childOperationalBefore && state.
hasFailed(child->id())) {
65 if (!childOperationalBefore) {
67 this->
fail(state, queues);
bool hasFailed(size_t id) const
bool isOperational(size_t id) const
bool hasFailsafeChild(storm::dft::storage::DFTState< ValueType > &state) const
Check whether it has a failsafe child.
DFTElementVector const & children() const
Get children.
Abstract base class for DFT elements.
virtual size_t id() const
Get id.
virtual std::string const & name() const
Get name.
Abstract base class for gates.
void failsafe(storm::dft::storage::DFTState< ValueType > &state, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &queues) const override
void childrenDontCare(storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &queues) const
Propagate Don't Care to children.
void fail(storm::dft::storage::DFTState< ValueType > &state, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &queues) const override
Priority AND (PAND) gate.
storm::dft::storage::elements::DFTElementType type() const override
Get type.
std::string typestring() const override
Get type as string.
DFTPand(size_t id, std::string const &name, bool inclusive, std::vector< std::shared_ptr< DFTElement< ValueType > > > const &children={})
Constructor.
void checkFails(storm::dft::storage::DFTState< ValueType > &state, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &queues) const override
Check failed status.
bool isInclusive() const
Return whether the PAND is inclusive.
void checkFailsafe(storm::dft::storage::DFTState< ValueType > &state, storm::dft::storage::DFTStateSpaceGenerationQueues< ValueType > &queues) const override
Check failsafe status.
std::shared_ptr< DFTElement< ValueType > > clone() const override
Create a shallow copy of the element.
#define STORM_LOG_ASSERT(cond, message)
DFTElementType
Element types in a DFT.