|
diag_decentralizeddiagnosis.cpp
Go to the documentation of this file.
1/** @file diag_decentralizeddiagnosis.cpp Functions to test decentralized diagnosability and compute diagnosers.
24bool IsCoDiagnosable(const System& rGen, const Generator& rSpec, const vector<const EventSet*>& rAlphabets, std::string& rReportString) {
50 CoVerifierState newVerifierState = CoVerifierState(rAlphabets.size(), rSpec.InitState(), rGen.InitState(),NORMAL);
51 for(Idx i = 0; i < rAlphabets.size(); i++) // all decentralized versions of the specification are initialized
74 cout << rSpec.StateName(currentState.second.mSpec2State) << " " << rGen.StateName(currentState.second.mPlantState) << " " << currentState.second.mLabel << ")" << endl;
85 newVerifierState = CoVerifierState(rAlphabets.size(), currentState.second.mSpec2State, currentState.second.mPlantState, NORMAL);
92 if(currentState.second.mLabel == CONFUSED ) // transition in spec1 from normal state// transition in spec1 from confused state
121 newVerifierState = CoVerifierState(rAlphabets.size(), currentState.second.mSpec2State, X2, NORMAL); // prepare the new verifier state
127 if(tIt == rSpec.TransRelEnd(currentState.second.mSpec2State,*eIt) ){ // violation of the specification
148 if(newVerifierState.mLabel == NORMAL || (currentState.second.mLabel == CONFUSED && newVerifierState.mPlantState == currentState.second.mPlantState) ){ // normal behavior or confused behavior extended in the specification (rule 3 or 4)
160 bool allSpecsParticipate = true; // indicates if the plant can proceed together with all specs that have the current event
164 if(plantIt != rGen.TransRelEnd(currentState.second.mPlantState, *eIt) ){// there plant has a transition with *eIt
166 if(specIt == rSpec.TransRelEnd(currentState.second.mSpec2State, *eIt) || currentState.second.mLabel == CONFUSED){
167 newVerifierState = CoVerifierState(rAlphabets.size(), currentState.second.mSpec2State, plantIt->X2, CONFUSED);
177 allSpecsParticipate = false; // this subsystem can detect that there is a deviationfrom the specification
241 if(rGen.TransRelBegin(currentState.second.mPlantState) == rGen.TransRelEnd(currentState.second.mPlantState) && currentState.second.mLabel == CONFUSED){
276 if(tIt != verifier.TransRelEnd(*stIt, negEvent) && sccIt->Exists(tIt->X2) ){ // there is a transition with negEvent within the SCC
293bool DecentralizedDiagnoser(const System& rGen, const Generator& rSpec, const std::vector<const EventSet*>& rAlphabets, std::vector<Diagnoser*>& rDiags, std::string& rReportString){
317void DecentralizedModularDiagnoser(const std::vector<const System*>& rGens, const Generator& rSpec, std::vector<Diagnoser*>& rDiags, std::string& rReportString){
337bool IsCoDiagnosable(const System& rGen, const Generator& rSpec, const EventSetVector& rAlphabets){
349bool DecentralizedDiagnoser(const System& rGen, const Generator& rSpec, const EventSetVector& rAlphabets, GeneratorVector& rDiags){
367void DecentralizedModularDiagnoser(const SystemVector& rGens, const Generator& rSpec, GeneratorVector& rDiags){
Definition cfl_indexset.h:78 Definition cfl_nameset.h:70 Definition cfl_baseset.h:410 virtual const T & At(const Position &pos) const Definition cfl_basevector.h:930 const TaEventSet< EventAttr > & Alphabet(void) const Definition cfl_agenerator.h:1358 Definition cfl_cgenerator.h:76 EventSet ObservableEvents(void) const Definition cfl_cgenerator.h:1045 Definition diag_generator.h:26 Definition cfl_generator.h:213 bool SetTransition(Idx x1, Idx ev, Idx x2) Definition cfl_generator.cpp:1623 TransSet::Iterator TransRelBegin(void) const Definition cfl_generator.cpp:1064 TransSet::Iterator TransRelEnd(void) const Definition cfl_generator.cpp:1069 void GraphWrite(const std::string &rFileName, const std::string &rOutFormat="", const std::string &rDotExec="dot") const Definition cfl_generator.cpp:3951 void InjectAlphabet(const EventSet &rNewalphabet) Definition cfl_generator.cpp:1167 void LanguageDiagnoser(const System &rGen, const System &rSpec, Diagnoser &rDiagGen) Definition diag_languagediagnosis.cpp:275 void DecentralizedModularDiagnoser(const std::vector< const System * > &rGens, const Generator &rSpec, std::vector< Diagnoser * > &rDiags, std::string &rReportString) Definition diag_decentralizeddiagnosis.cpp:317 bool DecentralizedDiagnoser(const System &rGen, const Generator &rSpec, const std::vector< const EventSet * > &rAlphabets, std::vector< Diagnoser * > &rDiags, std::string &rReportString) Definition diag_decentralizeddiagnosis.cpp:293 bool ComputeScc(const Generator &rGen, const SccFilter &rFilter, std::list< StateSet > &rSccList, StateSet &rRoots) Definition cfl_graphfncts.cpp:347 void Project(const Generator &rGen, const EventSet &rProjectAlphabet, Generator &rResGen) Definition cfl_project.cpp:1349 Definition cfl_agenerator.h:43 bool IsCoDiagnosable(const System &rGen, const Generator &rSpec, const vector< const EventSet * > &rAlphabets, std::string &rReportString) Definition diag_decentralizeddiagnosis.cpp:24 TdiagGenerator< AttributeFailureTypeMap, AttributeDiagnoserState, AttributeCFlags, AttributeVoid > Diagnoser Definition diag_generator.h:198 std::vector< Idx > mSpec1State Definition diag_decentralizeddiagnosis.h:27 libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen |