Commit 6ee734c1 authored by MARCHE Claude's avatar MARCHE Claude
Browse files

new bench script using 'why3replayer -bench' and 'why3session html'

parent 6062e30c
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
TMP=$PWD/why3bench.out TMP=$PWD/why3bench.out
TMPERR=$PWD/why3bench.err TMPERR=$PWD/why3bench.err
HTML=$PWD/why3bench.html
cd `dirname $0` cd `dirname $0`
HTML=$PWD/why3bench.html
res=0 res=0
export success=0 export success=0
...@@ -14,14 +13,15 @@ export total=0 ...@@ -14,14 +13,15 @@ export total=0
echo '<html>' > $HTML echo '<html>' > $HTML
echo '<head><title>Why3 Bench</title></head>' >> $HTML echo '<head><title>Why3 Bench</title></head>' >> $HTML
echo '<body>' > $HTML echo '<body>' >> $HTML
echo '<h1>Why3 bench</h1>' > $HTML echo '<h1>Why3 bench</h1>' >> $HTML
run_dir () { run_dir () {
echo '<h2>Directory '$1'</h2>' > $HTML echo '<h2>Directory '$1'</h2>' >> $HTML
echo '<ul>' > $HTML echo '<ul>' >> $HTML
for f in `ls $1/*/why3session.xml`; do for f in `ls $1/*/why3session.xml`; do
d=`dirname $f` d=`dirname $f`
b=`basename $d`
echo -n "Benchmarking $d ... " echo -n "Benchmarking $d ... "
../bin/why3replayer.opt -bench $REPLAYOPT $2 $d 2> $TMPERR > $TMP ../bin/why3replayer.opt -bench $REPLAYOPT $2 $d 2> $TMPERR > $TMP
ret=$? ret=$?
...@@ -35,40 +35,40 @@ run_dir () { ...@@ -35,40 +35,40 @@ run_dir () {
cat $TMP cat $TMP
fi fi
res=1 res=1
echo '<li>'$d' failed' echo '<li>'$d' failed' >> $HTML
else else
echo -n "OK" echo "OK"
../bin/why3session -bench $d 2> $TMPERR > $TMP
echo '<li><a href="'$d'">'$d'</a>'
cat $TMP
success=`expr $success + 1` success=`expr $success + 1`
../bin/why3session html $d 2> $TMPERR > $TMP
echo '<li><a href="'$d/$b'.html">'$d'</a>' >> $HTML
fi fi
total=`expr $total + 1` total=`expr $total + 1`
done done
echo '</ul>' > $HTML echo '</ul>' >> $HTML
} }
echo "=== Logic ===" echo "=== Logic ==="
run_dir . run_dir .
echo "" echo ""
# echo "=== BTS ===" echo "=== BTS ==="
# run_dir bts run_dir bts
# echo "" echo ""
# echo "=== Programs ===" echo "=== Programs ==="
# run_dir programs run_dir programs
# echo "" echo ""
# echo "=== Programs in their own subdir ===" echo "=== Programs in their own subdir ==="
# run_dir programs/vacid_0_binary_heaps "-I programs/vacid_0_binary_heaps" run_dir programs/vacid_0_binary_heaps "-I programs/vacid_0_binary_heaps"
# run_dir hoare_logic "-I hoare_logic" run_dir hoare_logic "-I hoare_logic"
# echo "" echo ""
# echo "=== Check Builtin translation ===" echo "=== Check Builtin translation ==="
# run_dir check-builtin run_dir check-builtin
# echo "" echo ""
echo '</body></html>' >> $HTML
echo "Summary: $success/$total" echo "Summary: $success/$total"
exit $res exit $res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment