dbacomp: connect only back-links and generalize to tgba

* src/tgbaalgos/dbacomp.cc: Here.
* src/tgbaalgos/dbacomp.hh: Adjust documentation.
* src/tgbatest/dbacomp.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
* src/tgbatest/det.test: Update.
This commit is contained in:
Alexandre Duret-Lutz 2013-02-03 00:16:32 +01:00
parent 63b7cdb6c8
commit 78e76eb07d
5 changed files with 140 additions and 35 deletions

View file

@ -69,6 +69,7 @@ acc = "1";
"3", "1", "!a",;
EOF
# FIXME: we should improve this output
cat >ex.tgba <<'EOF'
acc = "1";
"1", "2", "a",;
@ -76,13 +77,35 @@ acc = "1";
"1", "-1", "!a",;
"2", "3", "a",;
"2", "1", "!a",;
"2", "-1", "!a",;
"-1", "-1", "!a", "1";
"3", "3", "a",;
"3", "-3", "a",;
"3", "1", "!a",;
"3", "-1", "!a",;
"-3", "-3", "a", "1";
"-3", "-1", "!a", "1";
EOF
run 0 ../ltl2tgba -b -DC -X in.tgba > out.tgba
cmp out.tgba ex.tgba
diff out.tgba ex.tgba
run 0 ../ltl2tgba -x -DC 'GFa & XGFb' > out.tgba
cat >ex.tgba <<EOF
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="1"]
1 -> 2 [label="1\n"]
2 [label="2"]
2 -> 2 [label="1\n"]
2 -> 3 [label="!a\n"]
2 -> 4 [label="!b\n"]
3 [label="-4"]
3 -> 3 [label="!a\n{Acc[1]}"]
4 [label="-3"]
4 -> 4 [label="!b\n{Acc[1]}"]
}
EOF
diff out.tgba ex.tgba