fix tra_to_tba()

Fixes #324, reported by Tobias Meggendorfer and František Blahoudek.

* spot/twa/acc.hh (rs_pairs_view::paired_with): Rename as...
(rs_pairs_view::paired_with_fin):... this and adjust the code.
* spot/twaalgos/remfin.cc: Use paired_with_fin instead of
paired_with, and do it once per pair.
* tests/core/remfin.test: Add a test case.
* NEWS: Mention the issue.
This commit is contained in:
Alexandre Duret-Lutz 2018-02-16 18:12:42 +01:00
parent 5c39063588
commit e42fea09a7
4 changed files with 34 additions and 14 deletions

View file

@ -1504,6 +1504,27 @@ run 0 autfilt -H --tgba test1 > output
cat output
diff -u output expected-tgba
# Issue #324.
cat > 324 <<EOF
HOA: v1
States: 2
Start: 1
AP: 2 "a" "b"
acc-name: Rabin 3
Acceptance: 6 (Fin(0) & Inf(1)) | (Fin(2) & Inf(3)) | (Fin(4) & Inf(5))
properties: trans-labels explicit-labels trans-acc deterministic
--BODY--
State: 0
[!0&!1] 0 {0 4}
[!0&1] 0 {0 3 4}
[0&!1] 0 {2 5}
[0&1] 0 {1 2 5}
State: 1
[0] 0
--END--
EOF
autfilt --remove-fin 324 > out
test 2 = `autfilt -c --reject-word='a;cycle{!a&!b}' 324 out`
# Add 10 small random automata for the next case
randaut -A'random 6' -Q10 -n10 3 -Hl >> test1