decompose_scc: factor autfilt into decompose_acc_scc

Put what is done by `autfilt` in a new function, `decompose_acc_scc`.

* bin/autfilt.cc: Move code from here...
* spot/twaalgos/strength.cc, spot/twaalgos/strength.hh: To here.
* tests/python/decompose_scc.py: Test python binding.
This commit is contained in:
Clément Gillard 2017-02-16 15:35:01 +01:00
parent c0eeea2c5f
commit 5d143cc1f8
4 changed files with 79 additions and 14 deletions

View file

@ -49,3 +49,52 @@ except ValueError:
pass
else:
raise AssertionError
assert (spot.decompose_acc_scc(aut, 1).to_str('hoa', '1.1') == """HOA: v1.1
States: 4
Start: 0
AP: 3 "b" "a" "c"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
State: 0
[!1&!2] 0
[1&!2] 1
[2] 2
State: 1
[!1&!2] 0
[1&!2] 1
[!1&2] 2
[1&2] 3
State: 2 {0}
[t] 2
State: 3
[!1] 2
[1] 3
--END--""")
assert (spot.decompose_acc_scc(aut, 2).to_str('hoa', '1.1') == """HOA: v1.1
States: 2
Start: 0
AP: 3 "b" "a" "c"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc !complete
properties: deterministic
--BODY--
State: 0
[!1&!2] 0 {0}
[1&!2] 1
State: 1
[!1&!2] 0 {0}
[1&!2] 1
--END--""")
try:
spot.decompose_acc_scc(aut, 3)
except ValueError:
pass
else:
raise AssertionError