Commit 42f56cbf authored by Etienne Renault's avatar Etienne Renault

benchs: update scripts

parent 060775de
Pipeline #24491 passed with stage
in 2 minutes and 12 seconds
...@@ -83,47 +83,55 @@ echo ...@@ -83,47 +83,55 @@ echo
echo "model,isempty,spottime,ltsmintime,formulae" > $OUTPUT_LTL echo "model,isempty,spottime,ltsmintime,formulae" > $OUTPUT_LTL
echo First, we transpile only once every model. This may take some time.
i=0 i=0
for model in $LTLFILES; do # for model in $LTLFILES; do
# echo -e "==> Processing $model"
echo -e "==> Processing $model" # rers_inputs=$(cat $model | grep 'var inputs \[\]int' | \
while read -r formulae # sed 's/var inputs \[\]int = \[\]int{//g' | \
do # sed 's/}//g' | sed 's/ *//g' | sed 's/,/;/g')
rers_inputs=$(cat $model | grep 'var inputs \[\]int' | \ # filename=$(basename -- "$model")
sed 's/var inputs \[\]int = \[\]int{//g' | \ # filename="${filename%.*}"
sed 's/}//g' | sed 's/ *//g' | sed 's/,/;/g') # ../go2pins -f -o $filename -rers "$rers_inputs" $model > /dev/null 2>&1
filename=$(basename -- "$model") # done
filename="${filename%.*}"
# for model in $LTLFILES; do
../go2pins -f -o $filename -rers "$rers_inputs" $model > /dev/null 2>&1
# echo -e "==> Processing $model"
# Compute Spot resolution time # while read -r formulae
LTSMIN_F=$(echo $formulae | sed 's/"//g') # do
start=$(date +%s.%N) # rers_inputs=$(cat $model | grep 'var inputs \[\]int' | \
RESL=$($filename/go2pins-mc -ltl "$LTSMIN_F" -backend ltsmin 2>&1) # sed 's/var inputs \[\]int = \[\]int{//g' | \
end=$(date +%s.%N) # sed 's/}//g' | sed 's/ *//g' | sed 's/,/;/g')
ltsmin_time=$(python -c "print ('%.3f' % (${end} - ${start}))") # filename=$(basename -- "$model")
# filename="${filename%.*}"
start=$(date +%s.%N)
RESS=$($filename/go2pins-mc -ltl "$formulae" 2>&1) # # Compute Spot resolution time
end=$(date +%s.%N) # LTSMIN_F=$(echo $formulae | sed 's/"//g')
spot_time=$(python -c "print ('%.3f' % (${end} - ${start}))") # start=$(date +%s.%N)
# RESL=$($filename/go2pins-mc -ltl "$LTSMIN_F" -backend ltsmin 2>&1)
# end=$(date +%s.%N)
echo " [formulae $i] spot:$spot_time,ltsmin:$ltsmin_time" # ltsmin_time=$(python -c "print ('%.3f' % (${end} - ${start}))")
# start=$(date +%s.%N)
echo "$model,$status,$spot_time,$ltsmin_time,$formulae">> $OUTPUT_LTL # RESS=$($filename/go2pins-mc -ltl "$formulae" 2>&1)
i=$((i+1)) # end=$(date +%s.%N)
done < $model.formulae.txt # spot_time=$(python -c "print ('%.3f' % (${end} - ${start}))")
done
# echo " [formulae $i] spot:$spot_time,ltsmin:$ltsmin_time"
# echo "$model,$status,$spot_time,$ltsmin_time,$formulae">> $OUTPUT_LTL
# i=$((i+1))
# done < $model.formulae.txt
# done
echo echo
echo file : $(pwd)/$OUTPUT_LTL contains the CSV of LTL evaluation echo file : $(pwd)/$OUTPUT_LTL contains the CSV of LTL evaluation
echo "##################################" echo "##################################"
echo "==> Benchmark for Reachability" echo "==> Benchmark for Reachability / Correctness"
echo "##################################" echo "##################################"
echo echo
...@@ -136,17 +144,19 @@ for model in $FILES; do ...@@ -136,17 +144,19 @@ for model in $FILES; do
continue continue
fi fi
rers_inputs=$(cat $model | grep 'var inputs \[\]int' | \
sed 's/var inputs \[\]int = \[\]int{//g' | \
sed 's/}//g' | sed 's/ *//g' | sed 's/,/;/g')
filename=$(basename -- "$model")
filename="${filename%.*}"
../go2pins -f -o $filename -rers "$rers_inputs" $model > /dev/null 2>&1
echo -e "==> Processing $model" echo -e "==> Processing $model"
while read -r status formulae while read -r status formulae
do do
rers_inputs=$(cat $model | grep 'var inputs \[\]int' | \
sed 's/var inputs \[\]int = \[\]int{//g' | \
sed 's/}//g' | sed 's/ *//g' | sed 's/,/;/g')
filename=$(basename -- "$model")
filename="${filename%.*}"
../go2pins -f -o $filename -rers "$rers_inputs" $model > /dev/null 2>&1
# Compute Spot resolution time # Compute Spot resolution time
LTSMIN_F=$(echo $formulae | sed 's/"//g') LTSMIN_F=$(echo $formulae | sed 's/"//g')
start=$(date +%s.%N) start=$(date +%s.%N)
...@@ -161,9 +171,10 @@ for model in $FILES; do ...@@ -161,9 +171,10 @@ for model in $FILES; do
echo " [formulae $i] spot:$spot_time,ltsmin:$ltsmin_time" echo " [formulae $i] spot:$spot_time,ltsmin:$ltsmin_time"
if [ "$status" == "EMPTY" ]; then if [ "$status" == "EMPTY" ]; then
TMP=$(echo $RESS | grep "no accepting run found") TMP=$(echo $RESS | grep "no accepting run found")
if [ "$TMP" != "" ]; then if [ "$TMP" != "" ]; then
echo " Checking for Correctness: OK" echo " Checking for Correctness: OK"
else else
......
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