|
Go to the documentation of this file.
12 FD_DIO( "IsIoSystem("<< rIoSystem. Name() << ",...)");
17 rQErr. Name( "ErrorStates");
19 FD_DIO( "IsIoSystem("<< rIoSystem. Name() << ",...): testing completeness");
22 StateSet::Iterator sit=acc. Begin();
23 StateSet::Iterator sit_end=acc.End();
24 for(;sit!=sit_end;sit++){
28 if(tit==tit_end) rQErr. Insert(*sit);
33 FD_DIO( "IsIoSystem("<< rIoSystem. Name() << ",...): not complete");
41 EventSet::Iterator eit_end= rIoSystem. AlphabetEnd();
42 for(; eit != eit_end; ++eit) {
55 FD_DIO( "IsIoSystem("<< rIoSystem. Name() << ",...): not a u-y partition of events");
58 for(; tit!=tit_end; tit++)
63 FD_DIO( "IsIoSystem("<< rIoSystem. Name() << ",...): trivial partition");
67 FD_DIO( "IsIoSystem("<< rIoSystem. Name() << ",...): i/o alternation");
71 for(; sit != sit_end; ++sit) {
75 for(; tit!=tit_end; tit++) {
86 for(; sit != sit_end; ++sit) {
92 while(!todo.empty()) {
93 const Idx current = todo.top();
95 bool uok = rQU. Exists(current);
96 bool yok = rQY. Exists(current);
100 for(; tit!=tit_end; tit++) {
105 if(!uok) rQErr. Insert(current);
109 if(!yok) rQErr. Insert(current);
124 bool res= IsIoSystem(rIoSystem, QU, QY, QErr);
140 FD_DIO( "IsInputLocallyFree("<< rIoSystem. Name() << ",...)");
149 FD_DIO( "IsInputLocallyFree("<< rIoSystem. Name() << ",...)");
152 rQErr. Name( "ErrorStates");
157 StateSet::Iterator sit_end= rIoSystem. StatesEnd();
158 for(; sit != sit_end; ++sit) {
163 for(; tit!=tit_end; tit++)
167 if(lsigu. Empty()) continue;
169 if(lsigu == sigu) continue;
174 return rQErr. Empty();
180 FD_DIO( "IsInputOmegaFree("<< rIoSystem. Name() << ",...)");
189 FD_DIO( "IsInputOmegaFree("<< rIoSystem. Name() << ",...)");
194 FD_DIO( "IsInputOmegaFree("<< rIoSystem. Name() << ",...): failed for locally free");
202 rQErr. Name( "ErrorStates");
207 FD_DIO( "IsInputOmegaFree(...): iterate over good states");
209 StateSet::Iterator sit = rQErr. Begin();
210 while(sit!=rQErr. End()) {
212 StateSet::Iterator cit=sit++;
214 if(goodstates. Exists(*cit)) continue;
219 if(tit==tit_end) continue;
222 for(; tit!=tit_end; ++tit) {
223 if(goodstates. Exists(tit->X2)) { exgood= true; continue; };
224 if(!yalph. Exists(tit->Ev)) break;
227 if(exgood && (tit==tit_end)) {
228 FD_DIO( "IsInputOmegaFree(): ins good state " << rIoSystem. SStr(*cit));
240 FD_DIO( "IsInputOmegaFree(): accessible <= good: passed");
245 FD_DIO( "IsInputOmegaFree(): accessible <= good: failed");
257 FD_DIO( "IoFreeInput("<< rGen. Name() << ",...)");
260 std::stringstream errstr;
261 errstr << "Input alphabet must be contained in generator alphabet";
262 throw Exception( "IoFreeInput(..)", errstr.str(), 100);
268 EventSet::Iterator eit;
269 EventSet::Iterator eit_end;
272 StateSet::Iterator sit_end= rGen. StatesEnd();
273 for(; sit != sit_end; ++sit) {
278 for(; tit!=tit_end; tit++)
281 if(lsigu. Empty()) continue;
283 if(lsigu == rUAlph) continue;
292 for(; eit!=eit_end; eit++) {
301 eit_end=rUAlph. End();
302 for(; eit!=eit_end; eit++)
311 FD_DIO( "RemoveIoDummyStates("<< rIoSystem. Name() << ",...)");
323 StateSet::Iterator sit_end= rIoSystem. StatesEnd();
324 for(; sit != sit_end; ++sit) {
331 for(; tit!=tit_end; tit++) {
332 if(qsuc==0) qsuc=tit->X2;
333 if(qsuc!=tit->X2) { qunique= false; break;}
337 if(!qunique || qsuc==0) continue;
339 if(!(lsig == sigy)) continue;
344 FD_DIO( "RemoveIoDummyStates(): Candidates type 1 " << qerr1. ToString());
345 FD_DIO( "RemoveIoDummyStates(): Candidates type 2 " << qerr2. ToString());
349 sit_end= qerr2. End();
350 for(; sit != sit_end; ++sit) {
357 for(; tit!=tit_end; tit++) {
358 if(qsuc==0) qsuc=tit->X2;
359 if(qsuc!=tit->X2) { qunique= false; break;}
363 if(!qunique) continue;
365 if(!qerr1. Exists(qsuc)) continue;
367 if(!(lsig == sigu)) continue;
371 FD_DIO( "RemoveIoDummyStates(): Candidates type 2 (approved) " << qerr2a. ToString());
376 sit_end= qerr1. End();
377 for(; sit != sit_end; ++sit) {
380 if(tit==tit_end) { qrm1. Insert(*sit); break;}
381 if(!qerr2a. Exists(tit->X2)) { qrm1. Insert(*sit); break;}
385 sit = qerr2a. Begin();
386 sit_end= qerr2a. End();
387 for(; sit != sit_end; ++sit) {
390 if(tit==tit_end) { qrm2. Insert(*sit); break;}
400 for(; sit != sit_end; ++sit)
402 FD_DIO( "RemoveIoDummyStates(): done");
libFAUDES 2.28c
--- 2016.09.30
--- c++ api documentaion by doxygen
|