Commit e6a5a743 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

remfin: avoid some loops in SCC that do not intersect any Fin

* src/twaalgos/remfin.cc: Here.
parent d8a1dafa
......@@ -283,12 +283,17 @@ namespace spot
// What to keep and add into the main copy
acc_cond::mark_t main_sets = 0U;
acc_cond::mark_t main_add = 0U;
bool intersects_fin = false;
for (unsigned i = 0; i < cs; ++i)
if (!(m & rem[i]))
{
main_sets |= keep[i];
main_add |= add[i];
}
else
{
intersects_fin = true;
}
trace << "main_sets " << main_sets << "\nmain_add " << main_add << '\n';
// Create the main copy
......@@ -296,7 +301,9 @@ namespace spot
for (auto& t: aut->out(s))
res->new_edge(s, t.dst, t.cond, (t.acc & main_sets) | main_add);
if (si.is_rejecting_scc(n))
// We do not need any other copy if the SCC is non-accepting,
// of if it does not intersect any Fin.
if (!intersects_fin || si.is_rejecting_scc(n))
continue;
// Create clones
......
Markdown is supported
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