stutter: fiddle with the benchmark

* bench/stutter/stutter_bench.sh: Add headers in the CSV files, and also
run stutter_invariance_randomgraph.
* bench/stutter/stutter_invariance_formulas.cc: Remove space from CSV
output.
* bench/stutter/stutter_invariance_randomgraph.cc: Likewise, plus fix
the call to is_stutter_invariant(), and return an average time.
* bench/stutter/stutter.ipynb: Adjust.
* bench/stutter/README: Simplify.
* bench/stutter/Makefile.am: Distribute the script and python notebook.
This commit is contained in:
Alexandre Duret-Lutz 2014-11-23 21:47:12 +01:00
parent 0beb148b6a
commit c494a347c9
6 changed files with 65 additions and 120 deletions

View file

@ -1,23 +1,17 @@
#!/bin/sh
OUTPUT=bench_formulas.csv
RANDLTL=../../src/bin/randltl
LTLFILT=../../src/bin/ltlfilt
if test -f bench_formulas.csv; then
echo -n "$OUTPUT already exists. [a]ppend, [r]emove it or [q]uit?"
read ans
if test "$ans" = "r"; then
rm "$OUTPUT"
else if test "$ans" = "q" -o "$ans" != "a"; then
echo "abort."
exit 0
fi
fi
fi
OUTPUT=bench_formulas.csv
echo 'formula,algo,ap,states,result,time' > "$OUTPUT"
for ap in 1 2 3 4; do
echo "Generating benchmarks for formulas with $ap atomic propositions..."
$RANDLTL $ap --tree-size=..30 -n 20000 | $LTLFILT --ap=$ap |
./stutter_invariance_formulas -F- >> "$OUTPUT"
done
echo "Generating benchmarks for random graphs..."
OUTPUT=bench_randgraph.csv
echo 'algo,ap,states,result,time' > "$OUTPUT"
./stutter_invariance_randomgraph >> "$OUTPUT"