twa_run: better protection against empty cycles

Fixes #337.

* spot/twaalgos/emptiness.cc, spot/twaalgos/emptiness.hh: Here.
* tests/python/except.py: Test it.
* NEWS: Mention the issue.
This commit is contained in:
Alexandre Duret-Lutz 2018-03-16 17:12:26 +01:00
parent 76d4fe236c
commit a445778cd8
4 changed files with 39 additions and 1 deletions

View file

@ -59,3 +59,19 @@ try:
si.determine_unknown_acceptance()
except RuntimeError as e:
assert "scc_info::determine_unknown_acceptance() does not supp" in str(e)
r = spot.twa_run(aut)
try:
a = r.as_twa()
except RuntimeError as e:
assert "empty cycle" in str(e)
try:
a = r.replay(spot.get_cout())
except RuntimeError as e:
assert "empty cycle" in str(e)
try:
a = r.reduce()
except RuntimeError as e:
assert "empty cycle" in str(e)