Fix computation of product acceptance conditions, when the
two operands share some acceptance conditions. * src/tgba/tgbaproduct.hh (tgba_product::left_acc_complement_, tgba_product::right_acc_complement_): New attribute. * src/tgba/tgbaproduct.cc (tgba_product::tgba_product): Set them. (tgba_product::succ_iter): Use them. * src/tgba/explpro2.test: New file. * src/tgba/Makefile.am (TESTS): Add it.
This commit is contained in:
parent
8a44ed08ae
commit
7db71d9afe
5 changed files with 61 additions and 8 deletions
|
|
@ -38,10 +38,11 @@ TESTS = \
|
|||
ltlprod.test \
|
||||
bddprod.test \
|
||||
explprod.test \
|
||||
explpro2.test \
|
||||
tripprod.test \
|
||||
mixprod.test \
|
||||
spotlbtt.test \
|
||||
ltlmagic.test
|
||||
ltlmagic.test \
|
||||
spotlbtt.test
|
||||
|
||||
EXTRA_DIST = $(TESTS)
|
||||
|
||||
|
|
|
|||
34
src/tgbatest/explpro2.test
Executable file
34
src/tgbatest/explpro2.test
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./defs
|
||||
|
||||
set -e
|
||||
|
||||
cat >input1 <<EOF
|
||||
acc = p1 p2;
|
||||
s1, s2, !a, p1;
|
||||
s1, s3, !b, p2;
|
||||
EOF
|
||||
|
||||
cat >input2 <<EOF
|
||||
acc = p2 p3;
|
||||
s1, s2, b, p2;
|
||||
s1, s3, a, p3;
|
||||
EOF
|
||||
|
||||
cat >expected <<EOF
|
||||
acc = "p1" "p2" "p3";
|
||||
"s1 * s1", "s2 * s2", ! a b, "p1" "p2";
|
||||
"s1 * s1", "s3 * s3", a ! b, "p2" "p3";
|
||||
EOF
|
||||
|
||||
./explprod input1 input2 > stdout
|
||||
|
||||
# Sort out some possible inversions in the output.
|
||||
# (The order is not guaranteed by SPOT.)
|
||||
sed 's/c a/a c/g;s/b a/a b/g;s/"p3" "p2"/"p2" "p3"/g;s/"p2" "p1"/"p1" "p2"/g' stdout > tmp_ &&
|
||||
mv tmp_ stdout
|
||||
|
||||
cat stdout
|
||||
diff stdout expected
|
||||
rm input1 input2 stdout expected
|
||||
Loading…
Add table
Add a link
Reference in a new issue