autfilt add support for --partial-degeneralize
* bin/autfilt.cc: Add a --partial-degeneralize option. * NEWS: Mention it. * spot/twaalgos/degen.cc: Do not restrict partial_degeneralize() to deterministic automata. * spot/twaalgos/degen.hh: Adjust documentation. * tests/core/pdegen.test: New test case. * tests/Makefile.am: Add it. * tests/python/pdegen.py: Adjust.
This commit is contained in:
parent
bf42b19eff
commit
b5e464e05a
7 changed files with 94 additions and 45 deletions
|
|
@ -144,10 +144,14 @@ State: 3 "2#0"
|
|||
|
||||
assert spot.is_partially_degeneralizable(de) == []
|
||||
|
||||
df = spot.partial_degeneralize(f, [0, 1])
|
||||
df.equivalent_to(f)
|
||||
assert str(df.acc()) == '(1, Fin(0))'
|
||||
|
||||
try:
|
||||
df = spot.partial_degeneralize(f, [0, 1])
|
||||
df = spot.partial_degeneralize(f, [0, 1, 2])
|
||||
except RuntimeError as e:
|
||||
assert 'partial_degeneralize(): {0,1} does not' in str(e)
|
||||
assert 'partial_degeneralize(): {0,1,2} does not' in str(e)
|
||||
else:
|
||||
raise RuntimeError("missing exception")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue