Commit 56d1dbc6 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Build the benchmark in bench/gspn-ssp/ using makefiles

parent b83349d4
2008-08-26 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Build the benchmark in bench/gspn-ssp/ using makefiles, so we
can run them easily in parallel using "make -j2".
* bench/gspn-ssp/bench: Remove, it is now replaced by Makefile rules.
* bench/gspn-ssp/benchaux: Remove, now implemented by...
* bench/gspn-ssp/tools/runbench, bench/gspn-ssp/tools/collate:
... these new files.
* bench/gspn-ssp/defs.in: Use absolute filenames.
* bench/gspn-ssp/gen: Remove, it is now replaced
by tools/modelgen-create.
* bench/gspn-ssp/sumall: Delete.
* bench/gspn-ssp/templates/WCSsym/gen,
bench/gspn-ssp/templates/bagrodia/gen,
bench/gspn-ssp/templates/common,
bench/gspn-ssp/templates/gen, bench/gspn-ssp/templates/predef/gen,
* bench/gspn-ssp/Makefile.am: Inlucde modelgen.mk, bench.mk, as
well as all the tools.
* bench/gspn-ssp/bench.mk, bench/gspn-ssp/modelgen.mk: New
files, generated by ...
* bench/gspn-ssp/tools/bench-create,
bench/gspn-ssp/tools/modelgen-create: ... these new files.
* bench/gspn-ssp/sum: Rename as ...
* bench/gspn-ssp/tools/sum: ... this, adjust for the new system,
and keep track of the inclusion count created by the previous patch.
2008-08-18 Alexandre Duret-Lutz <adl@lrde.epita.fr> 2008-08-18 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* iface/gspn/ssp.cc (numbered_state_heap_ssp_semi): Keep track * iface/gspn/ssp.cc (numbered_state_heap_ssp_semi): Keep track
......
...@@ -19,46 +19,29 @@ ...@@ -19,46 +19,29 @@
## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA. ## 02111-1307, USA.
TEMPLATES =
MODELS =
include modelgen.mk
include bench.mk
EXTRA_DIST = \ EXTRA_DIST = \
bench \ $(TEMPLATES) \
benchaux \
gen \
sum \
sumall \
templates/bagrodia/bagrodia.con \
templates/bagrodia/bagrodia.def \
templates/bagrodia/bagrodia.gd \
templates/bagrodia/bagrodia.net \
templates/bagrodia/bagrodia.prop \
templates/bagrodia/gen \
templates/common \ templates/common \
templates/gen \ templates/gen
templates/predef/gen \
templates/predef/WCSasym10.def \ run_bench = tools/runbench
templates/predef/WCSasym10.net \ collate = tools/collate
templates/predef/WCSasym10.tobs \
templates/predef/WCSasym2.def \ dist_noinst_SCRIPTS = \
templates/predef/WCSasym2.net \ tools/bench-create \
templates/predef/WCSasym2.tobs \ tools/modelgen-create \
templates/predef/WCSasym3.def \ tools/trans2prop.pl \
templates/predef/WCSasym3.net \ tools/sum \
templates/predef/WCSasym3.tobs \ $(run_bench) \
templates/predef/WCSasym4.def \ $(collate)
templates/predef/WCSasym4.net \
templates/predef/WCSasym4.tobs \ nodist_check_DATA = $(RESULTS)
templates/predef/WCSasym5.def \
templates/predef/WCSasym5.net \ clean-local:
templates/predef/WCSasym5.tobs \ rm -rf models results
templates/predef/WCSasym6.def \
templates/predef/WCSasym6.net \
templates/predef/WCSasym6.tobs \
templates/predef/WCSasym8.def \
templates/predef/WCSasym8.net \
templates/predef/WCSasym8.tobs \
templates/WCSsym/gen \
templates/WCSsym/WCSsym.con \
templates/WCSsym/WCSsym.def \
templates/WCSsym/WCSsym.gd \
templates/WCSsym/WCSsym.net \
templates/WCSsym/WCSsym.prop \
trans2prop.pl
#!/bin/sh
. ./defs
H=`pwd`
test -d results || mkdir results
cd models
[ $# -eq 0 ] && set -- *
for i; do
cd $i
for ltl2tgba in -f; do
case $i in
*.rg) checks=e2;;
*) checks='e4 e6 e5 e5L e5n e2 e45 e45n';;
esac
for check in $checks; do
res=$H/results/$i.RES-$check$ltl2tgba
test -f $res && continue
export res check i ltl2tgba
rm -f $res
$TIME "$H/benchaux" 2>$res-TOTAL
done
done
cd ..
done
This diff is collapsed.
#!/bin/sh -x
case $check in
*L) check="${check%L} -L";;
*n) check="${check%n} -n";;
esac
set -x
$RANDLTL -F 50 -u -s 0 -f 10 -r 7 `cat $i.ap` |
while read f; do
echo "Running with $f on $i with -$check $ltl2tgba"
(case $i in
*.rg)
if [ ! -f $i.snow ]; then
$TIME $LTLGSPNSRG -$check $ltl2tgba $i "$f" `cat $i.ap` 2>&1
else
PROPS=`echo $f | sed 's/P[0-9]/&,\n/g' | sed 's/.*P/P/' |
grep P | sort -u | tr -d '\n' | sed 's/,$//'`
$SNOW -m $i.cami -p $i.snow -f "$PROPS"
$TRANS2PL model
mv model.nettmp model.net
$TIME $LTLGSPNSRG -$check $ltl2tgba model "$f" \
`echo $PROPS | tr ',' ' '` 2>&1
fi;;
*)
$TIME $LTLGSPNSSP -$check $ltl2tgba $i "$f" "$i.con" `cat $i.ap` 2>&1 ;;
esac
test -f *.mark || touch "x.mark"
test -f *.event || touch "x.event"
du -b *.mark *.event | cut -f 1
) |
tee tmp
sed -n '/^$/n;
/^Command exited with non-zero status/n;
2,$s/[^0-9.]//g;
s/^[.]//;
1x;
2,$H;
$x;
$s/\n/,/g;
$p' < tmp >> $res
done
...@@ -34,10 +34,10 @@ test -f "$srcdir/defs.in" || { ...@@ -34,10 +34,10 @@ test -f "$srcdir/defs.in" || {
exit 1 exit 1
} }
RANDLTL='@top_builddir@/src/ltltest/randltl' RANDLTL='@abs_top_builddir@/src/ltltest/randltl'
LTLGSPNSSP='@top_builddir@/iface/gspn/ltlgspn-ssp' LTLGSPNSSP='@abs_top_builddir@/iface/gspn/ltlgspn-ssp'
LTLGSPNSRG='@top_builddir@/iface/gspn/ltlgspn-srg' LTLGSPNSRG='@abs_top_builddir@/iface/gspn/ltlgspn-srg'
SNOW=/home/adl/projs/src/gspn/snow SNOW=/home/adl/projs/src/gspn/snow
TRANS2PL='@srcdir@/trans2prop.pl' TRANS2PL='@abs_srcdir@/tools/trans2prop.pl'
TIME='/usr/bin/time -p' TIME='/usr/bin/time -p'
export RANDLTL LTLGSPNSSP LTLGSPNSRG TIME SNOW TRANS2PL export RANDLTL LTLGSPNSSP LTLGSPNSRG TIME SNOW TRANS2PL
#!/bin/sh
cd templates && ./gen
# This file is automatically generated by modelgen-create, do not edit.
TEMPLATES += templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop templates/WCSsym/gen
MODELS += models/WCSsym3/stamp
models/WCSsym3/stamp: templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop
mkdir -p 'models/WCSsym3'
cp '$(srcdir)/templates/WCSsym/WCSsym.con' models/WCSsym3/WCSsym3.con
cp '$(srcdir)/templates/WCSsym/WCSsym.net' models/WCSsym3/WCSsym3.net
cp '$(srcdir)/templates/WCSsym/WCSsym.prop' models/WCSsym3/WCSsym3.prop
cp '$(srcdir)/templates/WCSsym/WCSsym.gd' models/WCSsym3/WCSsym3.gd
sed 's/@PR@/pr1,pr2,pr3/' '$(srcdir)/templates/WCSsym/WCSsym.def' > 'models/WCSsym3/WCSsym3.def'
sed 's/:.*//' '$(srcdir)/templates/WCSsym/WCSsym.prop' | tr '\n' ' ' > 'models/WCSsym3/WCSsym3.ap'
touch $@
TEMPLATES += templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop templates/WCSsym/gen
MODELS += models/WCSsym4/stamp
models/WCSsym4/stamp: templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop
mkdir -p 'models/WCSsym4'
cp '$(srcdir)/templates/WCSsym/WCSsym.con' models/WCSsym4/WCSsym4.con
cp '$(srcdir)/templates/WCSsym/WCSsym.net' models/WCSsym4/WCSsym4.net
cp '$(srcdir)/templates/WCSsym/WCSsym.prop' models/WCSsym4/WCSsym4.prop
cp '$(srcdir)/templates/WCSsym/WCSsym.gd' models/WCSsym4/WCSsym4.gd
sed 's/@PR@/pr1,pr2,pr3,pr4/' '$(srcdir)/templates/WCSsym/WCSsym.def' > 'models/WCSsym4/WCSsym4.def'
sed 's/:.*//' '$(srcdir)/templates/WCSsym/WCSsym.prop' | tr '\n' ' ' > 'models/WCSsym4/WCSsym4.ap'
touch $@
TEMPLATES += templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop templates/WCSsym/gen
MODELS += models/WCSsym5/stamp
models/WCSsym5/stamp: templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop
mkdir -p 'models/WCSsym5'
cp '$(srcdir)/templates/WCSsym/WCSsym.con' models/WCSsym5/WCSsym5.con
cp '$(srcdir)/templates/WCSsym/WCSsym.net' models/WCSsym5/WCSsym5.net
cp '$(srcdir)/templates/WCSsym/WCSsym.prop' models/WCSsym5/WCSsym5.prop
cp '$(srcdir)/templates/WCSsym/WCSsym.gd' models/WCSsym5/WCSsym5.gd
sed 's/@PR@/pr1,pr2,pr3,pr4,pr5/' '$(srcdir)/templates/WCSsym/WCSsym.def' > 'models/WCSsym5/WCSsym5.def'
sed 's/:.*//' '$(srcdir)/templates/WCSsym/WCSsym.prop' | tr '\n' ' ' > 'models/WCSsym5/WCSsym5.ap'
touch $@
TEMPLATES += templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop templates/WCSsym/gen
MODELS += models/WCSsym6/stamp
models/WCSsym6/stamp: templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop
mkdir -p 'models/WCSsym6'
cp '$(srcdir)/templates/WCSsym/WCSsym.con' models/WCSsym6/WCSsym6.con
cp '$(srcdir)/templates/WCSsym/WCSsym.net' models/WCSsym6/WCSsym6.net
cp '$(srcdir)/templates/WCSsym/WCSsym.prop' models/WCSsym6/WCSsym6.prop
cp '$(srcdir)/templates/WCSsym/WCSsym.gd' models/WCSsym6/WCSsym6.gd
sed 's/@PR@/pr1,pr2,pr3,pr4,pr5,pr6/' '$(srcdir)/templates/WCSsym/WCSsym.def' > 'models/WCSsym6/WCSsym6.def'
sed 's/:.*//' '$(srcdir)/templates/WCSsym/WCSsym.prop' | tr '\n' ' ' > 'models/WCSsym6/WCSsym6.ap'
touch $@
TEMPLATES += templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop templates/WCSsym/gen
MODELS += models/WCSsym8/stamp
models/WCSsym8/stamp: templates/WCSsym/WCSsym.con templates/WCSsym/WCSsym.net templates/WCSsym/WCSsym.prop templates/WCSsym/WCSsym.gd templates/WCSsym/WCSsym.def templates/WCSsym/WCSsym.prop
mkdir -p 'models/WCSsym8'
cp '$(srcdir)/templates/WCSsym/WCSsym.con' models/WCSsym8/WCSsym8.con
cp '$(srcdir)/templates/WCSsym/WCSsym.net' models/WCSsym8/WCSsym8.net
cp '$(srcdir)/templates/WCSsym/WCSsym.prop' models/WCSsym8/WCSsym8.prop
cp '$(srcdir)/templates/WCSsym/WCSsym.gd' models/WCSsym8/WCSsym8.gd
sed 's/@PR@/pr1,pr2,pr3,pr4,pr5,pr6,pr7,pr8/' '$(srcdir)/templates/WCSsym/WCSsym.def' > 'models/WCSsym8/WCSsym8.def'
sed 's/:.*//' '$(srcdir)/templates/WCSsym/WCSsym.prop' | tr '\n' ' ' > 'models/WCSsym8/WCSsym8.ap'
touch $@
TEMPLATES += templates/bagrodia/bagrodia.con templates/bagrodia/bagrodia.net templates/bagrodia/bagrodia.prop templates/bagrodia/bagrodia.gd templates/bagrodia/bagrodia.def templates/bagrodia/bagrodia.prop templates/bagrodia/gen
MODELS += models/bagrodia2/stamp
models/bagrodia2/stamp: templates/bagrodia/bagrodia.con templates/bagrodia/bagrodia.net templates/bagrodia/bagrodia.prop templates/bagrodia/bagrodia.gd templates/bagrodia/bagrodia.def templates/bagrodia/bagrodia.prop
mkdir -p 'models/bagrodia2'
cp '$(srcdir)/templates/bagrodia/bagrodia.con' models/bagrodia2/bagrodia2.con
cp '$(srcdir)/templates/bagrodia/bagrodia.net' models/bagrodia2/bagrodia2.net
cp '$(srcdir)/templates/bagrodia/bagrodia.prop' models/bagrodia2/bagrodia2.prop
cp '$(srcdir)/templates/bagrodia/bagrodia.gd' models/bagrodia2/bagrodia2.gd
sed 's/@X@/x1,x2/' '$(srcdir)/templates/bagrodia/bagrodia.def' > 'models/bagrodia2/bagrodia2.def'
sed 's/:.*//' '$(srcdir)/templates/bagrodia/bagrodia.prop' | tr '\n' ' ' > 'models/bagrodia2/bagrodia2.ap'
touch $@
MODELS += models/WCSasym3.rg/stamp
models/WCSasym3.rg/stamp: templates/predef/WCSasym3.def templates/predef/WCSasym3.net templates/predef/WCSasym3.tobs
mkdir -p models/WCSasym3.rg
cp '$(srcdir)/templates/predef/WCSasym3.def' 'models/WCSasym3.rg/WCSasym3.rg.def'
cp '$(srcdir)/templates/predef/WCSasym3.net' 'models/WCSasym3.rg/WCSasym3.rg.net'
cp '$(srcdir)/templates/predef/WCSasym3.tobs' 'models/WCSasym3.rg/WCSasym3.rg.tobs'
echo 'P1 P2 P3 P4 P5 P6 P7 P8' > models/WCSasym3.rg/WCSasym3.rg.ap
touch $@
MODELS += models/WCSasym4.rg/stamp
models/WCSasym4.rg/stamp: templates/predef/WCSasym4.def templates/predef/WCSasym4.net templates/predef/WCSasym4.tobs
mkdir -p models/WCSasym4.rg
cp '$(srcdir)/templates/predef/WCSasym4.def' 'models/WCSasym4.rg/WCSasym4.rg.def'
cp '$(srcdir)/templates/predef/WCSasym4.net' 'models/WCSasym4.rg/WCSasym4.rg.net'
cp '$(srcdir)/templates/predef/WCSasym4.tobs' 'models/WCSasym4.rg/WCSasym4.rg.tobs'
echo 'P1 P2 P3 P4 P5 P6 P7 P8' > models/WCSasym4.rg/WCSasym4.rg.ap
touch $@
MODELS += models/WCSasym5.rg/stamp
models/WCSasym5.rg/stamp: templates/predef/WCSasym5.def templates/predef/WCSasym5.net templates/predef/WCSasym5.tobs
mkdir -p models/WCSasym5.rg
cp '$(srcdir)/templates/predef/WCSasym5.def' 'models/WCSasym5.rg/WCSasym5.rg.def'
cp '$(srcdir)/templates/predef/WCSasym5.net' 'models/WCSasym5.rg/WCSasym5.rg.net'
cp '$(srcdir)/templates/predef/WCSasym5.tobs' 'models/WCSasym5.rg/WCSasym5.rg.tobs'
echo 'P1 P2 P3 P4 P5 P6 P7 P8' > models/WCSasym5.rg/WCSasym5.rg.ap
touch $@
MODELS += models/WCSasym6.rg/stamp
models/WCSasym6.rg/stamp: templates/predef/WCSasym6.def templates/predef/WCSasym6.net templates/predef/WCSasym6.tobs
mkdir -p models/WCSasym6.rg
cp '$(srcdir)/templates/predef/WCSasym6.def' 'models/WCSasym6.rg/WCSasym6.rg.def'
cp '$(srcdir)/templates/predef/WCSasym6.net' 'models/WCSasym6.rg/WCSasym6.rg.net'
cp '$(srcdir)/templates/predef/WCSasym6.tobs' 'models/WCSasym6.rg/WCSasym6.rg.tobs'
echo 'P1 P2 P3 P4 P5 P6 P7 P8' > models/WCSasym6.rg/WCSasym6.rg.ap
touch $@
MODELS += models/WCSasym8.rg/stamp
models/WCSasym8.rg/stamp: templates/predef/WCSasym8.def templates/predef/WCSasym8.net templates/predef/WCSasym8.tobs
mkdir -p models/WCSasym8.rg
cp '$(srcdir)/templates/predef/WCSasym8.def' 'models/WCSasym8.rg/WCSasym8.rg.def'
cp '$(srcdir)/templates/predef/WCSasym8.net' 'models/WCSasym8.rg/WCSasym8.rg.net'
cp '$(srcdir)/templates/predef/WCSasym8.tobs' 'models/WCSasym8.rg/WCSasym8.rg.tobs'
echo 'P1 P2 P3 P4 P5 P6 P7 P8' > models/WCSasym8.rg/WCSasym8.rg.ap
touch $@
TEMPLATES += templates/predef/WCSasym3.def templates/predef/WCSasym3.net templates/predef/WCSasym3.tobs templates/predef/WCSasym4.def templates/predef/WCSasym4.net templates/predef/WCSasym4.tobs templates/predef/WCSasym5.def templates/predef/WCSasym5.net templates/predef/WCSasym5.tobs templates/predef/WCSasym6.def templates/predef/WCSasym6.net templates/predef/WCSasym6.tobs templates/predef/WCSasym8.def templates/predef/WCSasym8.net templates/predef/WCSasym8.tobs templates/predef/gen
#!/bin/sh
[ $# -eq 0 ] && set results/*.RES-*
for i; do
case $i in
*-TOTAL);;
*)
x="$x $i";
;;
esac
done
./sum $x
#!/bin/sh #!/bin/sh
for i in 3 4 5 6 8 ; do for i in 3 4 5 6 8 ; do
sfx=$i sfx=$i
. ../common . templates/common
PRS=`seq 1 $i | sed 's/^/pr/;s/$/,/' | tr -d '\n' | sed 's/,$//'` PRS=`seq 1 $i | sed 's/^/pr/;s/$/,/' | tr -d '\n' | sed 's/,$//'`
sed "s/@PR@/$PRS/" "$name.def" > "$dst/$name$sfx.def" echo " sed 's/@PR@/$PRS/' '\$(srcdir)/$name/$bname.def' > '$dst/$bname$sfx.def'" >>tmp$$
sed "s/:.*//" < "$name.prop" | tr '\n' ' ' > "$dst/$name$sfx.ap" echo " sed 's/:.*//' '\$(srcdir)/$name/$bname.prop' | tr '\n' ' ' > '$dst/$bname$sfx.ap'" >>tmp$$
FILES="$FILES $name/$bname.def $name/$bname.prop"
finish
done done
#!/bin/sh #!/bin/sh
for i in 2; do for i in 2; do
sfx=$i sfx=$i
. ../common . templates/common
X=`seq 1 $i | sed 's/^/x/;s/$/,/' | tr -d '\n' | sed 's/,$//'` X=`seq 1 $i | sed 's/^/x/;s/$/,/' | tr -d '\n' | sed 's/,$//'`
sed "s/@X@/$X/" "$name.def" > "$dst/$name$sfx.def" echo " sed 's/@X@/$X/' '\$(srcdir)/$name/$bname.def' > '$dst/$bname$sfx.def'" >>tmp$$
sed "s/:.*//" < "$name.prop" | tr '\n' ' ' > "$dst/$name$sfx.ap" echo " sed 's/:.*//' '\$(srcdir)/$name/$bname.prop' | tr '\n' ' ' > '$dst/$bname$sfx.ap'" >>tmp$$
FILES="$FILES $name/$bname.def $name/$bname.prop"
finish
done done
name=$(basename $(pwd)) bname=$(basename $name)
dst=../../models/$name$sfx dst=models/$bname$sfx
mkdir "$dst"
FILES=
for ext in con net prop; do for ext in con net prop; do
cp "$name".$ext "$dst/$name$sfx.$ext" echo " cp '\$(srcdir)/$name/$bname.$ext' $dst/$bname$sfx.$ext" >>tmp$$
FILES="$FILES $name/$bname.$ext"
done done
test -f "$name".gd && cp "$name".gd "$dst/$name$sfx.gd" if test -f "$name/$bname.gd"; then
echo " cp '\$(srcdir)/$name/$bname.gd' $dst/$bname$sfx.gd" >>tmp$$
FILES="$FILES $name/$bname.gd"
fi
finish()
{
echo
echo "TEMPLATES +=$FILES $name/gen"
echo "MODELS += $dst/stamp"
echo "$dst/stamp:$FILES"
echo " mkdir -p '$dst'"
cat tmp$$
rm -f tmp$$
echo ' touch $@'
}
#!/bin/sh #!/bin/sh
rm -Rf ../models
mkdir ../models echo '# This file is automatically generated by modelgen-create, do not edit.'
for dir in predef WCSsym bagrodia s2j2t2 s2j3t2 s3j2t2; do for dir in WCSsym bagrodia predef; do
(cd $dir && ./gen) export name=templates/$dir
$name/gen
done done
#!/bin/sh #!/bin/sh
for i in 3 4 5 6 8; do for i in 3 4 5 6 8; do
dst=../../models/WCSasym$i.rg dst=models/WCSasym$i.rg
mkdir $dst
echo
echo "MODELS += $dst/stamp"
echo "$dst/stamp: $name/WCSasym$i.def $name/WCSasym$i.net $name/WCSasym$i.tobs"
echo " mkdir -p $dst"
for e in def net tobs; do for e in def net tobs; do
cp WCSasym$i.$e $dst/WCSasym$i.rg.$e echo " cp '\$(srcdir)/$name/WCSasym$i.$e' '$dst/WCSasym$i.rg.$e'"
S="$S $name/WCSasym$i.$e"
done done
echo 'P1 P2 P3 P4 P5 P6 P7 P8' > $dst/WCSasym$i.rg.ap echo " echo 'P1 P2 P3 P4 P5 P6 P7 P8' > $dst/WCSasym$i.rg.ap"
echo ' touch $@'
done done
echo
echo "TEMPLATES +=$S $name/gen"
#!/bin/sh
if test ! -d models; then
echo "Error: this script should be run from the parent of the models/ directory." 2>&1
exit 1
fi
out=bench.mk
rm -f $out
exec >$out
echo "# This file is automatically generated by bench-create, do not edit."
echo
F=50
allres=
cd models
for i in *; do
Ffile=models/$i/formulae
echo "############################## $i ##############################"
echo
echo "models/$i/formulae: models/$i/stamp"
echo " mkdir -p results"
echo " \$(top_builddir)/src/ltltest/randltl -F $F -u -s 0 -f 10 -r 7 \`cat models/$i/$i.ap\` > \$@"
echo
cd $i
for ltl2tgba in -f; do
case $i in
*.rg) checks=e2;;
*) checks='e4 e6 e5 e5L e5n e2 e45 e45n';;
esac
for check in $checks; do
case $check in
*L) check="${check%L} -L";;
*n) check="${check%n} -n";;
esac
check="${check## } $ltl2tgba"
resall=`echo results/$i.$check | tr -d ' ' `
all=
for fi in `seq 1 $F`; do
res=`echo $resall-$fi.log | tr -d ' ' `
echo "$res: $Ffile"
echo " \$(run_bench) $Ffile $fi '-$check' $i > \$@.tmp"
echo " mv \$@.tmp \$@"
all="$all $res"
done
echo
echo "$resall.all: $all"
echo " \$(collate) $all > \$@.tmp"
echo " mv \$@.tmp \$@"
echo
allres="$allres $resall.all"
done
done
cd ..
done
echo "RESULTS =$allres"
cd ..
chmod -w $out
#!/bin/sh
for f in "$@"; do
sed -n '/^$/n;
/^Command exited with non-zero status/n;
2,$s/[^0-9.]//g;
s/^[.]//;
1x;
2,$H;
$x;
$s/\n/,/g;
$p' "$f"
done
#!/bin/sh
if test ! -d template; then
echo "Error: this script should be run from the parent of the template/ directory." 2>&1
exit 1
fi
rm -f modelgen.mk
templates/gen > modelgen.mk
chmod -w modelgen.mk
#!/bin/sh
formula=`sed -n "$2{p;q}" $1`
check=$3
model=$4
. ./defs
cp -r models/$model tmp-$$
cd tmp-$$
case $model in
*.rg)
if [ ! -f $model.snow ]; then
$TIME $LTLGSPNSRG $check $model "$formula" `cat $model.ap` 2>&1
else
PROPS=`echo $formula | sed 's/P[0-9]/&,\n/g' | sed 's/.*P/P/' |
grep P | sort -u | tr -d '\n' | sed 's/,$//'`
$SNOW -m $model.cami -p $model.snow -f "$PROPS"
$TRANS2PL model
mv model.nettmp model.net
$TIME $LTLGSPNSRG $check $model "$formula" \
`echo $PROPS | tr ',' ' '` 2>&1
fi;;
*)
$TIME $LTLGSPNSSP $check $model "$formula" "$model.con" `cat $model.ap` 2>&1 ;;
esac
test -f $model.mark || touch $model.mark
test -f $model.event || touch $model.event
du -b *.mark *.event | cut -f 1
cd ..
rm -rf tmp-$$
...@@ -27,6 +27,7 @@ my %C = ( ...@@ -27,6 +27,7 @@ my %C = (
"contained map size", "contained map size",
"find_state count", "find_state count",
"max. depth", "max. depth",
"inclusion count",
"removed components", "removed components",
"states", "states",
"transitions", "transitions",
...@@ -97,6 +98,12 @@ my %C = ( ...@@ -97,6 +98,12 @@ my %C = (
], ],
); );
$C{e45} = $C{e5};
$C{e54} = $C{e5};
$C{e5L} = $C{e5};
$C{e5n} = $C{e5};
$C{e45n} = $C{e5};
my %filter = (states => 1, transitions => 1, user => 1); my %filter = (states => 1, transitions => 1, user => 1);
my %order = (e2 => 2, e6 => 3, e5 => 4, e4 => 5); my %order = (e2 => 2, e6 => 3, e5 => 4, e4 => 5);
...@@ -114,10 +121,9 @@ while (<>) ...@@ -114,10 +121,9 @@ while (<>)
my $e = shift @l; my $e = shift @l;
$e =~ s/non empty/non e./; $e =~ s/non empty/non e./;
$ARGV =~ /([\w.]+).RES-(\w+)/; $ARGV =~ /([\w.]+)\.(e.*)-f\.all$/;
my $name = $1; my $name = $1;
my $meth = $2; my $meth = $2;
$meth =~ s/[nL]$//;
$P{$name}{$e}{$meth} = 1; $P{$name}{$e}{$meth} = 1;
...@@ -157,7 +163,7 @@ if (exists $ENV{FORTETABLE}) ...@@ -157,7 +163,7 @@ if (exists $ENV{FORTETABLE})
foreach my $meth (sort { $order{$a} <=> $order{$b} } foreach my $meth (sort { $order{$a} <=> $order{$b} }
keys %{$P{$model}{$e}}) keys %{$P{$model}{$e}})