← Documentation
ADS-IDAC Engine 5.0.0
fta_parser.hpp
Go to the documentation of this file.
1#pragma once
11//
12// Reader for GeNIe/SMILE `.fta` fault tree files.
13//
14// The type codes and the identity/dedup rule are taken from the legacy
15// resolver (src/HCL/hcl/HCLFTResolver.cpp, function parse):
16//
17// type 0 -> AND gate
18// type 1 -> OR gate
19// type 2 -> basic event, quantified by the failureProbability attribute
20// type 3 -> basic event (same handling)
21// type 4 -> transfer gate: an AND over the single referenced diagram
22// type 6 -> K/N gate, threshold from the k attribute
23// type 7 -> NOT gate
24//
25// A `<ftaNode>` whose `<node name=...>` has already been defined is *not*
26// redefined; the existing definition is shared. Basic events linked to a BBN
27// variable (`<linkedBBN>`) are rejected: that path belonged to the HCL hybrid
28// model and has no equivalent here yet.
29//
31#include <string>
32
33namespace faulttree {
34
73FaultTree parseFtaString(const std::string &text);
74
83FaultTree parseFtaFile(const std::string &path);
84
85} // namespace faulttree
Fault tree model of the faulttree library: FaultTreeError, GateType, Node, and the FaultTree containe...
FaultTree parseFtaFile(const std::string &path)
Parses a .fta file from disk.
Definition: fta_parser.cpp:162
FaultTree parseFtaString(const std::string &text)
Parses .fta content held in memory.
Definition: fta_parser.cpp:158