forked from schemaanalyst/schemaanalyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-options-random.sh
executable file
·65 lines (59 loc) · 1.97 KB
/
run-options-random.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# Arguments (: separated)
# -s SCHEMAS
# -c CRITERION
# -t TECHNIQUES
# -r REPEATS
# -u USETRANSACTIONS
# -v VIRTUAL
# -p PIPELINES
# -d DATAGENS
CLASSPATH='lib/*:build/'
CLASS='org.schemaanalyst.mutation.analysis.executor.MutationAnalysis'
VIRTCLASS='org.schemaanalyst.mutation.analysis.executor.MutationAnalysisVirtual'
while getopts s:c:t:r:u:v:p:d:b: option
do
case "${option}"
in
s) SCHEMAS=${OPTARG};;
c) CRITERION=${OPTARG};;
t) TECHNIQUES=${OPTARG};;
r) REPEATS=${OPTARG};;
u) USETRANSACTIONS=${OPTARG};;
v) VIRTUAL=${OPTARG};;
p) PIPELINES=${OPTARG};;
d) DATAGENS=${OPTARG};;
b) BEGINNING=${OPTARG};;
esac
done
if [ -z $SCHEMAS ] || [ -z $CRITERION ] || [ -z $TECHNIQUES ] || [ -z $REPEATS ] || [ -z $USETRANSACTIONS ] || [ -z $PIPELINES ] || [ -z $DATAGENS ] || [ -z $BEGINNING ]; then
echo "Experiment failed - requires -s SCHEMAS -c CRITERION -t TECHNIQUES -r REPEATS -u USETRANSACTIONS -v VIRTUAL -p PIPELINES -d DATAGENS -b BEGINNING_SEED"
exit 1
fi
IFS=':' read -ra CRITERIA <<< "$CRITERION"
IFS=':' read -ra SCHEMA <<< "$SCHEMAS"
IFS=':' read -ra TECHNIQUE <<< "$TECHNIQUES"
IFS=':' read -ra USETRANSACTION <<< "$USETRANSACTIONS"
IFS=':' read -ra PIPELINE <<< "$PIPELINES"
IFS=':' read -ra DATAGEN <<< "$DATAGENS"
for (( x=1; x<=$REPEATS; x++ )) do
SEED=$(($BEGINNING+$x-1))
for d in "${DATAGEN[@]}"; do
for s in "${SCHEMA[@]}"; do
for c in "${CRITERIA[@]}"; do
for p in "${PIPELINE[@]}"; do
for t in "${TECHNIQUE[@]}"; do
for u in "${USETRANSACTION[@]}"; do
echo "$d,$x,$t,$s,$c,$u,$SEED"
java -cp $CLASSPATH $CLASS parsedcasestudy.$s --criterion=$c --technique=$t --useTransactions=$u --mutationPipeline=$p --randomseed=$SEED --dataGenerator=$d
done
done
if [ $VIRTUAL == "true" ] ; then
echo "$d,$x,virtual,$s,$c,false,$SEED"
java -cp $CLASSPATH $VIRTCLASS parsedcasestudy.$s --criterion=$c --randomseed=$SEED --dataGenerator=$d
fi
done
done
done
done
done