longmeasure.sh 709 Bytes
Newer Older
1
# /bin/bash
2
TIMEOUT=20m
3
shopt -s globstar
4

Christian Müller's avatar
Christian Müller committed
5
for RUN in 1 
6
do
7
	for FILE in results/**/*.ltl
Christian Müller's avatar
Christian Müller committed
8 9 10
	do
		NAME=$(basename ${FILE} .ltl)
		METRICS="results/${NAME}.metrics"
11

Christian Müller's avatar
Christian Müller committed
12 13 14 15
		echo "Measuring ${FILE}"
		echo "Metrics File: ${METRICS}"
		echo "" >> ${METRICS}
		echo "Measuring run ${RUN}:" >> ${METRICS}
16

Christian Müller's avatar
Christian Müller committed
17 18
		# echo "    FOLTL length: $(wc -m < results/${NAME}.foltl)" >> ${RESULT}
		# echo "    LTL length: $(wc -m < ${FILE})" >> ${RESULT}
19

Christian Müller's avatar
Christian Müller committed
20 21 22 23 24 25 26 27 28 29
		if
			timeout ${TIMEOUT} time -p aalta/Aalta_v2.0/aalta < ${FILE} >> ${METRICS} 2>&1 
		then
			echo "Finished successfully"
			echo "Finished successfully" >> ${METRICS}
		else
			echo "Timeout after ${TIMEOUT}"
			echo "Timeout after ${TIMEOUT}" >> ${METRICS}
		fi
	done
Christian Müller's avatar
Christian Müller committed
30
done