20 #ifndef SPOT_TGBAALGOS_SCC_HH
21 # define SPOT_TGBAALGOS_SCC_HH
26 #include "tgba/tgba.hh"
28 #include "misc/hash.hh"
29 #include "misc/bddlt.hh"
66 std::ostream&
dump(std::ostream& out)
const;
73 typedef std::map<unsigned, bdd> succ_type;
74 typedef std::set<bdd, bdd_less_than> cond_set;
88 const tgba* get_aut()
const;
95 unsigned scc_count()
const;
100 unsigned initial()
const;
105 const succ_type& succ(
unsigned n)
const;
112 bool trivial(
unsigned n)
const;
117 bool accepting(
unsigned n)
const;
122 const cond_set& cond_set_of(
unsigned n)
const;
134 bdd ap_set_of(
unsigned n)
const;
142 bdd aprec_set_of(
unsigned n)
const;
147 bdd acc_set_of(
unsigned n)
const;
153 bdd useful_acc_of(
unsigned n)
const;
161 const std::list<const state*>& states_of(
unsigned n)
const;
169 const state* one_state_of(
unsigned n)
const;
174 unsigned scc_of_state(
const state* s)
const;
177 unsigned self_loops()
const;
180 bdd update_supp_rec(
unsigned state);
181 int relabel_component();
186 scc(
int index) : index(index), acc(bddfalse),
187 supp(bddtrue), supp_rec(bddfalse),
188 trivial(
true), useful_acc(bddfalse) {};
220 typedef std::list<scc> stack_type;
222 std::stack<bdd> arc_acc_;
224 std::stack<bdd> arc_cond_;
226 typedef Sgi::hash_map<
const state*, int,
233 typedef std::pair<const spot::state*, tgba_succ_iterator*> pair_state_iter;
234 std::stack<pair_state_iter> todo_;
243 typedef std::vector<scc> scc_map_type;
244 scc_map_type scc_map_;
247 unsigned self_loops_;
251 build_scc_stats(
const tgba* a);
253 build_scc_stats(
const scc_map& m);
255 SPOT_API std::ostream&
256 dump_scc_dot(
const tgba* a, std::ostream& out,
bool verbose =
false);
257 SPOT_API std::ostream&
258 dump_scc_dot(
const scc_map& m, std::ostream& out,
bool verbose =
false);
261 #endif // SPOT_TGBAALGOS_SCC_HH