autfilt: add a --product option

* src/bin/autfilt.cc: Implement the --product option.
* src/tgbatest/explprod.cc, src/tgbatest/tripprod.cc: Delete.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/explpro2.test, src/tgbatest/explpro3.test,
src/tgbatest/explpro4.test, src/tgbatest/explprod.test,
src/tgbatest/tripprod.test: Rewrite using autfilt --product.
This commit is contained in:
Alexandre Duret-Lutz 2014-12-07 12:35:26 +01:00
parent 3e266a2a6c
commit 8014833ae3
9 changed files with 295 additions and 211 deletions

View file

@ -27,24 +27,57 @@
set -e
cat >input1 <<EOF
acc = ;
s1, s2, "!a",;
s1, s3, "!b",;
HOA: v1
States: 3
Start: 0
AP: 2 "a" "b"
acc-name: all
Acceptance: 0 t
properties: trans-labels explicit-labels state-acc
--BODY--
State: 0
[!0] 1
[!1] 2
State: 1
State: 2
--END--
EOF
cat >input2 <<EOF
acc = p2 p3;
s1, s2, "b", p2;
s1, s3, "a", p3;
HOA: v1
States: 3
Start: 0
AP: 2 "b" "a"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
properties: trans-labels explicit-labels trans-acc
--BODY--
State: 0
[0] 1 {0}
[1] 2 {1}
State: 1
State: 2
--END--
EOF
cat >expected <<EOF
acc = "0" "1";
"0 * 0", "1 * 1", "!a & b", "0";
"0 * 0", "2 * 2", "a & !b", "1";
HOA: v1
States: 3
Start: 0
AP: 2 "b" "a"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
properties: trans-labels explicit-labels trans-acc deterministic
--BODY--
State: 0
[0&!1] 1 {0}
[!0&1] 2 {1}
State: 1
State: 2
--END--
EOF
run 0 ../explprod input1 input2 |
sed 's/"p3" "p2"/"p2" "p3"/g' | tee stdout
run 0 ../../bin/autfilt input1 --product input2 --hoa | tee stdout
# FIXME: Use are-isomorphic
diff stdout expected
rm input1 input2 stdout expected