2 # regression tests for why3
10 REPLAYOPT
="$REPLAYOPT --force"
13 REPLAYOPT
="$REPLAYOPT --obsolete-only"
16 REPLAYOPT
="$REPLAYOPT --ignore-shapes"
19 REPLAYOPT
="$REPLAYOPT --prover $2"
23 REGTESTS_MODE
="REDUCED"
26 echo "$0: Unknown option '$1'"
32 TMP
=$PWD/why3regtests.out
33 TMPERR
=$PWD/why3regtests.err
35 # Current directory is /examples
38 # too early to do that
39 # REPLAYOPT="$REPLAYOPT --smoke-detector top"
49 if [ "$REGTESTS_MODE" = "REDUCED" ]; then
50 if [ -f $1/reduced_regtests.list
]; then
51 LIST
=`sed $1/reduced_regtests.list -n -e "s&^\([^ #]\+\).*&$1/\1/why3session.xml&p"`
56 LIST
=`ls $1/*/why3session.xml`
60 printf "Replaying $d ... "
61 if ..
/bin
/why3.opt replay
-q $REPLAYOPT $2 $d 2> $TMPERR > $TMP ; then
64 success
=`expr $success + 1`
67 printf "FAILED (ret code=$ret):"
69 if test -z "$out" ; then
70 echo "standard error: (standard output empty)"
77 total
=`expr $total + 1`
79 sessions
="$sessions $1/*/why3session.xml"
80 shapes
="$shapes $1/*/why3shapes.gz"
83 echo "=== Examples and Case Studies === MUST REPLAY AND ALL GOALS PROVED ==="
88 run_dir double_wp
"-L double_wp"
90 run_dir c_cursor
"-L c_cursor"
91 run_dir foveoos11-cm
""
92 run_dir vacid_0_binary_heaps
"-L vacid_0_binary_heaps"
93 run_dir verifythis_2016_matrix_multiplication
"-L verifythis_2016_matrix_multiplication"
94 run_dir WP_revisited
""
95 run_dir prover
"-L prover --warn-off=unused_variable"
96 run_dir multiprecision
"-L multiprecision"
97 run_dir c_cursor
"-L c_cursor"
101 echo "Score on Examples and Case Studies: $success/$total"
104 echo "=== Standard Library ==="
111 # there's no session there...
113 run_dir tests-provers
""
116 echo "=== Check Builtin translation ==="
118 run_dir check-builtin
""
129 run_dir bitvectors
"-L bitvectors"
137 echo "Summary : $success/$total"
138 echo "Sessions size : "`wc -cl $sessions | tail -1`
139 echo "Shapes size : "`wc -cl $shapes | tail -1`