src/HOL/Mutabelle/MutabelleExtra.thy
author blanchet
Wed, 03 Nov 2010 22:26:53 +0100
changeset 40341 03156257040f
parent 40133 b61d52de66f0
child 40653 d921c97bdbd8
permissions -rw-r--r--
standardize on seconds for Nitpick and Sledgehammer timeouts
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34965
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     1
theory MutabelleExtra
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     2
imports Complex_Main SML_Quickcheck
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     3
(*
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     4
  "~/Downloads/Jinja/J/TypeSafe"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     5
  "~/Downloads/Jinja/J/Annotate"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     6
  (* FIXME "Example" *)
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     7
  "~/Downloads/Jinja/J/execute_Bigstep"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     8
  "~/Downloads/Jinja/J/execute_WellType"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
     9
  "~/Downloads/Jinja/JVM/JVMDefensive"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    10
  "~/Downloads/Jinja/JVM/JVMListExample"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    11
  "~/Downloads/Jinja/BV/BVExec"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    12
  "~/Downloads/Jinja/BV/LBVJVM"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    13
  "~/Downloads/Jinja/BV/BVNoTypeError"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    14
  "~/Downloads/Jinja/BV/BVExample"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    15
  "~/Downloads/Jinja/Compiler/TypeComp"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    16
*)
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    17
(*"~/Downloads/NormByEval/NBE"*)
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    18
uses "mutabelle.ML"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    19
     "mutabelle_extra.ML"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    20
begin
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    21
40133
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    22
(* FIXME !?!?! *)
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    23
ML {* val old_tr = !Output.Private_Hooks.tracing_fn *}
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    24
ML {* val old_wr = !Output.Private_Hooks.writeln_fn *}
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    25
ML {* val old_ur = !Output.Private_Hooks.urgent_message_fn *}
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    26
ML {* val old_wa = !Output.Private_Hooks.warning_fn *}
34965
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    27
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    28
quickcheck_params [size = 5, iterations = 1000]
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    29
(*
40341
03156257040f standardize on seconds for Nitpick and Sledgehammer timeouts
blanchet
parents: 40133
diff changeset
    30
nitpick_params [timeout = 5, sat_solver = MiniSat, no_overlord, verbose, card = 1-5, iter = 1,2,4,8,12]
34965
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    31
refute_params [maxtime = 10, minsize = 1, maxsize = 5, satsolver = jerusat]
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    32
*)
39324
05452dd66b2b finished renaming "Auto_Counterexample" to "Auto_Tools"
blanchet
parents: 34965
diff changeset
    33
ML {* Auto_Tools.time_limit := 10 *}
34965
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    34
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    35
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    36
text {* Uncomment the following ML code to check the counterexample generation with all theorems of Complex_Main. *}
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    37
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    38
ML {*
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    39
(*
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    40
      MutabelleExtra.random_seed := 1.0;
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    41
      MutabelleExtra.thms_of true @{theory Complex_Main}
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    42
      |> MutabelleExtra.take_random 1000000
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    43
      |> (fn thms => List.drop (thms, 1000))
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    44
      |> (fn thms => MutabelleExtra.mutate_theorems_and_write_report
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    45
             @{theory} [MutabelleExtra.quickcheck_mtd "SML",
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    46
                        MutabelleExtra.quickcheck_mtd "code"
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    47
                        (*MutabelleExtra.refute_mtd,
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    48
                        MutabelleExtra.nitpick_mtd*)] thms "/tmp/muta.out")
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    49
*)
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    50
 *}
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    51
40133
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    52
(* FIXME !?!?! *)
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    53
ML {* Output.Private_Hooks.tracing_fn := old_tr *}
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    54
ML {* Output.Private_Hooks.writeln_fn := old_wr *}
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    55
ML {* Output.Private_Hooks.urgent_message_fn := old_ur *}
b61d52de66f0 more explicit indication of Output.Private_Hooks (still public to accomodate clones of Proof General for now);
wenzelm
parents: 40132
diff changeset
    56
ML {* Output.Private_Hooks.warning_fn := old_wa *}
34965
3b4762c1052c adding Mutabelle to repository
bulwahn
parents:
diff changeset
    57
39324
05452dd66b2b finished renaming "Auto_Counterexample" to "Auto_Tools"
blanchet
parents: 34965
diff changeset
    58
end