postproc: option to wdba-minimize only when sure

Fixes #15.

* spot/twaalgos/minimize.hh, spot/twaalgos/minimize.cc
(minimize_obligation_garanteed_to_work): New function.
* spot/twaalgos/postproc.hh, spot/twaalgos/postproc.cc: Use it if
wdba-minimize=1.  Handle new default for wdba-minimize.
* NEWS, bin/spot-x.cc: Document those changes.
* tests/core/ltl2tgba2.test: Add some test cases.
* tests/core/genltl.test: Improve expected results.
This commit is contained in:
Alexandre Duret-Lutz 2020-05-21 15:42:05 +02:00
parent 8744751ec0
commit 64aee87d76
8 changed files with 79 additions and 22 deletions

View file

@ -132,12 +132,12 @@ genltl --kr-n2=1..2 --kr-nlogn=1..2 --kr-n=1..2 --gxf-and=0..3 --fxg-or=0..3 \
--pps-arbiter-standard=2..3 --pps-arbiter-strict=2..3 --format=%F=%L,%f |
ltl2tgba --low --det -F-/2 --stats='%<,%s' > out
cat >exp<<EOF
kv-psi=1,15
kv-psi=2,106
kr-nlogn=1,19
kr-nlogn=2,147
kr-n=1,12
kr-n=2,82
kv-psi=1,10
kv-psi=2,24
kr-nlogn=1,16
kr-nlogn=2,44
kr-n=1,10
kr-n=2,25
gxf-and=0,1
gxf-and=1,1
gxf-and=2,1

View file

@ -458,4 +458,15 @@ res=`ltl2tgba -D -G 'X((Fa & Fb & Fc & Fd) ^ GFe)' --stats='%s %g'`
test "$res" = "17 (Inf(0)&Inf(1)) | (Fin(0) & Fin(1))"
ltlcross 'ltl2tgba -D -G' 'ltl2tgba -G' -f '(Fa & Fb & Fc & Fd) ^ GFe'
f='G(p1 | G!p0) M Xp1'
test "6,1" = `ltl2tgba "$f" --stats=%s,%d`
test "6,0" = `ltl2tgba -x wdba-minimize=2 "$f" --stats=%s,%d`
test "6,0" = `ltl2tgba -x wdba-minimize=0 "$f" --stats=%s,%d`
test "6,0" = `ltl2tgba --med "$f" --stats=%s,%d`
f='X((p1 & Xp1) M Fp1)'
test "4,1" = `ltl2tgba -D "$f" --stats=%s,%d`
test "4,1" = `ltl2tgba -D -x wdba-minimize=2 "$f" --stats=%s,%d`
test "4,0" = `ltl2tgba -D -x wdba-minimize=0 "$f" --stats=%s,%d`
test "4,1" = `ltl2tgba -D --med "$f" --stats=%s,%d`
: