gtec.hh
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_TGBAALGOS_GTEC_GTEC_HH
00025 # define SPOT_TGBAALGOS_GTEC_GTEC_HH
00026
00027 #include <stack>
00028 #include "status.hh"
00029 #include "tgbaalgos/emptiness.hh"
00030 #include "tgbaalgos/emptiness_stats.hh"
00031
00032 namespace spot
00033 {
00036
00140 emptiness_check*
00141 couvreur99(const tgba* a,
00142 option_map options = option_map(),
00143 const numbered_state_heap_factory* nshf
00144 = numbered_state_heap_hash_map_factory::instance());
00145
00146
00150 class couvreur99_check: public emptiness_check, public ec_statistics
00151 {
00152 public:
00153 couvreur99_check(const tgba* a,
00154 option_map o = option_map(),
00155 const numbered_state_heap_factory* nshf
00156 = numbered_state_heap_hash_map_factory::instance());
00157 virtual ~couvreur99_check();
00158
00160 virtual emptiness_check_result* check();
00161
00162 virtual std::ostream& print_stats(std::ostream& os) const;
00163
00172 const couvreur99_check_status* result() const;
00173
00174 protected:
00175 couvreur99_check_status* ecs_;
00181 void remove_component(const state* start_delete);
00182
00184 bool poprem_;
00186 unsigned removed_components;
00187 unsigned get_removed_components() const;
00188 unsigned get_vmsize() const;
00189 };
00190
00195 class couvreur99_check_shy : public couvreur99_check
00196 {
00197 public:
00198 couvreur99_check_shy(const tgba* a,
00199 option_map o = option_map(),
00200 const numbered_state_heap_factory* nshf
00201 = numbered_state_heap_hash_map_factory::instance());
00202 virtual ~couvreur99_check_shy();
00203
00204 virtual emptiness_check_result* check();
00205
00206 protected:
00207 struct successor {
00208 bdd acc;
00209 const spot::state* s;
00210 successor(bdd acc, const spot::state* s): acc(acc), s(s) {}
00211 };
00212
00213
00214
00215
00216
00217
00218 std::stack<bdd> arc;
00219
00220
00221 int num;
00222
00223
00224
00225 typedef std::list<successor> succ_queue;
00226
00227
00228 succ_queue::iterator pos;
00229
00230 struct todo_item
00231 {
00232 const state* s;
00233 int n;
00234 succ_queue q;
00235 todo_item(const state* s, int n, couvreur99_check_shy* shy);
00236 };
00237
00238 typedef std::list<todo_item> todo_list;
00239 todo_list todo;
00240
00241 void clear_todo();
00242
00244 void dump_queue(std::ostream& os = std::cerr);
00245
00247 bool group_;
00248
00249
00250 bool group2_;
00251
00252
00253
00254 bool onepass_;
00255
00264 virtual numbered_state_heap::state_index_p find_state(const state* s);
00265 };
00266
00267
00269 }
00270
00271 #endif // SPOT_TGBAALGOS_GTEC_GTEC_HH