Fix acceptance check in scc_map: trivial SCCs are not accepting.
Also compute useless SCCs. * src/tgbaalgos/scc.cc (scc_map::scc::trivial): New field. (scc_stats::useless_scc_map): New field. * src/tgbaalgos/scc.cc (scc_map::build_map): Mark SCCs that are not trivial. (scc_map::accepting): Always return false for trivial SCC. (build_scc_stats): Fill in useless_scc_map.
This commit is contained in:
parent
ac5dda1032
commit
99981153e6
3 changed files with 27 additions and 1 deletions
|
|
@ -77,6 +77,8 @@ namespace spot
|
|||
bool
|
||||
scc_map::accepting(unsigned n) const
|
||||
{
|
||||
if (scc_map_[n].trivial)
|
||||
return false;
|
||||
return acc_set_of(n) == aut_->all_acceptance_conditions();
|
||||
}
|
||||
|
||||
|
|
@ -288,6 +290,8 @@ namespace spot
|
|||
root_.front().succ.insert(succs.begin(), succs.end());
|
||||
root_.front().conds.insert(conds.begin(), conds.end());
|
||||
root_.front().supp &= supp;
|
||||
// This SCC is no longer trivial.
|
||||
root_.front().trivial = false;
|
||||
}
|
||||
|
||||
// recursively update supp_rec
|
||||
|
|
@ -417,6 +421,10 @@ namespace spot
|
|||
res.acc_paths = d.acc_paths[init];
|
||||
res.dead_paths = d.dead_paths[init];
|
||||
|
||||
res.useless_scc_map.reserve(res.scc_total);
|
||||
for (unsigned n = 0; n < res.scc_total; ++n)
|
||||
res.useless_scc_map[n] = !d.acc_paths[n];
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue