15 echo " Options are:" |
15 echo " Options are:" |
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 |
21 echo |
21 echo " THEORY is the name of the theory of which all theorems should be" |
22 echo " THEORY is the name of the theory of which all theorems should be" |
22 echo " mutated and tested." |
23 echo " mutated and tested." |
23 echo |
24 echo |
24 exit 1 |
25 exit 1 |
93 declare [[quickcheck_timeout = 30]] |
97 declare [[quickcheck_timeout = 30]] |
94 |
98 |
95 ML {* |
99 ML {* |
96 val mtds = [ |
100 val mtds = [ |
97 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"random\"])) \"random\", |
101 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"random\"])) \"random\", |
|
102 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"random\"]) #> Config.put Quickcheck.finite_types false) \"random_int\", |
98 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"exhaustive\"])) \"exhaustive\", |
103 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"exhaustive\"])) \"exhaustive\", |
99 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"exhaustive\"]) #> Config.put Quickcheck.finite_types false) \"exhaustive_no_finite_types\", |
104 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"exhaustive\"]) #> Config.put Quickcheck.finite_types false) \"exhaustive_int\", |
100 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"narrowing\"]) #> Config.put Quickcheck.finite_types true) \"narrowing\", |
105 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"narrowing\"]) #> Config.put Quickcheck.finite_types true) \"narrowing\", |
101 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"narrowing\"]) #> Config.put Quickcheck.finite_types false) \"narrowing_no_finite_types\", |
106 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"narrowing\"]) #> Config.put Quickcheck.finite_types false) \"narrowing_int\", |
102 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"narrowing\"]) #> Config.put Quickcheck.finite_types false |
107 MutabelleExtra.quickcheck_mtd (Context.proof_map (Quickcheck.set_active_testers [\"narrowing\"]) #> Config.put Quickcheck.finite_types false |
103 #> Context.proof_map (Quickcheck.map_test_params (apfst (K [@{typ nat}])))) \"narrowing_nat\" |
108 #> Context.proof_map (Quickcheck.map_test_params (apfst (K [@{typ nat}])))) \"narrowing_nat\" |
104 |
|
105 (*, MutabelleExtra.refute_mtd, *) |
109 (*, MutabelleExtra.refute_mtd, *) |
106 , MutabelleExtra.nitpick_mtd |
110 , MutabelleExtra.nitpick_mtd |
107 |
111 |
108 ] |
112 ] |
109 *} |
113 *} |
111 ML {* |
115 ML {* |
112 fun mutation_testing_of thy = |
116 fun mutation_testing_of thy = |
113 (MutabelleExtra.random_seed := 1.0; |
117 (MutabelleExtra.random_seed := 1.0; |
114 MutabelleExtra.thms_of false thy $MUTABELLE_FILTER |
118 MutabelleExtra.thms_of false thy $MUTABELLE_FILTER |
115 |> (fn thms => MutabelleExtra.mutate_theorems_and_write_report |
119 |> (fn thms => MutabelleExtra.mutate_theorems_and_write_report |
116 @{theory} mtds thms (\"$MUTABELLE_OUTPUT_PATH/log\"))) |
120 @{theory} $MUTABELLE_NUMBER_OF_MUTANTS mtds thms (\"$MUTABELLE_OUTPUT_PATH/log\"))) |
117 *} |
121 *} |
118 |
122 |
119 ML {* |
123 ML {* |
120 mutation_testing_of @{theory $MUTABELLE_TEST_THEORY} |
124 mutation_testing_of @{theory $MUTABELLE_TEST_THEORY} |
121 *} |
125 *} |