From f42e7228e541728647e1ce4caab3383eab23e897 Mon Sep 17 00:00:00 2001 From: Hamed Gorjiara Date: Mon, 25 Feb 2019 15:13:23 -0800 Subject: [PATCH] Run script for interpreters --- src/runinterpreter.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 src/runinterpreter.sh diff --git a/src/runinterpreter.sh b/src/runinterpreter.sh new file mode 100755 index 0000000..759b957 --- /dev/null +++ b/src/runinterpreter.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# run as the following: +# ./runalloy.sh [hexiom] [--alloy] +# ./runalloy.sh [nqueens] [--alloy] +# ./runalloy.sh [sudoku-csolver] [--alloy] +# ./runalloy.sh [killerSudoku] [--alloy] + +#./run.sh deserializealloytest ../Benchmarks/sudoku-csolver/4x4.dump --alloy +#./run.sh java edu.mit.csail.sdg.alloy4whole.ExampleAlloyCompilerNoViz satune.als > solution.log + +if [ "$#" -lt 2 ]; then + echo "Illegal number of argument" + echo "./runinterpreter.sh [benchmark] [--alloy/--z3/--smtrat/--mathsat] [timeout]" + exit 1 +fi + + +BIN=./bin +DUMP=$(find . -name "*.dump") +cd $BIN +for d in $DUMP; do + if [[ $d = *$1* ]]; then + echo $d + START=$(date +%s.%N) + ./run.sh deserializealloytest "."$d $2 $3 + END=$(date +%s.%N) + DIFF=$(echo "$END - $START" | bc) + echo "CSOLVER solve time: $DIFF" + cat solution.sol + echo "Best tuner" + fi +done -- 2.34.1