equal
deleted
inserted
replaced
16 echo " -L LOGIC parent logic to use (default $MUTABELLE_LOGIC)" |
16 echo " -L LOGIC parent logic to use (default $MUTABELLE_LOGIC)" |
17 echo " -T THEORY parent theory to use (default $MUTABELLE_IMPORT_THEORY)" |
17 echo " -T THEORY parent theory to use (default $MUTABELLE_IMPORT_THEORY)" |
18 echo " -O DIR output directory for test data (default $MUTABELLE_OUTPUT_PATH)" |
18 echo " -O DIR output directory for test data (default $MUTABELLE_OUTPUT_PATH)" |
19 echo " -N NUMBER number of lemmas to choose randomly, if not given all lemmas are chosen" |
19 echo " -N NUMBER number of lemmas to choose randomly, if not given all lemmas are chosen" |
20 echo " -M NUMBER number of mutants for each lemma (default $MUTABELLE_NUMBER_OF_MUTANTS)" |
20 echo " -M NUMBER number of mutants for each lemma (default $MUTABELLE_NUMBER_OF_MUTANTS)" |
|
21 echo " -X NUMBER number of mutations in a mutant (default $MUTABELLE_NUMBER_OF_MUTATIONS)" |
21 echo |
22 echo |
22 echo " THEORY is the name of the theory of which all theorems should be" |
23 echo " THEORY is the name of the theory of which all theorems should be" |
23 echo " mutated and tested." |
24 echo " mutated and tested." |
24 echo |
25 echo |
25 exit 1 |
26 exit 1 |
30 |
31 |
31 # options |
32 # options |
32 |
33 |
33 MUTABELLE_IMPORTS="" |
34 MUTABELLE_IMPORTS="" |
34 |
35 |
35 while getopts "L:T:O:N:M:" OPT |
36 while getopts "L:T:O:N:M:X:" OPT |
36 do |
37 do |
37 case "$OPT" in |
38 case "$OPT" in |
38 L) |
39 L) |
39 MUTABELLE_LOGIC="$OPTARG" |
40 MUTABELLE_LOGIC="$OPTARG" |
40 ;; |
41 ;; |
47 N) |
48 N) |
48 NUMBER_OF_LEMMAS="$OPTARG" |
49 NUMBER_OF_LEMMAS="$OPTARG" |
49 ;; |
50 ;; |
50 M) |
51 M) |
51 MUTABELLE_NUMBER_OF_MUTANTS="$OPTARG" |
52 MUTABELLE_NUMBER_OF_MUTANTS="$OPTARG" |
|
53 ;; |
|
54 X) |
|
55 MUTABELLE_NUMBER_OF_MUTATIONS="$OPTARG" |
52 ;; |
56 ;; |
53 \?) |
57 \?) |
54 usage |
58 usage |
55 ;; |
59 ;; |
56 esac |
60 esac |
115 ML {* |
119 ML {* |
116 fun mutation_testing_of thy = |
120 fun mutation_testing_of thy = |
117 (MutabelleExtra.random_seed := 1.0; |
121 (MutabelleExtra.random_seed := 1.0; |
118 MutabelleExtra.thms_of false thy $MUTABELLE_FILTER |
122 MutabelleExtra.thms_of false thy $MUTABELLE_FILTER |
119 |> (fn thms => MutabelleExtra.mutate_theorems_and_write_report |
123 |> (fn thms => MutabelleExtra.mutate_theorems_and_write_report |
120 @{theory} $MUTABELLE_NUMBER_OF_MUTANTS mtds thms (\"$MUTABELLE_OUTPUT_PATH/log\"))) |
124 @{theory} ($MUTABELLE_NUMBER_OF_MUTATIONS, $MUTABELLE_NUMBER_OF_MUTANTS) mtds thms (\"$MUTABELLE_OUTPUT_PATH/log\"))) |
121 *} |
125 *} |
122 |
126 |
123 ML {* |
127 ML {* |
124 mutation_testing_of @{theory $MUTABELLE_TEST_THEORY} |
128 mutation_testing_of @{theory $MUTABELLE_TEST_THEORY} |
125 *} |
129 *} |