Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SPOT_TGBA_TGBAREDUC_HH
00025 # define SPOT_TGBA_TGBAREDUC_HH
00026
00027 #include "tgbaexplicit.hh"
00028 #include "tgbaalgos/reachiter.hh"
00029
00030 #include <list>
00031 #include <vector>
00032
00033 namespace spot
00034 {
00035 typedef std::pair<const spot::state*, const spot::state*> state_couple;
00036 typedef std::vector<state_couple*> simulation_relation;
00037
00038
00039
00040
00041
00042
00043 class direct_simulation_relation: public simulation_relation
00044 {
00045 };
00046 class delayed_simulation_relation: public simulation_relation
00047 {
00048 };
00049
00050
00053 class tgba_reduc:
00054 public tgba_explicit_string, public tgba_reachable_iterator_breadth_first
00055 {
00056 public:
00057 tgba_reduc(const tgba* a);
00058
00059 ~tgba_reduc();
00060
00063 void quotient_state(direct_simulation_relation* rel);
00064
00067 void quotient_state(delayed_simulation_relation* rel);
00068
00071 void delete_transitions(simulation_relation* rel);
00072
00074 virtual std::string format_state(const spot::state* state) const;
00075
00076
00077 void display_rel_sim(simulation_relation* rel, std::ostream& os);
00078 void display_scc(std::ostream& os);
00079
00080 protected:
00081 typedef Sgi::hash_map<const tgba_explicit::state*,
00082 std::list<state*>*,
00083 ptr_hash<tgba_explicit::state> > sp_map;
00084 sp_map state_predecessor_map_;
00085
00086
00087 void start();
00088 void end();
00089 void process_state(const spot::state* s, int n, tgba_succ_iterator* si);
00090 void process_link(int in, int out, const tgba_succ_iterator* si);
00091
00093 transition* create_transition(const spot::state* source,
00094 const spot::state* dest);
00095
00096
00099 void redirect_transition(const spot::state* s,
00100 const spot::state* simul);
00101
00103 void remove_predecessor_state(const state* s, const state* p);
00104
00107 void remove_state(const spot::state* s);
00108
00112 void merge_state(const spot::state* s1,
00113 const spot::state* s2);
00114
00118 void merge_state_delayed(const spot::state* s1,
00119 const spot::state* s2);
00120
00123 void delete_scc();
00124
00142
00143
00144
00145
00146
00147
00148 bool is_terminal(const spot::state* s,
00149 int n = -1);
00150
00151
00152 bool is_not_accepting(const spot::state* s,
00153 int n = -1);
00154
00157 void remove_acc(const spot::state* s);
00158
00160 void remove_scc(spot::state* s);
00161
00163
00164
00166 void remove_component(const spot::state* from);
00167
00168 int nb_set_acc_cond() const;
00169
00170 };
00171 }
00172
00173 #endif // SPOT_TGBA_TGBAREDUC_HH