merge transitions: also merge transitions with same conditions
* src/tgba/tgbagraph.cc (merge_transition): Do it. * src/tgbatest/readsave.test: Test it. * src/bin/autfilt.cc: Fix statistics about the original automaton when using --stats or --name.
This commit is contained in:
parent
b8a38915e5
commit
8e9c431706
3 changed files with 192 additions and 1 deletions
|
|
@ -126,3 +126,147 @@ cat >expected <<EOF
|
|||
<Fb U G!a, 3 states>, 7, 1
|
||||
EOF
|
||||
diff output expected
|
||||
|
||||
|
||||
cat >input <<EOF
|
||||
HOA: v1
|
||||
States: 10
|
||||
Start: 0
|
||||
AP: 1 "a"
|
||||
acc-name: generalized-Buchi 3
|
||||
Acceptance: 3 Inf(0)&Inf(1)&Inf(2)
|
||||
properties: trans-labels explicit-labels trans-acc
|
||||
--BODY--
|
||||
State: 0
|
||||
[t] 0 {0}
|
||||
[!0] 1 {0}
|
||||
[!0] 2 {0}
|
||||
[0] 3 {0}
|
||||
[0] 3 {0 2}
|
||||
[!0] 2 {0 2}
|
||||
[!0] 4 {1}
|
||||
[!0] 5 {1}
|
||||
[!0] 6 {1}
|
||||
[!0] 6 {1 2}
|
||||
[!0] 7 {1}
|
||||
[!0] 8 {1}
|
||||
[!0] 9 {1}
|
||||
[!0] 9 {1 2}
|
||||
[!0] 4 {0 1}
|
||||
[!0] 5 {0 1}
|
||||
[!0] 6 {0 1}
|
||||
[!0] 6 {0 1 2}
|
||||
[!0] 7 {0 1}
|
||||
[!0] 8 {0 1}
|
||||
[!0] 9 {0 1}
|
||||
[!0] 9 {0 1 2}
|
||||
State: 1
|
||||
[0] 3 {0 2}
|
||||
State: 2
|
||||
[!0] 2 {0 2}
|
||||
[!0] 6 {1 2}
|
||||
[!0] 9 {1 2}
|
||||
[!0] 6 {0 1 2}
|
||||
[!0] 9 {0 1 2}
|
||||
State: 3
|
||||
[!0] 1 {0 2}
|
||||
[!0] 2 {0}
|
||||
[0] 3 {0 2}
|
||||
[!0] 2 {0 2}
|
||||
[!0] 5 {1 2}
|
||||
[!0] 6 {1}
|
||||
[!0] 6 {1 2}
|
||||
[!0] 8 {1 2}
|
||||
[!0] 9 {1}
|
||||
[!0] 9 {1 2}
|
||||
[!0] 5 {0 1 2}
|
||||
[!0] 6 {0 1}
|
||||
[!0] 6 {0 1 2}
|
||||
[!0] 8 {0 1 2}
|
||||
[!0] 9 {0 1}
|
||||
[!0] 9 {0 1 2}
|
||||
State: 4
|
||||
[!0] 4 {1}
|
||||
[!0] 5 {1}
|
||||
[!0] 6 {1}
|
||||
[!0] 6 {1 2}
|
||||
[!0] 7
|
||||
[!0] 8
|
||||
[!0] 9
|
||||
[!0] 9 {2}
|
||||
[!0] 7 {1}
|
||||
[!0] 8 {1}
|
||||
[!0] 9 {1}
|
||||
[!0] 9 {1 2}
|
||||
State: 5
|
||||
State: 6
|
||||
[!0] 6 {1 2}
|
||||
[!0] 9 {2}
|
||||
[!0] 9 {1 2}
|
||||
State: 7
|
||||
[0] 0 {0}
|
||||
[0] 3 {0}
|
||||
[0] 3 {0 2}
|
||||
State: 8
|
||||
[0] 3 {0 2}
|
||||
State: 9
|
||||
--END--
|
||||
EOF
|
||||
|
||||
cat >expected <<EOF
|
||||
HOA: v1
|
||||
name: "63->32 edges, 64->33 transitions"
|
||||
States: 10
|
||||
Start: 0
|
||||
AP: 1 "a"
|
||||
acc-name: generalized-Buchi 3
|
||||
Acceptance: 3 Inf(0)&Inf(1)&Inf(2)
|
||||
properties: trans-labels explicit-labels
|
||||
--BODY--
|
||||
State: 0
|
||||
[t] 0 {0}
|
||||
[!0] 1 {0}
|
||||
[!0] 2 {0 2}
|
||||
[0] 3 {0 2}
|
||||
[!0] 4 {0 1}
|
||||
[!0] 5 {0 1}
|
||||
[!0] 6 {0 1 2}
|
||||
[!0] 7 {0 1}
|
||||
[!0] 8 {0 1}
|
||||
[!0] 9 {0 1 2}
|
||||
State: 1 {0 2}
|
||||
[0] 3
|
||||
State: 2
|
||||
[!0] 2 {0 2}
|
||||
[!0] 6 {0 1 2}
|
||||
[!0] 9 {0 1 2}
|
||||
State: 3
|
||||
[!0] 1 {0 2}
|
||||
[!0] 2 {0 2}
|
||||
[0] 3 {0 2}
|
||||
[!0] 5 {0 1 2}
|
||||
[!0] 6 {0 1 2}
|
||||
[!0] 8 {0 1 2}
|
||||
[!0] 9 {0 1 2}
|
||||
State: 4
|
||||
[!0] 4 {1}
|
||||
[!0] 5 {1}
|
||||
[!0] 6 {1 2}
|
||||
[!0] 7 {1}
|
||||
[!0] 8 {1}
|
||||
[!0] 9 {1 2}
|
||||
State: 5
|
||||
State: 6 {1 2}
|
||||
[!0] 6
|
||||
[!0] 9
|
||||
State: 7
|
||||
[0] 0 {0}
|
||||
[0] 3 {0 2}
|
||||
State: 8 {0 2}
|
||||
[0] 3
|
||||
State: 9
|
||||
--END--
|
||||
EOF
|
||||
|
||||
$autfilt --merge -Hm input --name="%E->%e edges, %T->%t transitions" > output
|
||||
diff output expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue