39 OP_DF(
"calcBisimulation(" << rGenOrig.
Name() <<
", rMapStateToPartition, " << rGenPart.
Name() <<
", rNewPartitions)");
43 bisim.partition(rMapStateToPartition, rGenPart, rNewPartitions);
45 cout <<
"The result of the partition refinement is:" << endl;
49 OP_DF(
"calcBisimulation: leaving function");
55 OP_DF(
"calcBisimulation(" << rGenOrig.
Name() <<
", rMapStateToPartition, rNewPartitions)");
59 bisim.partition(rMapStateToPartition, rNewPartitions);
60 #ifdef FAUDES_DEBUG_FUNCTION
61 cout <<
"The result of the partition refinement is:" << endl;
65 OP_DF(
"calcBisimulation: leaving function");
71 OP_DF(
"Bisimulation::Bisimulation(" << g.
Name() <<
")");
78 universalPartition.
index=index;
79 universalPartition.
pFather=NULL;
83 universalPartition.
states = gen->States();
87 W[index]=universalPartition;
90 ro.push_back(&W[index]);
91 roDividers.insert(&W[index]);
95 OP_DF(
"Bisimulation::Bisimulation: leaving function");
101 OP_DF(
"Bisimulation::partitionSplitter(B)");
102 OP_DF(
"Bisimulation::partitionSplitter: index of current coset is " << B.
index);
125 OP_DF(
"Bisimulation::partitionSplitter: the chosen (smaller) coset for segmentation has the index: " << pSmallerPart->
index);
126 OP_DF(
"Bisimulation::partitionSplitter: the larger coset has the index: " << pLargerPart->
index <<
"\n");
131 EventSet::Iterator eIt;
132 EventSet::Iterator eItBegin=gen->AlphabetBegin();
133 EventSet::Iterator eItEnd=gen->AlphabetEnd();
136 StateSet::Iterator sIt;
137 StateSet::Iterator sItBegin;
138 StateSet::Iterator sItEnd;
146 vector<Partition*>::iterator roIt;
149 stack<vector<Partition*>::iterator> toDo;
153 for (eIt=eItBegin; eIt != eItEnd; ++eIt)
158 OP_DF(
"Bisimulation::partitionSplitter: partitioning for event " << gen->EventName(*eIt));
163 pSmallerPart->
infoMap[*eIt]=map<Idx,Idx>();
165 computeInfoMaps(*(pSmallerPart), pSmallerPart, pLargerPart, eIt);
167 map<Idx, map<Idx, Idx> >::iterator imIt = pSmallerPart->
infoMap.find(*eIt);
168 if(imIt == pSmallerPart->
infoMap.end() )
169 pSmallerPart->
infoMap.erase(imIt);
170 imIt = pLargerPart->
infoMap.find(*eIt);
171 if(imIt == pLargerPart->
infoMap.end() )
172 pLargerPart->
infoMap.erase(imIt);
174 OP_DF(
"Bisimulation::partitionSplitter: computing predecessor cosets of parent coset with index " << pFather->
index);
177 for(roIt=ro.begin(); roIt!=ro.end(); roIt++)
180 tempState = *((*roIt)->states.Begin());
181 OP_DF(
"Bisimulation::partitionSplitter: checking candidate coset with index " << (*roIt)->index <<
" and its state " << gen->StateName(tempState) <<
" [" << tempState <<
"]");
184 if(stateLeadsToPartition(tempState, *pFather, eIt))
187 OP_DF(
"Bisimulation::partitionSplitter: coset with index " << (*roIt)->index <<
" is predecessor for parent coset with index " << (*pFather).index <<
" and event = " << gen->EventName(*eIt) <<
" and was pushed on toDo-stack");
193 Idx index1,index2,index3;
194 vector<Idx> removeSet;
195 vector<Partition*> addSet;
202 OP_DF(
"Bisimulation::partitionSplitter: current coset taken from todo-stack has index " << (*roIt)->index);
204 bool nonNull[3] = {0,0,0};
210 W[index1].
index=index1;
214 W[index2].
index=index2;
218 W[index3].
index=index3;
221 sItBegin = (*roIt)->states.Begin();
222 sItEnd = (*roIt)->states.End();
225 map<Idx, map<Idx, Idx> >::const_iterator itMapFather = pFather->
infoMap.find(*eIt);
227 map<Idx, map<Idx, Idx> >::const_iterator itMapSmallerPart = pSmallerPart->
infoMap.find(*eIt);
231 for(sIt=sItBegin; sIt!=sItEnd; sIt++)
233 if(itMapSmallerPart == pSmallerPart->
infoMap.end() ){
234 W[index2].states.Insert(*sIt);
237 else if(itMapSmallerPart->second.find(*sIt)==itMapSmallerPart->second.end())
239 W[index2].states.Insert(*sIt);
244 if(itMapFather->second.find(*sIt)->second==itMapSmallerPart->second.find(*sIt)->second)
246 W[index1].states.Insert(*sIt);
249 if(itMapFather->second.find(*sIt)->second > itMapSmallerPart->second.find(*sIt)->second)
251 W[index3].states.Insert(*sIt);
258 switch(nonNull[0]+nonNull[1]*2+nonNull[2]*4)
263 OP_DF(
"Bisimulation::partitionSplitter: coset " << (*roIt)->index <<
" has not been split ");
268 OP_DF(
"Bisimulation::partitionSplitter: coset " << (*roIt)->index <<
" has not been split ");
273 OP_DF(
"partition " << (*roIt)->index <<
" has not been split ");
277 OP_DF(
"Bisimulation::partitionSplitter: coset " << (*roIt)->index <<
" has been split into cosets X1 and X2");
280 W.erase(W.find(index3));
283 W[index2].pBrother=&W[index1];
284 W[index2].pFather=*roIt;
285 W[index2].pFirstChild=NULL;
286 W[index2].pSecondChild=NULL;
287 W[index2].numberOfStates=W[index2].states.Size();
288 W[index1].pBrother=&W[index2];
289 W[index1].pFather=*roIt;
290 W[index1].pFirstChild=NULL;
291 W[index1].pSecondChild=NULL;
292 W[index1].numberOfStates=W[index1].states.Size();
293 (*roIt)->pFirstChild=&W[index1];
294 (*roIt)->pSecondChild=&W[index2];
297 (*roIt)->states.Clear();
300 if(roDividers.find(*roIt)!=roDividers.end())
301 roDividers.erase(roDividers.find(*roIt));
304 if((*roIt)->pFather!=NULL && (*roIt)->pFather != pFather)
306 if((*roIt)->pFather->pFirstChild->pFirstChild!=NULL && (*roIt)->pFather->pSecondChild->pSecondChild!=NULL)
308 (*roIt)->pFather->infoMap.clear();
313 removeSet.push_back((*roIt)->index);
314 addSet.push_back(&W[index1]);
315 addSet.push_back(&W[index2]);
316 roDividers.insert(&W[index1]);
317 roDividers.insert(&W[index2]);
321 OP_DF(
"Bisimulation::partitionSplitter: coset " << (*roIt)->index <<
" has been split into cosets X1 and X3");
325 W.erase(W.find(index2));
326 W[index3].pBrother=&W[index1];
327 W[index3].pFather=*roIt;
328 W[index3].pFirstChild=NULL;
329 W[index3].pSecondChild=NULL;
330 W[index3].numberOfStates=W[index3].states.Size();
331 W[index1].pBrother=&W[index3];
332 W[index1].pFather=*roIt;
333 W[index1].pFirstChild=NULL;
334 W[index1].pSecondChild=NULL;
335 W[index1].numberOfStates=W[index1].states.Size();
336 (*roIt)->pFirstChild=&W[index1];
337 (*roIt)->pSecondChild=&W[index3];
339 (*roIt)->states.Clear();
340 if(roDividers.find(*roIt)!=roDividers.end())
341 roDividers.erase(roDividers.find(*roIt));
342 if((*roIt)->pFather!=NULL && (*roIt)->pFather != pFather)
344 if((*roIt)->pFather->pFirstChild->pFirstChild!=NULL && (*roIt)->pFather->pSecondChild->pSecondChild!=NULL)
345 (*roIt)->pFather->infoMap.clear();
348 removeSet.push_back((*roIt)->index);
349 addSet.push_back(&W[index1]);
350 addSet.push_back(&W[index3]);
351 roDividers.insert(&W[index1]);
352 roDividers.insert(&W[index3]);
356 OP_DF(
"Bisimulation::partitionSplitter: coset " << (*roIt)->index <<
" has been split into cosets X2 and X3");
360 W.erase(W.find(index1));
361 W[index3].pBrother=&W[index2];
362 W[index3].pFather=*roIt;
363 W[index3].pFirstChild=NULL;
364 W[index3].pSecondChild=NULL;
365 W[index3].numberOfStates=W[index3].states.Size();
366 W[index2].pBrother=&W[index3];
367 W[index2].pFather=*roIt;
368 W[index2].pFirstChild=NULL;
369 W[index2].pSecondChild=NULL;
370 W[index2].numberOfStates=W[index2].states.Size();
371 (*roIt)->pFirstChild=&W[index2];
372 (*roIt)->pSecondChild=&W[index3];
375 (*roIt)->states.Clear();
376 if(roDividers.find(*roIt)!=roDividers.end())
377 roDividers.erase(roDividers.find(*roIt));
378 if((*roIt)->pFather!=NULL && (*roIt)->pFather != pFather)
380 if((*roIt)->pFather->pFirstChild->pFirstChild!=NULL && (*roIt)->pFather->pSecondChild->pSecondChild!=NULL)
381 (*roIt)->pFather->infoMap.clear();
384 removeSet.push_back((*roIt)->index);
385 addSet.push_back(&W[index2]);
386 addSet.push_back(&W[index3]);
387 roDividers.insert(&W[index2]);
388 roDividers.insert(&W[index3]);
394 OP_DF(
"Bisimulation::partitionSplitter: coset " << (*roIt)->index <<
" has been split into cosets X1, X2 and X3");
400 W[index].
index=index;
401 (*roIt)->pFirstChild=&W[index1];
402 (*roIt)->pSecondChild=&W[index];
403 W[index1].pFather=*roIt;
404 W[index1].pBrother=&W[index];
405 W[index1].pFirstChild=NULL;
406 W[index1].pSecondChild=NULL;
407 W[index1].numberOfStates=W[index1].states.Size();
408 W[index].pBrother=&W[index1];
409 W[index].pFather=*roIt;
410 W[index].pFirstChild=&W[index2];
411 W[index].pSecondChild=&W[index3];
412 W[index2].pBrother=&W[index3];
413 W[index2].pFather=&W[index];
414 W[index2].pFirstChild=NULL;
415 W[index2].pSecondChild=NULL;
416 W[index2].numberOfStates=W[index2].states.Size();
417 W[index3].pBrother=&W[index2];
418 W[index3].pFather=&W[index];
419 W[index3].pFirstChild=NULL;
420 W[index3].pSecondChild=NULL;
421 W[index3].numberOfStates=W[index3].states.Size();
422 W[index].numberOfStates=W[index2].numberOfStates+W[index3].numberOfStates;
424 (*roIt)->states.Clear();
426 if(roDividers.find(*roIt)!=roDividers.end())
427 roDividers.erase(roDividers.find(*roIt));
428 if((*roIt)->pFather!=NULL && (*roIt)->pFather != pFather)
430 if((*roIt)->pFather->pFirstChild->pFirstChild!=NULL && (*roIt)->pFather->pSecondChild->pSecondChild!=NULL)
431 (*roIt)->pFather->infoMap.clear();
434 removeSet.push_back((*roIt)->index);
435 addSet.push_back(&W[index1]);
436 addSet.push_back(&W[index2]);
437 addSet.push_back(&W[index3]);
438 roDividers.insert(&W[index1]);
439 roDividers.insert(&W[index2]);
440 roDividers.insert(&W[index3]);
449 OP_DF(
"Bisimulation::partitionSplitter: deleting split cosets from ro");
450 vector<Idx>::iterator remIt;
451 for(remIt=removeSet.begin(); remIt != removeSet.end(); ++remIt)
453 vector<Partition*>::iterator delRoIt = ro.begin();
454 vector<Partition*>::iterator delRoItEnd = ro.end();
455 for(; delRoIt != delRoItEnd; ++delRoIt)
457 if((*delRoIt)->index == *remIt)
460 OP_DF(
"Bisimulation::partitionSplitter: coset "<< (*delRoIt)->index <<
" deleted from ro");
468 OP_DF(
"Bisimulation::partitionSplitter: inserting the new cosets into ro");
469 vector<Partition*>::iterator addIt;
470 for(addIt=addSet.begin(); addIt != addSet.end(); ++addIt)
472 ro.push_back(*addIt);
473 OP_DF(
"Bisimulation::partitionSplitter: coset " << (*addIt)->index <<
" inserted into ro");
493 if(roDividers.find(pSmallerPart) != roDividers.end())
494 roDividers.erase(pSmallerPart);
495 if(roDividers.find(pLargerPart) != roDividers.end())
496 roDividers.erase(pLargerPart);
498 OP_DF(
"Bisimulation::partitionSplitter: leaving function");
504 OP_DF(
"Bisimulation::computeInfoMaps(" << node.
index <<
"," << pSmallerPart->
index <<
"," << pLargerPart->
index <<
"," << gen->EventName(*eIt) <<
")");
509 StateSet::Iterator sIt;
510 StateSet::Iterator sItBegin;
511 StateSet::Iterator sItEnd;
519 map<Idx, map<Idx,Idx> >::iterator imItLa, imItSm;
520 imItLa = pLargerPart->
infoMap.find(*eIt);
521 imItSm = pSmallerPart->
infoMap.find(*eIt);
522 for(sIt=sItBegin; sIt!=sItEnd; sIt++)
524 tItBegin=tset_evx2x1.BeginByEvX2(*eIt,*sIt);
525 tItEnd=tset_evx2x1.EndByEvX2(*eIt,*sIt);
527 for(tIt=tItBegin; tIt != tItEnd; ++tIt)
531 if(imItSm->second.find(tempState) == imItSm->second.end())
533 imItSm->second[tempState]=1;
538 imItSm->second[tempState]++;
540 imItLa->second[tempState]--;
541 if(imItLa->second[tempState]==0)
542 imItLa->second.erase(tempState);
547 computeInfoMaps(*(node.
pFirstChild), pSmallerPart, pLargerPart, eIt);
550 computeInfoMaps(*(node.
pSecondChild),pSmallerPart, pLargerPart, eIt);
553 OP_DF(
"Bisimulation::computeInfoMaps: leaving function");
557 bool Bisimulation::stateLeadsToPartition(
Idx state,
Partition& node, EventSet::Iterator eIt)
559 OP_DF(
"Bisimulation::stateLeadsToPartition(" << state <<
"," << node.
index <<
"," << gen->EventName(*eIt) <<
")");
563 if(node.
states.
Exists(gen->TransRelBegin(state, *eIt)->X2) && gen->TransRelBegin(state, *eIt)->X1 == state && gen->TransRelBegin(state, *eIt)->Ev == *eIt)
570 found=stateLeadsToPartition(state,*node.
pFirstChild,eIt);
575 found=stateLeadsToPartition(state,*node.
pSecondChild,eIt);
578 OP_DF(
"Bisimulation::stateLeadsToPartition: leaving function");
585 OP_DF(
"Bisimulation::partitionClass(" << B.
index <<
")");
586 OP_DF(
"Bisimulation::partitionClass: index of passed coset is " << B.
index);
589 EventSet::Iterator eIt;
590 EventSet::Iterator eItBegin = gen->AlphabetBegin();
591 EventSet::Iterator eItEnd = gen->AlphabetEnd();
594 vector<Partition*>::iterator roIt;
596 vector<Partition*> addSet;
597 vector<Partition*>::iterator addIt;
598 vector<Idx> removeSet;
599 vector<Idx>::iterator remIt;
604 FD_DV(
"Bisimulation::partitionClass: loop over events " << gen->Alphabet().ToString());
607 for (eIt=eItBegin; eIt!=eItEnd; ++eIt)
609 OP_DF(
"Bisimulation::partitionClass: partitioning for event " << gen->EventName(*eIt));
613 computeInfoMap(B, B, eIt, tb);
615 for(roIt = ro.begin(); roIt != ro.end(); ++roIt)
617 OP_DF(
"Bisimulation::partitionClass: candidate coset to be split has index " << (*roIt)->index);
621 W[index]=intersection;
622 W[index].
states=(*roIt)->states;
625 if(!W[index].states.Empty() && W[index].states.Size()!=(*roIt)->states.Size() )
628 OP_DF(
"Bisimulation::partitionClass: current coset with index " << (*roIt)->index <<
" will be split");
631 if(roDividers.find(*roIt)!=roDividers.end())
633 OP_DF(
"Bisimulation::partitionClass: candidate was in roDividers and will be deleted from it");
634 roDividers.erase(roDividers.find(*roIt));
638 removeSet.push_back((*roIt)->index);
641 W[index].index=index;
642 W[index].pBrother=NULL;
643 W[index].pFirstChild=NULL;
644 W[index].pSecondChild=NULL;
645 W[index].pFather=*roIt;
646 W[index].numberOfStates=W[index].states.Size();
647 (*roIt)->pFirstChild=&W[index];
650 addSet.push_back(&W[index]);
651 roDividers.insert(&W[index]);
652 OP_DF(
"Bisimulation::partitionClass: the coset with index " << (&W[index])->index <<
" has been added to addSet and to roDividers");
659 W[index].
states = ((*roIt)->states) - W[index-1].states;
660 W[index].index=index;
661 W[index].pBrother=&W[index-1];
662 W[index-1].pBrother=&W[index];
663 W[index].pFirstChild=NULL;
664 W[index].pSecondChild=NULL;
665 W[index].pFather=*roIt;
666 W[index].numberOfStates=W[index].states.
Size();
667 (*roIt)->pSecondChild=&W[index];
670 addSet.push_back(&W[index]);
671 roDividers.insert(&W[index]);
672 OP_DF(
"Bisimulation::partitionClass: the coset with index " << (&W[index])->index <<
" has been added to addSet and to roDividers");
675 OP_DF(
"Bisimulation::partitionClass: the candidate coset has been split");
678 if((*roIt)->pFather!=NULL)
680 OP_DF(
"Bisimulation::partitionClass: split coset has parent coset with index " << (*roIt)->pFather->index);
681 if((*roIt)->pFather->pFirstChild->pFirstChild!=NULL && (*roIt)->pFather->pSecondChild->pSecondChild!=NULL)
683 (*roIt)->pFather->infoMap.clear();
684 OP_DF(
"Bisimulation::partitionClass: info map of parent coset deleted");
689 (*roIt)->states.Clear();
690 OP_DF(
"Bisimulation::partitionClass: states of split coset " << (*roIt)->index <<
" have been deleted");
700 OP_DF(
"Bisimulation::partitionClass: deleting split cosets from ro");
701 for(remIt=removeSet.begin(); remIt!=removeSet.end();remIt++)
703 vector<Partition*>::iterator delRoIt = ro.begin();
704 vector<Partition*>::iterator delRoItEnd = ro.end();
705 for(; delRoIt!=delRoItEnd; ++delRoIt)
707 if((*delRoIt)->index==*remIt)
710 OP_DF(
"Bisimulation::partitionClass: coset " << (*delRoIt)->index <<
" was deleted from ro");
718 OP_DF(
"Bisimulation::partitionClass: inserting the new cosets into ro");
719 for(addIt=addSet.begin();addIt!=addSet.end();addIt++)
721 ro.push_back(*addIt);
722 OP_DF(
"Bisimulation::partitionClass: coset with index " << (*addIt)->index <<
" was inserted into ro");
737 roDividers.erase(&B);
739 OP_DF(
"Bisimulation::partitionClass: leaving function");
745 OP_DF(
"Bisimulation::computeInfoMap(" << B.
index <<
"," << Bstates.
index <<
"," << gen->EventName(*eIt) <<
", Stateset&)");
746 OP_DF(
"Bisimulation::computeInfoMap: consider stateSet of coset " << Bstates.
index);
752 StateSet::Iterator sIt;
753 StateSet::Iterator sItBegin = Bstates.
states.
Begin();
754 StateSet::Iterator sItEnd = Bstates.
states.
End();
760 map<Idx, map<Idx, Idx> >::iterator imIt;
762 for(sIt=sItBegin; sIt != sItEnd; ++sIt)
764 tItBegin=tset_evx2x1.BeginByEvX2(*eIt,*sIt);
765 tItEnd=tset_evx2x1.EndByEvX2(*eIt,*sIt);
768 for(tIt=tItBegin; tIt != tItEnd; ++tIt)
773 imIt = B.
infoMap.insert(B.
infoMap.begin(), make_pair(*eIt, map<Idx,Idx>() ) );
779 if(imIt->second.find(temp)==imIt->second.end())
780 imIt->second[temp]=1;
782 imIt->second[temp]++;
788 computeInfoMap(B, *(Bstates.
pFirstChild), eIt, tb);
794 OP_DF(
"Bisimulation::computeInfoMap: leaving function");
798 void Bisimulation::partition(std::map<Idx,Idx>& rMapStateToPartition,
Generator& rGenPart, std::vector<Idx>& rNewPartitions)
800 OP_DF(
"Bisimulation::partition(rMapStateToPartition," << rGenPart.
Name() <<
", rNewPartitions)");
803 set<Partition*>::iterator roDivIt;
804 set<Partition*>::iterator roDivItEnd=roDividers.end();
809 roDivIt=roDividers.begin();
817 while(roDivIt != roDivItEnd && !roDividers.empty())
824 partitionSplitter(**roDivIt);
827 roDivItEnd=roDividers.end();
828 roDivIt=roDividers.begin();
836 if(!roDividers.empty())
838 roDivIt=roDividers.begin();
839 partitionClass(**roDivIt);
842 roDivItEnd=roDividers.end();
843 roDivIt=roDividers.begin();
845 if(roDividers.empty())
851 OP_DF(
"Bisimulation::partition: entering function: building generator from equivalence classes");
855 vector<Partition*>::const_iterator cRoIt = ro.begin();
856 vector<Partition*>::const_iterator cRoItEnd = ro.end();
857 StateSet::Iterator cSIt;
858 StateSet::Iterator cSItEnd;
859 for (; cRoIt != cRoItEnd; ++cRoIt)
861 std::ostringstream ostr;
865 OP_DF(
"Bisimulation::partition: new state " << newstate <<
" for coset "
866 << (*cRoIt)->index <<
" :"<< (*cRoIt)->states.ToString());
869 rNewPartitions.push_back(newstate);
871 cSIt=(*cRoIt)->states.Begin();
872 cSItEnd=(*cRoIt)->states.End();
875 for (; cSIt != cSItEnd; ++cSIt)
879 rMapStateToPartition[*cSIt] = newstate;
884 if (gen->StateName(*cSIt) ==
"")
890 ostr << gen->StateName(*cSIt) <<
",";
895 if (gen->ExistsInitState(*cSIt))
900 if (gen->ExistsMarkedState(*cSIt))
908 std::string statename = ostr.str();
909 if(statename.length()>=1) statename.erase(statename.length()-1);
910 statename =
"{" + statename +
"}";
912 OP_DF(
"Bisimulation::partition: new state " << statename);
919 for (; tIt != tItEnd; ++tIt)
922 rGenPart.
SetTransition(rMapStateToPartition[tIt->X1], tIt->Ev, rMapStateToPartition[tIt->X2]);
923 OP_DF(
"Bisimulation::partition: adding transition: X1=" << rGenPart.
TStr(*tIt) );
925 OP_DF(
"Bisimulation::partition: leaving function");
929 void Bisimulation::partition(std::map<Idx,Idx>& rMapStateToPartition, std::vector<Idx>& rNewPartitions)
931 OP_DF(
"Bisimulation::partition(rMapStateToPartition, rNewPartitions)");
934 set<Partition*>::iterator roDivIt;
935 set<Partition*>::iterator roDivItEnd=roDividers.end();
939 roDivIt=roDividers.begin();
946 while(roDivIt!=roDivItEnd && !roDividers.empty())
953 partitionSplitter(**roDivIt);
955 roDivItEnd=roDividers.end();
956 roDivIt=roDividers.begin();
964 if(!roDividers.empty())
966 roDivIt=roDividers.begin();
967 partitionClass(**roDivIt);
969 roDivItEnd=roDividers.end();
970 roDivIt=roDividers.begin();
972 if(roDividers.empty())
978 OP_DF(
"Bisimulation::partition: writing vector rMapStateToPartition");
982 vector<Partition*>::const_iterator cRoIt = ro.begin();
983 vector<Partition*>::const_iterator cRoItEnd = ro.end();
984 StateSet::Iterator cSIt;
985 StateSet::Iterator cSItEnd;
986 for (; cRoIt != cRoItEnd; ++cRoIt)
990 rNewPartitions.push_back(newstate);
991 cSIt=(*cRoIt)->states.Begin();
992 cSItEnd=(*cRoIt)->states.End();
993 for ( ; cSIt!=cSItEnd; ++ cSIt)
996 rMapStateToPartition[*cSIt] = newstate;
999 OP_DF(
"Bisimulation::partition: leaving function");
1003 void Bisimulation::writeW(
void)
1005 OP_DF(
"Bisimulation:writeW()");
1006 cout <<
"Plotting the W-tree:" << endl;
1007 writeNode(W.find(1)->second);
1013 OP_DF(
"Bisimulation::writeNode(" << node.
index <<
")");
1014 cout <<
"Coset with index " << node.
index <<
" has the following states:" << endl;
1017 cout <<
"Parent coset has index: " << node.
pFather->
index << endl;
1019 cout <<
"Coset is the root of the tree" << endl;
1021 cout <<
"Coset has brother coset with index: " << node.
pBrother->
index << endl;
1023 cout <<
"Coset has no brother" << endl;
1027 cout <<
"Coset has no children" << endl;
1028 cout <<
"ro is stable with respect to this coset (1=yes; 0=no): " << node.
nonSplitting << endl;
1029 cout <<
"Info-map of coset: " << endl;
1030 EventSet::Iterator eIt;
1031 for(eIt=gen->AlphabetBegin();eIt != gen->AlphabetEnd(); ++eIt)
1041 void Bisimulation::writeRo(
void)
1043 OP_DF(
"Bisimulation::writeRo()");
1044 cout <<
"The Cosets with the following indices are in ro: " << endl;
1045 vector<Partition*>::iterator roIt;
1046 vector<Partition*>::iterator roItBegin =ro.begin();
1047 vector<Partition*>::iterator roItEnd = ro.end();
1048 for(roIt=roItBegin; roIt!=roItEnd; roIt++)
1049 cout << (*roIt)->index << endl;