Commit 3d5b5be6 authored by Alexandre GBAGUIDI AISSE's avatar Alexandre GBAGUIDI AISSE
Browse files

cobuchi: nsa_to_nca() takes is_useful_scc() into account

* spot/twaalgos/cobuchi.cc: Add scc_info_options::TRACK_SUCCS in
nsa_to_nca().
* spot/twaalgos/sccinfo.cc: Add scc_info_options::TRACK_SUCCS and
is_useful_scc() in states_on_acc_cycle_of().
parent 81af8359
......@@ -219,7 +219,8 @@ namespace spot
named_states_(named_states),
res_(aug_subset_cons(ref_prod, ref_power, named_states_, pmap_)),
res_map_(res_->get_named_prop<product_states>("product-states")),
si_(scc_info(res_, scc_info_options::TRACK_STATES)),
si_(scc_info(res_, scc_info_options::TRACK_STATES
| scc_info_options::TRACK_SUCCS)),
nb_states_(res_->num_states()),
was_rabin_(was_rabin),
orig_num_st_(orig_num_st)
......
......@@ -559,7 +559,7 @@ namespace spot
std::vector<unsigned>& res,
std::vector<unsigned>& old) const
{
if (!is_rejecting_scc(scc))
if (is_useful_scc(scc) && !is_rejecting_scc(scc))
{
acc_cond::mark_t all_acc = acc_sets_of(scc);
acc_cond::mark_t fin = all_fin & all_acc;
......@@ -584,7 +584,8 @@ namespace spot
for (unsigned i = 0; i < orig_sts->size(); ++i)
(*orig_sts)[i] = old[(*orig_sts)[i]];
scc_info si_tmp(aut, scc_info_options::TRACK_STATES);
scc_info si_tmp(aut, scc_info_options::TRACK_STATES
| scc_info_options::TRACK_SUCCS);
unsigned scccount_tmp = si_tmp.scc_count();
for (unsigned scc_tmp = 0; scc_tmp < scccount_tmp; ++scc_tmp)
si_tmp.states_on_acc_cycle_of_rec(scc_tmp, all_fin, all_inf,
......@@ -608,7 +609,7 @@ namespace spot
unsigned nb_pairs = pairs.size();
std::vector<unsigned> res;
if (!is_rejecting_scc(scc))
if (is_useful_scc(scc) && !is_rejecting_scc(scc))
{
std::vector<unsigned> old;
unsigned nb_states = aut_->num_states();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment