degen: learn to work on generalized-Co-Büchi as well
* spot/twaalgos/degen.hh, spot/twaalgos/degen.cc: Adjust degeneralize() and degeneralize_tba() to work on generalized-co-Büchi. * NEWS: Mention this. * spot/twaalgos/cobuchi.hh, spot/twaalgos/cobuchi.cc (to_nca): Use degeneralization on generalized-co-Büchi. * spot/twaalgos/postproc.cc: Use degeneralization for generalized co-Büchi as well. * bin/autfilt.cc: Improve chain products of co-Büchi automata by using generalization if too many colors are needed. * tests/core/prodchain.test, tests/python/pdegen.py: Add test cases.
This commit is contained in:
parent
fe3ebd370b
commit
bdac53511a
9 changed files with 169 additions and 81 deletions
|
|
@ -26,9 +26,7 @@ shift
|
|||
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 \
|
||||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42; do
|
||||
ltl2tgba "{a[*$i]}[]->GFb" > $i.hoa
|
||||
done
|
||||
for i in *.hoa; do
|
||||
set x "$@" --product $i
|
||||
set x "$@" --product $i.hoa
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
|
@ -41,8 +39,9 @@ test "4,7,16,1" = `autfilt --stats=%s,%e,%t,%a result`
|
|||
|
||||
set x
|
||||
shift
|
||||
for i in *.hoa; do
|
||||
set x "$@" --product-or $i
|
||||
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 \
|
||||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42; do
|
||||
set x "$@" --product-or $i.hoa
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
|
@ -55,28 +54,30 @@ shift
|
|||
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 \
|
||||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42; do
|
||||
ltl2tgba -D --cobuchi -S "{a[*$i]}<>->FGb" > $i.hoa
|
||||
done
|
||||
for i in *.hoa; do
|
||||
set x "$@" --product $i
|
||||
set x "$@" --product $i.hoa
|
||||
shift
|
||||
done
|
||||
shift
|
||||
autfilt -D --cobuchi --low -S "$@" > result
|
||||
test "85,170,174,1" = `autfilt --stats=%s,%e,%t,%a result`
|
||||
autfilt --cobuchi --high -D -S "$@" > result
|
||||
test "44,47,92,1" = `autfilt --stats=%s,%e,%t,%a result`
|
||||
|
||||
: > stats
|
||||
set x
|
||||
shift
|
||||
for i in *.hoa; do
|
||||
set x "$@" --product-or $i
|
||||
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 \
|
||||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42; do
|
||||
ltl2tgba -D --cobuchi "{a[*$i]}<>->FGb" > $i.hoa
|
||||
set x "$@" --product-or $i.hoa
|
||||
shift
|
||||
test $i -eq 1 && shift # remove the first --product
|
||||
test 2,3,6,1 = `autfilt --high --small --cobuchi "$@" --stats=%s,%e,%t,%a`
|
||||
test 3,5,10,1 = \
|
||||
`autfilt --high --small --cobuchi "$@" | autfilt -S --stats=%s,%e,%t,%a`
|
||||
done
|
||||
shift
|
||||
|
||||
if [ $MAX_ACCSETS -eq 32 ]; then
|
||||
autfilt --cobuchi -S "$@" 2> error && exit 1
|
||||
autfilt "$@" 2> error && exit 1
|
||||
grep 'Too many acceptance sets used' error
|
||||
fi
|
||||
# FIXME: implement degeneralization for generalized-co-Büchi
|
||||
# autfilt --cobuchi --low -S "$@" > result
|
||||
# test "45,89,180,1" = `autfilt --stats=%s,%e,%t,%a result`
|
||||
|
||||
true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue