00001
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef OP_BISIMULATION_H
00032
00033 #include "libfaudes.h"
00034 #include <vector>
00035 #include <map>
00036 #include "op_partition.h"
00037 #include "op_debug.h"
00038 #include <string>
00039 #include <sstream>
00040
00041
00042 using namespace faudes;
00043 using namespace std;
00044
00045 namespace faudes{
00046
00065 void calcBisimulation(Generator& rGenOrig, map<Idx,Idx>& rMapStateToPartition, Generator& rGenPart, vector<Idx>& rNewPartitions);
00066
00083 void calcBisimulation(Generator& rGenOrig, map<Idx,Idx>& rMapStateToPartition, vector<Idx>& rNewPartitions);
00084
00090 class Bisimulation {
00091
00092 public:
00093
00100 Bisimulation(Generator& g);
00101
00102
00106 void writeW(void);
00107
00120 void partition(map<Idx,Idx>& rMapStateToPartition, Generator& rGenPart, vector<Idx>& rNewPartitions);
00121
00122
00131 void partition(map<Idx,Idx>& rMapStateToPartition, vector<Idx>& rNewPartitions);
00132
00136 void writeRo(void);
00137
00138 private:
00139
00143 Generator* gen;
00144
00158 void computeInfoMaps(Partition& node, Partition* pSmallerPart, Partition* pLargerPart, EventSet::Iterator eIt);
00159
00172 void computeInfoMap(Partition& B, Partition& Bstates, EventSet::Iterator eIt, StateSet& tb);
00173
00184 bool stateLeadsToPartition(Idx state, Partition& node, EventSet::Iterator eIt);
00185
00189 map<Idx, Partition> W;
00190
00194 Idx index;
00195
00199 vector<Partition*> ro;
00200
00204 TransSetEvX2X1 tset_evx2x1;
00205
00206
00213 void partitionClass(Partition& B);
00214
00222 void partitionSplitter (Partition& B);
00223
00224
00231 void writeNode(Partition& node);
00232
00236 set<Partition*> roDividers;
00237 };
00238
00239 }
00240
00241 #define OP_BISIMULATION_H
00242 #endif
00243