acc: introduce inf_unit()

* spot/twa/acc.cc, spot/twa/acc.hh: Here.
* tests/python/setacc.py: Test it.
This commit is contained in:
Alexandre Duret-Lutz 2021-09-08 16:44:57 +02:00
parent 4ed5160fb8
commit cb1f6b1239
3 changed files with 77 additions and 0 deletions

View file

@ -106,3 +106,20 @@ assert acc == spot.acc_cond('Inf(0)')
acc = spot.translate('b').get_acceptance()
collect()
assert acc == spot.acc_code('Inf(0)')
c = spot.acc_cond('Fin(0)&Fin(1)&(Inf(2)|Fin(3))')
m1 = c.fin_unit()
m2 = c.inf_unit()
assert m1 == [0,1]
assert m2 == []
c = spot.acc_cond('Inf(0)&Inf(1)&(Inf(2)|Fin(3))')
m1 = c.fin_unit()
m2 = c.inf_unit()
assert m1 == []
assert m2 == [0,1]
c = spot.acc_cond('Inf(0)&Inf(1)|(Inf(2)|Fin(3))')
m1 = c.fin_unit()
m2 = c.inf_unit()
assert m1 == []
assert m2 == []