randaut: rename -S as -Q for consistency
This way -S means --state-based-acc like with other tools producing automata. This fixes #82. * src/bin/randaut.cc: Rename -S as -Q, rename --state-acc as --state-based-acc (with --sbacc as a synonym), and declare -S as the short version of --state-based-acc. * doc/org/autfilt.org, doc/org/oaut.org, doc/org/randaut.org, src/tests/isomorph.test, src/tests/randaut.test, src/tests/randtgba.test, src/tests/readsave.test, src/tests/uniq.test, wrap/python/tests/randaut.ipynb: Adjust all calls to randaut.
This commit is contained in:
parent
a6ef24567e
commit
0ac35a1591
10 changed files with 89 additions and 89 deletions
|
|
@ -23,11 +23,11 @@
|
|||
set -e
|
||||
|
||||
for i in 0 1 2; do
|
||||
../../bin/randaut a b --seed=$i -S10 --hoa >iso$i
|
||||
../../bin/randaut a b --seed=$i -Q10 --hoa >iso$i
|
||||
../../bin/autfilt iso$i --randomize --hoa >aut$i
|
||||
done
|
||||
for i in 3 4 5; do
|
||||
../../bin/randaut a b --seed=$i -S10 -D --hoa >iso$i
|
||||
../../bin/randaut a b --seed=$i -Q10 -D --hoa >iso$i
|
||||
../../bin/autfilt iso$i --randomize --hoa >aut$i
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ set -e
|
|||
randaut=../../bin/randaut
|
||||
autfilt=../../bin/autfilt
|
||||
|
||||
$randaut --spin -S4 a b | ../ltl2tgba -H -XN - >out
|
||||
$randaut --spin -Q4 a b | ../ltl2tgba -H -XN - >out
|
||||
grep 'States: 4' out
|
||||
grep 'AP: 2' out
|
||||
grep 'state-acc' out
|
||||
grep 'Acceptance: 1' out
|
||||
|
||||
$randaut -n 3 --hoa -S5..9 -A1..3 3 >out
|
||||
$randaut -n 3 --hoa -Q5..9 -A1..3 3 >out
|
||||
test `grep -c 'States: [5-9]$' out` = 3
|
||||
test `grep -c 'Acceptance: [1-3] ' out` = 3
|
||||
test `grep -c 'AP: 3 ' out` = 3
|
||||
|
|
@ -72,8 +72,8 @@ diff out2 expected
|
|||
$randaut -n 5 --dot=@ a 2>stderr && exit 1
|
||||
grep 'randaut: unknown option.*@' stderr
|
||||
|
||||
$randaut -n -1 -S2 2 -H | $autfilt -H --is-deterministic -n 3 -o out.hoa
|
||||
$randaut -n -1 -S2 2 -H | $autfilt -H -v --is-deterministic -n 4 -o '>>out.hoa'
|
||||
$randaut -n -1 -Q2 2 -H | $autfilt -H --is-deterministic -n 3 -o out.hoa
|
||||
$randaut -n -1 -Q2 2 -H | $autfilt -H -v --is-deterministic -n 4 -o '>>out.hoa'
|
||||
$autfilt -H out.hoa -o 'out-det%d.hoa'
|
||||
$autfilt -H out.hoa -o '>>out-det%d.hoa'
|
||||
test 8 = `$autfilt -c out-det0.hoa`
|
||||
|
|
@ -83,10 +83,10 @@ $autfilt -H out.hoa -o foo -c 2>stderr && exit 1
|
|||
grep 'autfilt: options --output and --count are incompatible' stderr
|
||||
|
||||
(
|
||||
$randaut -n 2 -S5 -A4 -H 2
|
||||
$randaut -A 'random 4' -n 2 -S5 -H 2
|
||||
$randaut -A 'parity rand rand 2..4' -n3 -S5 -H 2
|
||||
$randaut -A 'generalized-Rabin 3 1..2 2..3 0' -n3 -S5 -H 2
|
||||
$randaut -n 2 -Q5 -A4 -H 2
|
||||
$randaut -A 'random 4' -n 2 -Q5 -H 2
|
||||
$randaut -A 'parity rand rand 2..4' -n3 -Q5 -H 2
|
||||
$randaut -A 'generalized-Rabin 3 1..2 2..3 0' -n3 -Q5 -H 2
|
||||
) | grep -E '(acc-name:|Acceptance:)' > output
|
||||
cat output
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
set -e
|
||||
|
||||
for n in 10 20 30 40 50 60 70 80 90 100 200 500 1000; do
|
||||
# Make sure graph generated by randaut have successors for each
|
||||
# Make sure graphs generated by randaut have successors for each
|
||||
# of their $n nodes.
|
||||
../../bin/randaut -S$n 3 -Hl |
|
||||
../../bin/randaut -Q$n 3 -Hl |
|
||||
sed 's/.*--BODY--//;s/State:/\n&/g;s/--END--//' > out
|
||||
grep -q 'State: [0-9][0-9]* .*$' out
|
||||
grep -q 'State: [0-9]* *$' out && exit 1
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ cat stdout
|
|||
run 0 ../../bin/autfilt -F stdout --isomorph expected
|
||||
|
||||
# Likewise, with a randomly generated TGBA.
|
||||
run 0 ../../bin/randaut -S 20 a b -d 0.2 -a 0.2 -A 2 --hoa | tee input
|
||||
run 0 ../../bin/randaut -Q 20 a b -d 0.2 -a 0.2 -A 2 --hoa | tee input
|
||||
|
||||
# the first read-write can renumber the states
|
||||
run 0 $autfilt --hoa --merge-transitions input > stdout
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
. ./defs
|
||||
set -e
|
||||
|
||||
../../bin/randaut a b -S5 --hoa > aut1
|
||||
../../bin/randaut a b c -S10 --hoa > aut2
|
||||
../../bin/randaut a b -Q5 --hoa > aut1
|
||||
../../bin/randaut a b c -Q10 --hoa > aut2
|
||||
../../bin/autfilt --randomize aut1 --hoa > rand11
|
||||
../../bin/autfilt --randomize --seed=1 aut1 --hoa > rand12
|
||||
../../bin/autfilt --randomize --seed=2 aut1 --hoa > rand13
|
||||
|
|
@ -36,7 +36,7 @@ cat aut1 aut2 rand11 rand12 rand13 rand21 rand22 rand23 > all
|
|||
diff aut out
|
||||
|
||||
|
||||
run 0 ../../bin/randaut -Hl -u -n 4 -S1 a b | sort |
|
||||
run 0 ../../bin/randaut -Hl -u -n 4 -Q1 a b | sort |
|
||||
../../bin/autfilt -H | grep '&' > out
|
||||
cat >expected <<EOF
|
||||
[!0&!1] 0
|
||||
|
|
@ -48,7 +48,7 @@ diff out expected
|
|||
|
||||
# This should fail: the random automaton generator can only generate 4
|
||||
# different one-state automaton with two atomic propositions.
|
||||
../../bin/randaut -Hl -u -n 5 -S1 a b >out 2>stderr && exit 1
|
||||
../../bin/randaut -Hl -u -n 5 -Q1 a b >out 2>stderr && exit 1
|
||||
test $? = 2
|
||||
grep 'failed to generate a new unique automaton' stderr
|
||||
test 4 = `wc -l < out`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue