Fix a bug in spot.complete()

spot.complete() could complete an empty co-Büchi automaton into an
automaton accepting everything.

* NEWS: Document it
* spot/twaalgos/complete.cc: Fix it
* tests/core/complete.test, tests/core/prodor.test: Test it
This commit is contained in:
Maximilien Colange 2017-08-28 17:15:10 +02:00
parent eb91ecf66f
commit 1b2f2a79c1
4 changed files with 59 additions and 7 deletions

View file

@ -24,6 +24,32 @@ set -e
ltl2tgba=ltl2tgba
autfilt=autfilt
# Two empty automata
cat >a1.hoa <<EOF
HOA: v1
States: 1
Start: 0
AP: 1 "a"
Acceptance: 1 Fin(0)
--BODY--
State: 0
--END--
EOF
cat >a2.hoa <<EOF
HOA: v1
States: 1
Start: 0
AP: 1 "a"
Acceptance: 0 f
--BODY--
State: 0
[t] 0
--END--
EOF
# the OR product of two empty automata should be empty
$autfilt --product-or a1.hoa a2.hoa -H | $autfilt --is-empty
$ltl2tgba -DH 'GFa' > gfa.hoa
$ltl2tgba -DH 'FGb' > fgb.hoa
$autfilt --product-or gfa.hoa fgb.hoa -H > por.hoa