28 std::cout <<
"################################\n";
29 std::cout <<
"# modular language-diagnosability (system 1/2)\n";
30 std::cout <<
"# a) read data \n";
33 g1 =
new System(
"data/diag_system_3_modular1.gen");
34 g2 =
new System(
"data/diag_system_3_modular2.gen");
35 k1 =
new System(
"data/diag_specification_3_modular1.gen");
36 k2 =
new System(
"data/diag_specification_3_modular2.gen");
39 g1->
Write(
"tmp_diag_system_3_modular1.gen");
40 g2->
Write(
"tmp_diag_system_3_modular2.gen");
41 k1->
Write(
"tmp_diag_specification_3_modular1.gen");
42 k2->
Write(
"tmp_diag_specification_3_modular2.gen");
46 abstAlph.
Read(
"data/diag_abstrAlph_3_modular12.alph");
50 g1Abst.
Write(
"tmp_diag_system_3_modular1_hat.gen");
51 g2Abst.
Write(
"tmp_diag_system_3_modular2_hat.gen");
63 std::cout <<
"# b) run modular diagnosability test (expect result PASS)\n";
68 std::cout <<
"The overall system G is modularly diagnosable with respect to overall specification K." << std::endl;
69 std::cout << report << std::endl;
71 std::cout <<
"The overall system G is not modularly diagnosable with respect to overall specification K." << std::endl;
72 std::cout << report << std::endl;
85 std::cout <<
"# c) compute modular diagnoser\n";
91 diag.
At(0).
Write(
"tmp_diag_diagnoser_3_modular1.gen");
92 diag.
At(1).
Write(
"tmp_diag_diagnoser_3_modular2.gen");
98 std::cout <<
"# done \n";
99 std::cout <<
"################################\n";
114 std::cout <<
"################################\n";
115 std::cout <<
"# modular diagnosability (system 3/4)\n";
116 std::cout <<
"# a) read data \n";
119 g1 =
new System(
"data/diag_system_3_modular3.gen");
120 g2 =
new System(
"data/diag_system_3_modular4.gen");
121 k1 =
new System(
"data/diag_specification_3_modular3.gen");
122 k2 =
new System(
"data/diag_specification_3_modular4.gen");
125 g1->
Write(
"tmp_diag_system_3_modular3.gen");
126 g2->
Write(
"tmp_diag_system_3_modular4.gen");
127 k1->
Write(
"tmp_diag_specification_3_modular3.gen");
128 k2->
Write(
"tmp_diag_specification_3_modular4.gen");
140 std::cout <<
"# b) run modular diagnosability test (expect result FAIL)\n";
145 std::cout <<
"The overall system G is modularly diagnosable with respect to overall specification K." << std::endl;
146 std::cout << report << std::endl;
148 std::cout <<
"The overall system G is not modularly diagnosable with respect to overall specification K." << std::endl;
149 std::cout << report << std::endl;
156 std::cout <<
"# done \n";
157 std::cout <<
"################################\n";
171 std::cout <<
"################################\n";
172 std::cout <<
"# modular diagnosability (system sf/cb1a)\n";
173 std::cout <<
"# a) read data \n";
176 g1 =
new System(
"data/diag_system_3_modular_sf.gen");
177 g2 =
new System(
"data/diag_system_3_modular_c1.gen");
178 k1 =
new System(
"data/diag_specification_3_modular_sf.gen");
179 k2 =
new System(
"data/diag_specification_3_modular_c1.gen");
182 g1->
Write(
"tmp_diag_system_3_modular_sf.gen");
183 g2->
Write(
"tmp_diag_system_3_modular_c1.gen");
184 k1->
Write(
"tmp_diag_specification_3_modular_sf.gen");
185 k2->
Write(
"tmp_diag_specification_3_modular_c1.gen");
197 std::cout <<
"# b) run diagnosability test (expect result PASS)\n";
201 std::cout <<
"The overall system G is modularly diagnosable with respect to overall specification K." << std::endl;
202 std::cout << report << std::endl;
204 std::cout <<
"The overall system G is not modularly diagnosable with respect to overall specification K." << std::endl;
205 std::cout << report << std::endl;
214 std::cout <<
"# c) compute modular diagnoser\n";
220 diag.
At(0).
Write(
"tmp_diag_diagnoser_3_modular_sf.gen");
221 diag.
At(1).
Write(
"tmp_diag_diagnoser_3_modular_c1.gen");
227 std::cout <<
"# done \n";
228 std::cout <<
"################################\n";
236 std::cout << std::endl;
#define FAUDES_TEST_DUMP(mes, dat)
Test protocol record macro ("mangle" filename for platform independance)
Set of indices with symbolic names.
virtual const T & At(const Position &pos) const
Access element.
Generator with controllability attributes.
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
Read configuration data from file with label specified.
void Write(const Type *pContext=0) const
Write configuration data to console.
void TakeOwnership(void)
Take ownership of all entries.
virtual void Append(const Type &rElem)
Append specified entry.
virtual void Clear(void)
Clear all vector.
Base class of all FAUDES generators.
TcGenerator< AttributeVoid, AttributeVoid, AttributeCFlags, AttributeVoid > System
Convenience typedef for std System.
void Project(const Generator &rGen, const EventSet &rProjectAlphabet, Generator &rResGen)
Deterministic projection.
Includes all libFAUDES headers, incl plugings
libFAUDES resides within the namespace faudes.
bool ModularDiagnoser(const SystemVector &rGsubs, const GeneratorVector &rKsubs, GeneratorVector &rDiagSubs, string &rReportString)
bool IsModularDiagnosable(const SystemVector &rGsubs, const GeneratorVector &rKsubs, string &rReportString)