#ifndef DFTSTATESPACEGENERATIONQUEUES_H #define DFTSTATESPACEGENERATIONQUEUES_H #include #include #include #include #include "OrderDFTElementsById.h" namespace storm { namespace storage { template class DFTGate; template class DFTElement; template class DFTRestriction; template class DFTStateSpaceGenerationQueues { using DFTElementPointer = std::shared_ptr>; using DFTElementVector = std::vector; using DFTGatePointer = std::shared_ptr>; using DFTGateVector = std::vector; using DFTRestrictionPointer = std::shared_ptr>; using DFTRestrictionVector = std::vector; std::priority_queue> failurePropagation; DFTGateVector failsafePropagation; DFTElementVector dontcarePropagation; DFTElementVector activatePropagation; DFTRestrictionVector restrictionChecks; public: void propagateFailure(DFTGatePointer const& elem) { failurePropagation.push(elem); } bool failurePropagationDone() const { return failurePropagation.empty(); } DFTGatePointer nextFailurePropagation() { DFTGatePointer next = failurePropagation.top(); failurePropagation.pop(); return next; } bool restrictionChecksDone() const { return restrictionChecks.empty(); } DFTRestrictionPointer nextRestrictionCheck() { STORM_LOG_ASSERT(!restrictionChecksDone(), "All restriction checks done already."); DFTRestrictionPointer next = restrictionChecks.back(); restrictionChecks.pop_back(); return next; } void checkRestrictionLater(DFTRestrictionPointer const& restr) { restrictionChecks.push_back(restr); } bool failsafePropagationDone() const { return failsafePropagation.empty(); } void propagateFailsafe(DFTGatePointer const& gate) { failsafePropagation.push_back(gate); } DFTGatePointer nextFailsafePropagation() { DFTGatePointer next = failsafePropagation.back(); failsafePropagation.pop_back(); return next; } bool dontCarePropagationDone() const { return dontcarePropagation.empty(); } void propagateDontCare(DFTElementPointer const& elem) { dontcarePropagation.push_back(elem); } void propagateDontCare(DFTElementVector const& elems) { dontcarePropagation.insert(dontcarePropagation.end(), elems.begin(), elems.end()); } DFTElementPointer nextDontCarePropagation() { DFTElementPointer next = dontcarePropagation.back(); dontcarePropagation.pop_back(); return next; } }; } } #endif /* DFTSTATESPACEGENERATIONQUEUES_H */