00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SPOT_TGBAALGOS_GTEC_GTEC_HH
00023 # define SPOT_TGBAALGOS_GTEC_GTEC_HH
00024
00025 #include <stack>
00026 #include "status.hh"
00027 #include "tgbaalgos/emptiness.hh"
00028 #include "tgbaalgos/emptiness_stats.hh"
00029
00030 namespace spot
00031 {
00034
00085 class couvreur99_check: public emptiness_check, public ec_statistics
00086 {
00087 public:
00088 couvreur99_check(const tgba* a,
00089 bool poprem = true,
00090 const numbered_state_heap_factory* nshf
00091 = numbered_state_heap_hash_map_factory::instance());
00092 virtual ~couvreur99_check();
00093
00095 virtual emptiness_check_result* check();
00096
00097 virtual std::ostream& print_stats(std::ostream& os) const;
00098
00107 const couvreur99_check_status* result() const;
00108
00109 protected:
00110 couvreur99_check_status* ecs_;
00116 void remove_component(const state* start_delete);
00117
00119 bool poprem_;
00120 };
00121
00131 class couvreur99_check_shy : public couvreur99_check
00132 {
00133 public:
00134 couvreur99_check_shy(const tgba* a,
00135 bool poprem = true,
00136 bool group = true,
00137 const numbered_state_heap_factory* nshf
00138 = numbered_state_heap_hash_map_factory::instance());
00139 virtual ~couvreur99_check_shy();
00140
00141 virtual emptiness_check_result* check();
00142
00143 protected:
00144 struct successor {
00145 bdd acc;
00146 const spot::state* s;
00147 successor(bdd acc, const spot::state* s): acc(acc), s(s) {}
00148 };
00149
00150
00151
00152
00153
00154
00155 std::stack<bdd> arc;
00156
00157
00158 int num;
00159
00160
00161
00162 typedef std::list<successor> succ_queue;
00163
00164 struct todo_item
00165 {
00166 const state* s;
00167 int n;
00168 succ_queue q;
00169 todo_item(const state* s, int n)
00170 : s(s), n(n)
00171 {
00172 }
00173 };
00174
00175 typedef std::list<todo_item> todo_list;
00176 todo_list todo;
00177
00178 void clear_todo();
00179
00180
00181
00182 bool group_;
00183
00192 virtual int* find_state(const state* s);
00193 };
00194
00196 }
00197
00198 #endif // SPOT_TGBAALGOS_GTEC_GTEC_HH