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