random: Get rid of uniform_distribution (non-portable).
* src/misc/random.cc, src/misc/random.hh, src/tgbaalgos/randomgraph.cc, src/tgbatest/randaut.test, src/tgbatest/randomize.test, src/tgbatest/readsave.test, src/ltlvisit/simplify.cc, src/tgbaalgos/randomize.cc, src/graph/graph.hh, src/tgbatest/randpsl.test: here.
This commit is contained in:
parent
5610d10ac3
commit
734bceff8e
10 changed files with 237 additions and 88 deletions
|
|
@ -58,11 +58,11 @@ test `expr $a + $b` = 100
|
|||
# not hesitate to adjust the expected values below.
|
||||
$randaut -n 5 --name='%F-%L-%s-%c-%e' -H a | grep '^name' >out
|
||||
cat >expected<<EOF
|
||||
name: "0-0-10-1-29"
|
||||
name: "0-1-10-1-30"
|
||||
name: "0-2-10-1-29"
|
||||
name: "0-3-10-3-24"
|
||||
name: "0-4-10-1-29"
|
||||
name: "0-0-10-1-30"
|
||||
name: "0-1-10-4-27"
|
||||
name: "0-2-10-6-20"
|
||||
name: "0-3-10-1-25"
|
||||
name: "0-4-10-2-20"
|
||||
EOF
|
||||
diff out expected
|
||||
|
||||
|
|
|
|||
|
|
@ -86,32 +86,7 @@ grep "unknown argument for --randomize: 'f'" stderr
|
|||
cat >input <<EOF
|
||||
HOA: v1
|
||||
States: 5
|
||||
Start: 0
|
||||
AP: 4 "a" "b" "c" "d"
|
||||
acc-name: all
|
||||
Acceptance: 0 t
|
||||
properties: trans-labels explicit-labels state-acc
|
||||
--BODY--
|
||||
State: 0 "s0"
|
||||
[0] 1
|
||||
[1] 2
|
||||
[2] 3
|
||||
[3] 4
|
||||
State: 1 "s1"
|
||||
[0] 1
|
||||
State: 2 "s2"
|
||||
[1] 2
|
||||
State: 3 "s3"
|
||||
[2] 3
|
||||
State: 4 "s4"
|
||||
[3] 4
|
||||
--END--
|
||||
EOF
|
||||
$autfilt --randomize --seed=1 input -H > output
|
||||
cat >expected <<EOF
|
||||
HOA: v1
|
||||
States: 5
|
||||
Start: 1
|
||||
Start: 4
|
||||
AP: 4 "a" "b" "c" "d"
|
||||
acc-name: all
|
||||
Acceptance: 0 t
|
||||
|
|
@ -119,17 +94,42 @@ properties: trans-labels explicit-labels state-acc
|
|||
--BODY--
|
||||
State: 0 "s1"
|
||||
[0] 0
|
||||
State: 1 "s0"
|
||||
[1] 3
|
||||
State: 1 "s3"
|
||||
[2] 1
|
||||
State: 2 "s2"
|
||||
[1] 2
|
||||
State: 3 "s4"
|
||||
[3] 3
|
||||
State: 4 "s0"
|
||||
[3] 3
|
||||
[2] 1
|
||||
[0] 0
|
||||
[2] 2
|
||||
[3] 4
|
||||
State: 2 "s3"
|
||||
[2] 2
|
||||
State: 3 "s2"
|
||||
[1] 3
|
||||
State: 4 "s4"
|
||||
[3] 4
|
||||
[1] 2
|
||||
--END--
|
||||
EOF
|
||||
$autfilt --randomize --seed=1 input -H > output
|
||||
cat >expected <<EOF
|
||||
HOA: v1
|
||||
States: 5
|
||||
Start: 3
|
||||
AP: 4 "a" "b" "c" "d"
|
||||
acc-name: all
|
||||
Acceptance: 0 t
|
||||
properties: trans-labels explicit-labels state-acc
|
||||
--BODY--
|
||||
State: 0 "s4"
|
||||
[3] 0
|
||||
State: 1 "s2"
|
||||
[1] 1
|
||||
State: 2 "s1"
|
||||
[0] 2
|
||||
State: 3 "s0"
|
||||
[1] 1
|
||||
[3] 0
|
||||
[2] 4
|
||||
[0] 2
|
||||
State: 4 "s3"
|
||||
[2] 4
|
||||
--END--
|
||||
EOF
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ set -e
|
|||
|
||||
# Generate 50 random unique PSL formula that do not simplify to LTL
|
||||
# formulae, and that have a size of at lease 12.
|
||||
../../bin/randltl -n -1 --tree-size 30 --seed 0 --psl a b c |
|
||||
../../bin/randltl -n -1 --tree-size 30 --seed 12 --psl a b c |
|
||||
../../bin/ltlfilt -r --size-min 12 --unique |
|
||||
../../bin/ltlfilt -v --ltl -n 50 | tee formulas |
|
||||
../../bin/ltlcross '../ltl2tgba -R3 -t %f >%T' '../ltl2tgba -x -R3 -t %f >%T' \
|
||||
|
|
|
|||
|
|
@ -114,16 +114,16 @@ $randltl -n -1 a b |
|
|||
$autfilt -F- -F nonexistant --states=3 --edges=..10 --acc-sets=1.. \
|
||||
--name='%M, %S states' --stats='<%m>, %e, %a' -n 10 > output
|
||||
cat >expected <<EOF
|
||||
<F(b | GF!a), 3 states>, 6, 1
|
||||
<XFb, 3 states>, 4, 1
|
||||
<F(b | Ga), 3 states>, 5, 1
|
||||
<F(!b & G(!b | G!a)), 3 states>, 5, 1
|
||||
<XF!b, 3 states>, 4, 1
|
||||
<G!b & XF!a, 3 states>, 4, 1
|
||||
<F(b | GFa), 3 states>, 6, 1
|
||||
<F(Ga | XG(!a & Fb)), 3 states>, 6, 1
|
||||
<FG!b & F(b | GFb), 3 states>, 5, 1
|
||||
<Ga | G!a, 3 states>, 4, 1
|
||||
<a | G((!a & !b) | (a & b)), 3 states>, 4, 1
|
||||
<Fb U G!a, 3 states>, 7, 1
|
||||
<Gb | G!b, 3 states>, 4, 1
|
||||
<XFb, 3 states>, 4, 1
|
||||
<F(b W a), 3 states>, 6, 1
|
||||
<(a & !b & (b | (!b M F!a))) | (!a & (b | (!b & (b W Ga)))), 3 states>, 5, 1
|
||||
<(a & (a U !b)) | (!a & (!a R b)), 3 states>, 5, 1
|
||||
<a | G((a & GFa) | (!a & FG!a)), 3 states>, 4, 1
|
||||
<XXG(!a & (Fa W Gb)), 3 states>, 3, 1
|
||||
EOF
|
||||
diff output expected
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue