decompose: merge decompose_strength() and decompose_scc()
These two functions were doing almost identical work, the only difference was the way to select the SCC to keep. Now we have a more uniform way to do that. Closes #172. * bin/autfilt.cc: Offer a unique --decompose-scc option, but keep --decompose-strength as an alias for backward compatibility. * spot/twaalgos/strength.cc, spot/twaalgos/strength.hh: Rename decompose_strength as decompose_scc, and handle a way to list all SCC numers in the string specifier. This gets rid of the nearly identical * tests/core/scc.test, tests/core/strength.test, tests/python/decompose.ipynb, tests/python/decompose_scc.py: Adjust test cases. * NEWS: Adjust.
This commit is contained in:
parent
fba3c78206
commit
09e47d648a
8 changed files with 453 additions and 294 deletions
|
|
@ -44,6 +44,7 @@ AP: 2 "a" "b"
|
|||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
properties: terminal
|
||||
--BODY--
|
||||
State: 0
|
||||
[1] 1
|
||||
|
|
@ -53,7 +54,7 @@ State: 1 {0}
|
|||
--END--
|
||||
EOF
|
||||
|
||||
run 0 autfilt --decompose-scc=0 -F aut> out
|
||||
run 0 autfilt --decompose-scc=a0 aut> out
|
||||
cat out
|
||||
diff out ref
|
||||
|
||||
|
|
@ -65,20 +66,23 @@ AP: 2 "a" "b"
|
|||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc colored
|
||||
properties: deterministic
|
||||
properties: deterministic weak
|
||||
--BODY--
|
||||
State: 0 {0}
|
||||
[0&!1] 0
|
||||
--END--
|
||||
EOF
|
||||
|
||||
run 0 autfilt --decompose-scc=1 -F aut> out
|
||||
cat out
|
||||
run 0 autfilt --decompose-scc=a1 aut> out
|
||||
diff out ref
|
||||
|
||||
autfilt --decompose-scc=2 -F aut 2>stderr && exit 1
|
||||
autfilt --decompose-scc=a2 aut 2>stderr && exit 1
|
||||
[ $? -eq 2 ]
|
||||
grep "out of bounds" stderr
|
||||
grep "no SCC 'a2'" stderr
|
||||
|
||||
autfilt --decompose-scc=2 aut 2>stderr && exit 1
|
||||
[ $? -eq 2 ]
|
||||
grep "no SCC 2" stderr
|
||||
|
||||
# always satisfied acceptance
|
||||
ltl2tgba 'Ga R b | Gc R b' > aut
|
||||
|
|
@ -90,7 +94,7 @@ Start: 0
|
|||
AP: 3 "b" "a" "c"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc
|
||||
properties: trans-labels explicit-labels state-acc weak
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 0
|
||||
|
|
@ -100,7 +104,7 @@ State: 1 {0}
|
|||
--END--
|
||||
EOF
|
||||
|
||||
run 0 autfilt --decompose-scc=1 -F aut> out
|
||||
run 0 autfilt --decompose-scc=a1 -F aut> out
|
||||
cat out
|
||||
diff out ref
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue