Commit 32769270 authored by Alfons Laarman's avatar Alfons Laarman

Fix spins script (—help was now displayed without file option parameter)

also allow options to test script
parent d6347952
...@@ -23,11 +23,11 @@ for option in ${1+"$@"}; do ...@@ -23,11 +23,11 @@ for option in ${1+"$@"}; do
fi fi
done done
if [ -z "$promela_file" ]; then #if [ -z "$promela_file" ]; then
echo "usage: spins [options] promela_file" ; # echo "usage: spins [options] promela_file" ;
echo "options will be passed to GCC" # echo "options will be passed to GCC"
exit 1 # exit 1
fi #fi
promela_name=`basename $promela_file` promela_name=`basename $promela_file`
output_file="${promela_name}.spins.c" output_file="${promela_name}.spins.c"
......
...@@ -12,6 +12,8 @@ echo $EXP - $EXTRA ...@@ -12,6 +12,8 @@ echo $EXP - $EXTRA
RUNDIR=`dirname "$0"` RUNDIR=`dirname "$0"`
RUNDIR=`realpath "$RUNDIR"` RUNDIR=`realpath "$RUNDIR"`
OPTION=$2
LTSMINDIR="$RUNDIR/../.." LTSMINDIR="$RUNDIR/../.."
SPINSDIR="$LTSMINDIR/spins" SPINSDIR="$LTSMINDIR/spins"
if [ ! -e "$LTSMINDIR/CODING-STANDARDS" ]; then if [ ! -e "$LTSMINDIR/CODING-STANDARDS" ]; then
...@@ -70,7 +72,7 @@ function runtest { ...@@ -70,7 +72,7 @@ function runtest {
OUT="$EXP/$FILE-por-r1-$STORAGE-s$STORAGE_SIZE-$THREADS.out" OUT="$EXP/$FILE-por-r1-$STORAGE-s$STORAGE_SIZE-$THREADS.out"
if [ ! -e $OUT ]; then if [ ! -e $OUT ]; then
PINS="models-$EXP/$FILE.spins" PINS="models-$EXP/$FILE.spins"
EXPLORE=`$LTSMIN --ratio=1 --strategy=dfs --state=$STORAGE \ EXPLORE=`$LTSMIN --ratio=1 $OPTION --strategy=dfs --state=$STORAGE \
-s$STORAGE_SIZE $EXTRA -v $PINS 2>&1 | tee $OUT` -s$STORAGE_SIZE $EXTRA -v $PINS 2>&1 | tee $OUT`
STATESNEW=`echo "$EXPLORE"|grep "Elements: "|sed 's/.* \([0-9]*\)$/\1/g'` STATESNEW=`echo "$EXPLORE"|grep "Elements: "|sed 's/.* \([0-9]*\)$/\1/g'`
......
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