26 using DFTElementPointer = std::shared_ptr<storm::dft::storage::elements::DFTElement<ValueType>>;
27 using DFTElementCPointer = std::shared_ptr<storm::dft::storage::elements::DFTElement<ValueType>
const>;
28 using DFTElementVector = std::vector<DFTElementPointer>;
29 using DFTBEPointer = std::shared_ptr<storm::dft::storage::elements::DFTBE<ValueType>>;
30 using DFTChildrenCPointer = std::shared_ptr<storm::dft::storage::elements::DFTChildren<ValueType>
const>;
31 using DFTGatePointer = std::shared_ptr<storm::dft::storage::elements::DFTGate<ValueType>>;
32 using DFTDependencyPointer = std::shared_ptr<storm::dft::storage::elements::DFTDependency<ValueType>>;
33 using DFTRestrictionPointer = std::shared_ptr<storm::dft::storage::elements::DFTRestriction<ValueType>>;
37 std::string mTopLevelName;
38 std::unordered_map<std::string, DFTElementPointer> mElements;
39 std::unordered_map<DFTElementPointer, std::vector<std::string>> mChildNames;
40 std::unordered_map<DFTRestrictionPointer, std::vector<std::string>> mRestrictionChildNames;
41 std::unordered_map<DFTDependencyPointer, std::vector<std::string>> mDependencyChildNames;
42 std::unordered_map<std::string, storm::dft::storage::DFTLayoutInfo> mLayoutInfo;
83 void addBasicElementErlang(std::string
const& name, ValueType rate,
unsigned phases, ValueType dormancyFactor);
106 void addBasicElementSamples(std::string
const& name, std::map<ValueType, ValueType>
const& activeSamples);
113 void addAndGate(std::string
const& name, std::vector<std::string>
const& children);
120 void addOrGate(std::string
const& name, std::vector<std::string>
const& children);
128 void addVotingGate(std::string
const& name,
unsigned threshold, std::vector<std::string>
const& children);
136 void addPandGate(std::string
const& name, std::vector<std::string>
const& children,
bool inclusive =
true);
144 void addPorGate(std::string
const& name, std::vector<std::string>
const& children,
bool inclusive =
true);
151 void addSpareGate(std::string
const& name, std::vector<std::string>
const& children);
158 void addSequenceEnforcer(std::string
const& name, std::vector<std::string>
const& children);
165 void addMutex(std::string
const& name, std::vector<std::string>
const& children);
173 void addPdep(std::string
const& name, std::vector<std::string>
const& children, ValueType probability);
187 void addLayoutInfo(std::string
const& name,
double x,
double y);
216 void addElement(DFTElementPointer element);
223 void addGate(DFTGatePointer gate, std::vector<std::string>
const& children);
230 void addDependency(DFTDependencyPointer dependency, std::vector<std::string>
const& children);
237 void addRestriction(DFTRestrictionPointer restriction, std::vector<std::string>
const& children);
244 bool nameInUse(std::string
const& name)
const;
251 bool isValidProbability(ValueType value)
const;
259 enum class topoSortColour { WHITE, BLACK, GREY };
267 void topologicalVisit(DFTElementPointer
const& element,
269 DFTElementVector& visitedElements);
275 DFTElementVector sortTopological();
284 size_t computeRank(DFTElementPointer
const& elem);