scc_filter_states: also remove useless acceptance marks
* src/twaalgos/sccfilter.hh, src/twaalgos/sccfilter.cc (scc_filter_states): Remove useless acceptance marks while preserving state-based acceptance. Add a new argument to specify if all useless mark have to be removed, like for scc_filter. * src/twaalgos/simulation.cc: Use the new parameter. * src/twaalgos/postproc.cc: Likewise. Also call do_scc_filter even after WDBA simplification to cleanup trivial SCCs. Preserve state-based acceptance for weak automata. * src/tests/readsave.test: Add one test. * src/tests/dstar.test, src/tests/prodor.test, src/tests/remfin.test, src/tests/sim3.test, wrap/python/tests/automata.ipynb, wrap/python/tests/piperead.ipynb: Adjust expected output. * NEWS: Mention the change.
This commit is contained in:
parent
2af3678893
commit
cd2e527526
12 changed files with 368 additions and 279 deletions
|
|
@ -244,7 +244,7 @@ digraph G {
|
|||
node [shape="circle"]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label="0", peripheries=2]
|
||||
0 [label="0"]
|
||||
0 -> 1 [label="!a & !b"]
|
||||
0 -> 2 [label="a & !b"]
|
||||
1 [label="1", peripheries=2]
|
||||
|
|
|
|||
|
|
@ -96,15 +96,15 @@ Acceptance: 2 Inf(0) | Inf(1)
|
|||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0 {0 1}
|
||||
State: 0 {1}
|
||||
[0] 1
|
||||
[!0] 2
|
||||
State: 1 {0 1}
|
||||
State: 1 {1}
|
||||
[0&1] 3
|
||||
[!0&1] 4
|
||||
[0&!1] 5
|
||||
[!0&!1] 6
|
||||
State: 2 {0}
|
||||
State: 2
|
||||
[0&1] 3
|
||||
[!0&1] 4
|
||||
[0&!1] 5
|
||||
|
|
|
|||
|
|
@ -700,3 +700,40 @@ diff output3 expect3
|
|||
|
||||
$autfilt -Hk input 2>stderr && exit 1
|
||||
grep 'print_hoa.*k' stderr
|
||||
|
||||
cat >input4 <<EOF
|
||||
HOA: v1
|
||||
States: 3
|
||||
Start: 0
|
||||
AP: 2 "a" "b"
|
||||
Acceptance: 2 Inf(0) & Inf(1)
|
||||
--BODY--
|
||||
State: 0 {0} [0] 1
|
||||
State: 1 {1} [1] 2
|
||||
State: 2 {0 1} [0] 2
|
||||
--END--
|
||||
EOF
|
||||
|
||||
$autfilt -H --small --high input4 >output4
|
||||
cat output4
|
||||
|
||||
cat >expect4<<EOF
|
||||
HOA: v1
|
||||
States: 3
|
||||
Start: 1
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
properties: inherently-weak
|
||||
--BODY--
|
||||
State: 0
|
||||
[1] 2
|
||||
State: 1
|
||||
[0] 0
|
||||
State: 2 {0}
|
||||
[0] 2
|
||||
--END--
|
||||
EOF
|
||||
|
||||
diff output4 expect4
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ State: 6
|
|||
[0] 0
|
||||
[!0] 6
|
||||
State: 7
|
||||
[0] 4 {0}
|
||||
[0] 4
|
||||
[!0] 6
|
||||
State: 8
|
||||
[0] 8 {0}
|
||||
|
|
@ -679,22 +679,22 @@ properties: trans-labels explicit-labels trans-acc
|
|||
State: 0
|
||||
[0&1] 0 {0}
|
||||
[!0&1] 1 {0}
|
||||
[0&!1] 11 {0}
|
||||
[0&!1] 11
|
||||
[!0&!1] 12
|
||||
State: 1
|
||||
[0&1] 0 {0}
|
||||
[!0&1] 1 {0}
|
||||
[0&!1] 11 {0}
|
||||
[0&!1] 11
|
||||
[!0&!1] 12
|
||||
State: 2
|
||||
[!0&1] 2 {0}
|
||||
[0&1] 9
|
||||
[!0&!1] 10 {0}
|
||||
[0&!1] 11 {0}
|
||||
[!0&!1] 10
|
||||
[0&!1] 11
|
||||
State: 3
|
||||
[!0&1] 1 {0}
|
||||
[!0&1] 1
|
||||
[0&1] 3 {0}
|
||||
[0&!1] 11 {0}
|
||||
[0&!1] 11
|
||||
[!0&!1] 12
|
||||
State: 4
|
||||
[!0&1] 4 {0}
|
||||
|
|
@ -706,7 +706,7 @@ State: 5
|
|||
[!0&!1] 10 {0}
|
||||
[0&!1] 12
|
||||
State: 6
|
||||
[!0&1] 4 {0}
|
||||
[!0&1] 4
|
||||
[0&1] 6 {0}
|
||||
[0&!1] 11 {0}
|
||||
[!0&!1] 12
|
||||
|
|
@ -750,23 +750,23 @@ Start: 0
|
|||
AP: 2 "p1" "p0"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[!1] 0
|
||||
[0&1] 2
|
||||
[!0&1] 3
|
||||
State: 1 {0}
|
||||
[!1] 1
|
||||
[1] 2
|
||||
State: 2 {0}
|
||||
[!1] 1
|
||||
[1] 2
|
||||
State: 3 {0}
|
||||
[!1] 0
|
||||
State: 1
|
||||
[!1] 1 {0}
|
||||
[1] 2 {0}
|
||||
State: 2
|
||||
[!1] 1 {0}
|
||||
[1] 2 {0}
|
||||
State: 3
|
||||
[!1] 0 {0}
|
||||
[0&1] 2
|
||||
[!0&1] 3
|
||||
[!0&1] 3 {0}
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 5
|
||||
|
|
@ -782,7 +782,7 @@ State: 1
|
|||
[t] 1 {0}
|
||||
State: 2
|
||||
[!0&1] 0
|
||||
[0] 1 {0}
|
||||
[0] 1
|
||||
[!0&!1] 2 {0}
|
||||
State: 3
|
||||
[1] 0
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ Acceptance: 4 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3))
|
|||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0 {0}
|
||||
State: 0
|
||||
[!1] 1
|
||||
[1] 3
|
||||
State: 1 {1 3}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue