Speedup is_weak_scc() if all transitions in the SCC are accepting.

* src/tgbaalgos/isweakscc.cc, src/tgbaalgos/isweakscc.hh: Speedup when
all transitions are accepting.
This commit is contained in:
Alexandre Duret-Lutz 2012-09-21 15:09:08 +02:00
parent d228784c39
commit 3c17c418a2
2 changed files with 9 additions and 3 deletions

View file

@ -71,6 +71,10 @@ namespace spot
// If no cycle is accepting, the SCC is weak.
if (!map.accepting(scc))
return true;
// If all transitions use all acceptance conditions, the SCC is weak.
if (map.useful_acc_of(scc) ==
bdd_support(map.get_aut()->neg_acceptance_conditions()))
return true;
// If the SCC is accepting, but one cycle is not, the SCC is not
// weak.
weak_checker w(map);