Add Phrasebook to testsuite. Move grammars into subfolders. Add run-bench script.

This commit is contained in:
John J. Camilleri
2021-02-20 13:22:29 +01:00
parent 5ad5789b31
commit dca2ebaf72
179 changed files with 20169 additions and 26 deletions

24
testsuite/lpgf/run-bench.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
if [ $# -lt 1 ] ; then
echo "Specify language"
exit 1
fi
PREFIX="$(dirname $0)/phrasebook/Phrasebook"
TREES="${PREFIX}-10000.trees"
FLAGS="+RTS -T -RTS"
stack build --test --bench --no-run-tests --no-run-benchmarks
printf "\n-- COMPILE --\n\n"
DEBUG=1 stack bench --benchmark-arguments "compile pgf ${PREFIX}${1}.gf ${FLAGS}"
printf "\n"
DEBUG=1 stack bench --benchmark-arguments "compile lpgf ${PREFIX}${1}.gf ${FLAGS}"
printf "\n-- RUN -- \n\n"
stack bench --benchmark-arguments "run pgf Phrasebook.pgf ${TREES} ${FLAGS}"
printf "\n"
stack bench --benchmark-arguments "run pgf2 Phrasebook.pgf ${TREES} ${FLAGS}"
printf "\n"
stack bench --benchmark-arguments "run lpgf Phrasebook.lpgf ${TREES} ${FLAGS}"