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
00138 emptiness_check*
00139 couvreur99(const tgba* a,
00140 option_map options = option_map(),
00141 const numbered_state_heap_factory* nshf
00142 = numbered_state_heap_hash_map_factory::instance());
00143
00144
00148 class couvreur99_check: public emptiness_check, public ec_statistics
00149 {
00150 public:
00151 couvreur99_check(const tgba* a,
00152 option_map o = option_map(),
00153 const numbered_state_heap_factory* nshf
00154 = numbered_state_heap_hash_map_factory::instance());
00155 virtual ~couvreur99_check();
00156
00158 virtual emptiness_check_result* check();
00159
00160 virtual std::ostream& print_stats(std::ostream& os) const;
00161
00170 const couvreur99_check_status* result() const;
00171
00172 protected:
00173 couvreur99_check_status* ecs_;
00179 void remove_component(const state* start_delete);
00180
00182 bool poprem_;
00183 };
00184
00189 class couvreur99_check_shy : public couvreur99_check
00190 {
00191 public:
00192 couvreur99_check_shy(const tgba* a,
00193 option_map o = option_map(),
00194 const numbered_state_heap_factory* nshf
00195 = numbered_state_heap_hash_map_factory::instance());
00196 virtual ~couvreur99_check_shy();
00197
00198 virtual emptiness_check_result* check();
00199
00200 protected:
00201 struct successor {
00202 bdd acc;
00203 const spot::state* s;
00204 successor(bdd acc, const spot::state* s): acc(acc), s(s) {}
00205 };
00206
00207
00208
00209
00210
00211
00212 std::stack<bdd> arc;
00213
00214
00215 int num;
00216
00217
00218
00219 typedef std::list<successor> succ_queue;
00220
00221 struct todo_item
00222 {
00223 const state* s;
00224 int n;
00225 succ_queue q;
00226 todo_item(const state* s, int n)
00227 : s(s), n(n)
00228 {
00229 }
00230 };
00231
00232 typedef std::list<todo_item> todo_list;
00233 todo_list todo;
00234
00235 void clear_todo();
00236
00237
00238
00239 bool group_;
00240
00249 virtual int* find_state(const state* s);
00250 };
00251
00252
00254 }
00255
00256 #endif // SPOT_TGBAALGOS_GTEC_GTEC_HH