autfilt: return with exit code 1 if there is no match
* src/bin/autfilt.cc: Return with exit code 1 if no match found. * src/tgbaalgos/are_isomorphic.cc,src/tgbatest/degenlskip.test src/tgbatest/explpro2.test,src/tgbatest/explpro3.test src/tgbatest/explpro4.test,src/tgbatest/explprod.test src/tgbatest/neverclaimread.test, src/tgbatest/readsave.test src/tgbatest/tripprod.test: Use exit status to check for output emptiness instead of 'test -n'. * src/tgbatest/isomorph.test: Simplify test.
This commit is contained in:
parent
68adcc70fa
commit
b54fe4c035
11 changed files with 48 additions and 140 deletions
|
|
@ -21,116 +21,14 @@
|
|||
|
||||
. ./defs
|
||||
|
||||
set -e
|
||||
for i in `seq 0 4`; do
|
||||
../../bin/randaut a --seed=$i -S4 --hoa >iso$i
|
||||
../../bin/autfilt -F iso$i --randomize --hoa >aut$i
|
||||
done
|
||||
|
||||
../../bin/randaut a b -S10 --hoa >filt
|
||||
|
||||
randomize()
|
||||
{
|
||||
for i in `seq 1 5`
|
||||
do
|
||||
../../bin/autfilt --seed=$i --randomize=$1 -F filt --hoa >> autiso
|
||||
for i in `seq 0 4`; do
|
||||
for j in `seq 0 4`; do
|
||||
exp=$(test $i -eq $j; echo $?)
|
||||
run $exp ../../bin/autfilt -F aut$i -I iso$j
|
||||
done
|
||||
}
|
||||
|
||||
randomize s
|
||||
randomize t
|
||||
randomize
|
||||
|
||||
run 0 ../../bin/autfilt -F autiso --isomorph filt --hoa >out
|
||||
test `grep HOA out | wc -l` -eq 15
|
||||
|
||||
cat >notiso <<EOF
|
||||
HOA: v1
|
||||
States: 10
|
||||
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
|
||||
[0&1] 2
|
||||
State: 1
|
||||
[!0&!1] 2
|
||||
[0&!1] 3
|
||||
[!0&1] 4
|
||||
State: 2
|
||||
[0&1] 5
|
||||
[0&!1] 1
|
||||
State: 3
|
||||
[!0&!1] 5
|
||||
[!0&!1] 1
|
||||
[!0&1] 0
|
||||
[0&!1] 6
|
||||
State: 4
|
||||
[0&1] 5
|
||||
[0&1] 0
|
||||
[!0&1] 7
|
||||
State: 5
|
||||
[0&1] 5
|
||||
[!0&1] 8
|
||||
State: 6
|
||||
[0&1] 9
|
||||
State: 7
|
||||
[0&!1] 9
|
||||
[0&1] 1
|
||||
State: 8
|
||||
[!0&1] 8
|
||||
[0&!1] 5
|
||||
State: 9
|
||||
[!0&!1] 5
|
||||
[!0&1] 8
|
||||
--END--
|
||||
EOF
|
||||
|
||||
cat >>notiso <<EOF
|
||||
HOA: v1
|
||||
States: 10
|
||||
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
|
||||
State: 1
|
||||
[!0&1] 2
|
||||
[!0&1] 3
|
||||
[!0&1] 4
|
||||
[!0&1] 5
|
||||
[!0&1] 6
|
||||
State: 2
|
||||
[0&1] 7
|
||||
[!0&1] 0
|
||||
State: 3
|
||||
[!0&!1] 0
|
||||
[!0&1] 6
|
||||
[0&!1] 8
|
||||
State: 4
|
||||
[!0&1] 3
|
||||
[!0&!1] 9
|
||||
[!0&!1] 0
|
||||
State: 5
|
||||
[0&1] 0
|
||||
State: 6
|
||||
[!0&!1] 9
|
||||
State: 7
|
||||
[0&!1] 0
|
||||
[!0&1] 7
|
||||
[!0&!1] 6
|
||||
State: 8
|
||||
[0&1] 6
|
||||
[!0&!1] 1
|
||||
[!0&!1] 0
|
||||
State: 9
|
||||
[0&!1] 7
|
||||
[!0&1] 2
|
||||
[0&1] 1
|
||||
--END--
|
||||
EOF
|
||||
|
||||
run 0 ../../bin/autfilt -F notiso --isomorph filt --hoa >out
|
||||
test `grep HOA out | wc -l` -eq 0 || exit 1
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue