minimize_obligation: can complement the input TGBA if deterministic

This makes dstar2tgba able to produce a minimal WDBA when the input DRA
represent an obligation property.

* src/tgbaalgos/minimize.cc (minimize_obligation): When the
formula is not supplied but the input automaton is deterministic,
complement it to check the result of WDBA minimization.
* src/tgbatest/ltl2dstar.test, src/tgbatest/ltl2dstar2.test: Improve
tests.
This commit is contained in:
Alexandre Duret-Lutz 2013-08-18 00:58:01 +02:00
parent 3b10bb3b8c
commit 2dda2c9122
3 changed files with 53 additions and 41 deletions

View file

@ -37,31 +37,10 @@ dstar2tgba=../../bin/dstar2tgba
$ltlfilt -f 'a U b' -l |
ltl2dstar --ltl2nba=spin:$ltl2tgba@-s - - |
../ltl2tgba -XDB - |
$dstar2tgba --stats '%s %e %t %a %d' |
tee out
cat >expected <<EOF
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="1"]
1 -> 1 [label="a & !b\n"]
1 -> 2 [label="a & !b\n"]
1 -> 3 [label="b\n"]
1 -> 4 [label="b\n"]
2 [label="2"]
2 -> 2 [label="a & !b\n"]
2 -> 4 [label="b\n"]
3 [label="5"]
3 -> 3 [label="1\n"]
3 -> 4 [label="1\n"]
4 [label="6", peripheries=2]
4 -> 4 [label="1\n{Acc[1]}"]
}
EOF
diff expected out
test "`cat out`" = '2 3 7 1 1'
RAB=--automata=rabin
STR=--automata=streett