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
bdd acc
Definition: scc.hh:193
An Equivalence Relation for state*.
Definition: state.hh:139
std::vector< bool > useless_scc_map
A map of the useless SCCs.
Definition: scc.hh:59
succ_type succ
Successor SCC.
Definition: scc.hh:203
Abstract class for states.
Definition: state.hh:40
unsigned acc_paths
Definition: scc.hh:51
bdd useful_acc
Set of acceptance combinations used in the SCC.
Definition: scc.hh:216
cond_set conds
Set of conditions used in the SCC.
Definition: scc.hh:197
bdd useful_acc
Definition: scc.hh:64
Hash Function for state*.
Definition: state.hh:164
A Transition-based Generalized Büchi Automaton.
Definition: tgba.hh:67
SPOT_API std::ostream & dump(std::ostream &os, const formula *f)
Dump a formula tree.
unsigned dead_paths
Definition: scc.hh:55
unsigned scc_total
Total number of SCCs.
Definition: scc.hh:37
bdd supp_rec
Conjunction of atomic propositions used in the SCC.
Definition: scc.hh:201
unsigned dead_scc
Definition: scc.hh:44
bool trivial
Trivial SCC have one state and no self-loops.
Definition: scc.hh:205
unsigned acc_scc
Total number of accepting SCC.
Definition: scc.hh:39
std::list< const state * > states
States of the component.
Definition: scc.hh:195
bdd supp
Conjunction of atomic propositions used in the SCC.
Definition: scc.hh:199
Build a map of Strongly Connected components in in a TGBA.
Definition: scc.hh:70