src/HOL/Tools/Predicate_Compile/predicate_compile_quickcheck.ML
changeset 58812 5a9a2d3b9f8b
parent 57962 0284a7d083be
child 58843 521cea5fa777
equal deleted inserted replaced
58811:19382bbfa93a 58812:5a9a2d3b9f8b
    29     Proof.context -> bool * bool -> (string * typ) list -> (term * term list) list ->
    29     Proof.context -> bool * bool -> (string * typ) list -> (term * term list) list ->
    30     Quickcheck.result list
    30     Quickcheck.result list
    31   val nrandom : int Unsynchronized.ref
    31   val nrandom : int Unsynchronized.ref
    32   val debug : bool Unsynchronized.ref
    32   val debug : bool Unsynchronized.ref
    33   val no_higher_order_predicate : string list Unsynchronized.ref
    33   val no_higher_order_predicate : string list Unsynchronized.ref
    34   val setup : theory -> theory
       
    35 end;
    34 end;
    36 
    35 
    37 structure Predicate_Compile_Quickcheck : PREDICATE_COMPILE_QUICKCHECK =
    36 structure Predicate_Compile_Quickcheck : PREDICATE_COMPILE_QUICKCHECK =
    38 struct
    37 struct
    39 
    38 
   421 val smart_exhaustive_active =
   420 val smart_exhaustive_active =
   422   Attrib.setup_config_bool @{binding quickcheck_smart_exhaustive_active} (K true)
   421   Attrib.setup_config_bool @{binding quickcheck_smart_exhaustive_active} (K true)
   423 val smart_slow_exhaustive_active =
   422 val smart_slow_exhaustive_active =
   424   Attrib.setup_config_bool @{binding quickcheck_slow_smart_exhaustive_active} (K false)
   423   Attrib.setup_config_bool @{binding quickcheck_slow_smart_exhaustive_active} (K false)
   425 
   424 
   426 val setup =
   425 val _ =
   427   Exhaustive_Generators.setup_exhaustive_datatype_interpretation
   426   Theory.setup
   428   #> Context.theory_map (Quickcheck.add_tester ("smart_exhaustive",
   427    (Exhaustive_Generators.setup_exhaustive_datatype_interpretation #>
   429     (smart_exhaustive_active, test_goals (Predicate_Compile_Aux.Pos_Generator_CPS, false))))
   428     Context.theory_map (Quickcheck.add_tester ("smart_exhaustive",
   430   #> Context.theory_map (Quickcheck.add_tester ("smart_slow_exhaustive",
   429       (smart_exhaustive_active, test_goals (Predicate_Compile_Aux.Pos_Generator_CPS, false)))) #>
   431     (smart_slow_exhaustive_active, test_goals (Predicate_Compile_Aux.Pos_Generator_DSeq, false))))
   430     Context.theory_map (Quickcheck.add_tester ("smart_slow_exhaustive",
       
   431       (smart_slow_exhaustive_active, test_goals (Predicate_Compile_Aux.Pos_Generator_DSeq, false)))))
   432 
   432 
   433 end
   433 end