diff --git a/ChangeLog b/ChangeLog index 0ccc521e2..e3c9cd5cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-09-18 Alexandre Duret-Lutz + + Optimize previous patch. + + * src/tgbaalgos/scc.hh (scc_map::scc::supp_rec): Initialize to + bddfalse, since this cannot occur in reallife. + * src/tgbaalgos/scc.cc (scc_map::update_supp_rec): Adjust. + 2009-09-17 Alexandre Duret-Lutz Have scc_map keep track of APs that are reachable from a SCC. diff --git a/src/tgbaalgos/scc.cc b/src/tgbaalgos/scc.cc index 04de57857..18ceb5523 100644 --- a/src/tgbaalgos/scc.cc +++ b/src/tgbaalgos/scc.cc @@ -112,15 +112,15 @@ namespace spot bdd& res = scc_map_[state].supp_rec; - if (res == bddtrue) + if (res == bddfalse) { const succ_type& s = succ(state); succ_type::const_iterator it; + res = scc_map_[state].supp; + for (it = s.begin(); it != s.end(); ++it) res &= update_supp_rec(it->first); - - res &= scc_map_[state].supp; } return res; diff --git a/src/tgbaalgos/scc.hh b/src/tgbaalgos/scc.hh index 3c050d9fc..acd3e3970 100644 --- a/src/tgbaalgos/scc.hh +++ b/src/tgbaalgos/scc.hh @@ -150,7 +150,7 @@ namespace spot { public: scc(int index) : index(index), acc(bddfalse), - supp(bddtrue), supp_rec(bddtrue) {}; + supp(bddtrue), supp_rec(bddfalse) {}; /// Index of the SCC. int index; /// The union of all acceptance conditions of transitions which