acc: fix maybe_accepting() on Fin(x)|Fin(y)|Fin(z)

Fixes #271, reported by Henrich Lauko.

* spot/twa/acc.cc (maybe_accepting): Fix handling in case
of disjunction of Fin.
* tests/core/scc.test, tests/python/accparse2.py: Add more
tests.
This commit is contained in:
Alexandre Duret-Lutz 2017-06-21 16:03:17 +02:00
parent fc609057d6
commit 20df3b4e98
3 changed files with 42 additions and 4 deletions

View file

@ -255,12 +255,12 @@ namespace spot
case acc_cond::acc_op::Inf:
return (pos[-1].mark & infinitely_often) == pos[-1].mark;
case acc_cond::acc_op::Fin:
if (pos[-1].mark & always_present)
if ((pos[-1].mark & always_present) == pos[-1].mark)
return false;
else if (pos[-1].mark & infinitely_often)
return trival::maybe();
else
else if ((pos[-1].mark & infinitely_often) != pos[-1].mark)
return true;
else
return trival::maybe();
case acc_cond::acc_op::FinNeg:
case acc_cond::acc_op::InfNeg:
SPOT_UNREACHABLE();