edits
[model-checker-benchmarks.git] / infer.sh
1 #!/bin/sh
2
3 #TESTCASES=( testcase1 testcase2 testcase3 testcase4 testcase5 )
4 TESTCASES=( testcase1 )
5
6 BENCH=chase-lev-deque-bugfix
7
8 for((i=0;i<${#TESTCASES[@]};i++))
9 do
10         #echo "$i: ${TESTCASES[$i]}"
11
12         input=result$i.txt
13         output=result$(($i+1)).txt
14
15         echo input:$input
16         echo output:$output
17
18         if [ $i == 0 ]; then
19                 sh run.sh $BENCH/${TESTCASES[$i]}_wildcard -m2 -y -u3 -tSCFENCE &> tmp.txt
20         else
21                 sh run.sh $BENCH/${TESTCASES[$i]}_wildcard -m2 -y -u3 -tSCFENCE -o f$input &> tmp.txt
22         fi
23                 
24         firstLine=`grep "Result 0" tmp.txt -n | tail -n 1 | sed -n 's/^\([0-9]*\)[:].*/\1/p'`
25         lastLine=`grep "wildcard" tmp.txt -n | tail -n 1 | sed -n 's/^\([0-9]*\)[:].*/\1/p'`
26         head tmp.txt -n "$lastLine" | tail  -n +"$firstLine" &> $output
27
28 done
29
30