acc: fix detection of generalized-Rabin

Fixes #99.

* src/tests/parseaut.test: New test case.
* src/twa/acc.cc (is_generalized_rabin): Fix detection
of Fin(0)|Fin(1)|Fin(2)&Inf(3).
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2015-07-23 17:53:58 +02:00
parent ed4629a2ad
commit e76596e1bf
3 changed files with 61 additions and 8 deletions

View file

@ -496,12 +496,11 @@ namespace spot
else if (code_[s].op == acc_op::Fin)
{
auto m1 = code_[--s].mark;
if (m1.count() != 1)
return false;
// If we have seen this pair already, it must have the
// same size.
if (p.emplace(m1.max_set(), 0U).first->second != 0U)
return false;
for (auto s: m1.sets())
// If we have seen this pair already, it must have the
// same size.
if (p.emplace(s, 0U).first->second != 0U)
return false;
seen_fin |= m1;
}
else