20 using DFTElementPointer = std::shared_ptr<storm::dft::storage::elements::DFTElement<ValueType>>;
21 using DFTElementCPointer = std::shared_ptr<storm::dft::storage::elements::DFTElement<ValueType>
const>;
22 using DFTElementVector = std::vector<DFTElementPointer>;
23 using DFTBEPointer = std::shared_ptr<storm::dft::storage::elements::DFTBE<ValueType>>;
24 using DFTChildrenCPointer = std::shared_ptr<storm::dft::storage::elements::DFTChildren<ValueType>
const>;
25 using DFTGatePointer = std::shared_ptr<storm::dft::storage::elements::DFTGate<ValueType>>;
26 using DFTDependencyPointer = std::shared_ptr<storm::dft::storage::elements::DFTDependency<ValueType>>;
27 using DFTRestrictionPointer = std::shared_ptr<storm::dft::storage::elements::DFTRestriction<ValueType>>;
31 std::string mTopLevelName;
32 std::unordered_map<std::string, DFTElementPointer> mElements;
33 std::unordered_map<DFTElementPointer, std::vector<std::string>> mChildNames;
34 std::unordered_map<DFTRestrictionPointer, std::vector<std::string>> mRestrictionChildNames;
35 std::unordered_map<DFTDependencyPointer, std::vector<std::string>> mDependencyChildNames;
36 std::unordered_map<std::string, storm::dft::storage::DFTLayoutInfo> mLayoutInfo;
76 void addBasicElementErlang(std::string
const& name, ValueType rate,
unsigned phases, ValueType dormancyFactor);
106 void addAndGate(std::string
const& name, std::vector<std::string>
const& children);
113 void addOrGate(std::string
const& name, std::vector<std::string>
const& children);
121 void addVotingGate(std::string
const& name,
unsigned threshold, std::vector<std::string>
const& children);
129 void addPandGate(std::string
const& name, std::vector<std::string>
const& children,
bool inclusive =
true);
137 void addPorGate(std::string
const& name, std::vector<std::string>
const& children,
bool inclusive =
true);
144 void addSpareGate(std::string
const& name, std::vector<std::string>
const& children);
151 void addSequenceEnforcer(std::string
const& name, std::vector<std::string>
const& children);
158 void addMutex(std::string
const& name, std::vector<std::string>
const& children);
166 void addPdep(std::string
const& name, std::vector<std::string>
const& children, ValueType probability);
180 void addLayoutInfo(std::string
const& name,
double x,
double y);
209 void addElement(DFTElementPointer element);
216 void addGate(DFTGatePointer gate, std::vector<std::string>
const& children);
223 void addDependency(DFTDependencyPointer dependency, std::vector<std::string>
const& children);
230 void addRestriction(DFTRestrictionPointer restriction, std::vector<std::string>
const& children);
237 bool nameInUse(std::string
const& name)
const;
244 bool isValidProbability(ValueType value)
const;
252 enum class topoSortColour { WHITE, BLACK, GREY };
260 void topologicalVisit(DFTElementPointer
const& element,
262 DFTElementVector& visitedElements);
268 DFTElementVector sortTopological();
277 size_t computeRank(DFTElementPointer
const& elem);