src/HOL/Tools/Quickcheck/exhaustive_generators.ML
changeset 45484 23871e17dddb
parent 45420 d17556b9a89b
child 45683 805a2acf47fd
equal deleted inserted replaced
45482:8f32682f78fe 45484:23871e17dddb
    16     -> Proof.context -> Proof.context
    16     -> Proof.context -> Proof.context
    17   val put_validator_batch: (unit -> (int -> bool) list) -> Proof.context -> Proof.context
    17   val put_validator_batch: (unit -> (int -> bool) list) -> Proof.context -> Proof.context
    18   exception Counterexample of term list
    18   exception Counterexample of term list
    19   val smart_quantifier : bool Config.T
    19   val smart_quantifier : bool Config.T
    20   val quickcheck_pretty : bool Config.T
    20   val quickcheck_pretty : bool Config.T
       
    21   val setup_exhaustive_datatype_interpretation : theory -> theory
    21   val setup: theory -> theory
    22   val setup: theory -> theory
    22 end;
    23 end;
    23 
    24 
    24 structure Exhaustive_Generators : EXHAUSTIVE_GENERATORS =
    25 structure Exhaustive_Generators : EXHAUSTIVE_GENERATORS =
    25 struct
    26 struct
   490 
   491 
   491 val test_goals = Quickcheck_Common.generator_test_goal_terms ("exhaustive", compile_generator_expr);
   492 val test_goals = Quickcheck_Common.generator_test_goal_terms ("exhaustive", compile_generator_expr);
   492   
   493   
   493 (* setup *)
   494 (* setup *)
   494 
   495 
       
   496 val setup_exhaustive_datatype_interpretation =
       
   497   Datatype.interpretation (Quickcheck_Common.ensure_sort_datatype
       
   498       (((@{sort typerep}, @{sort term_of}), @{sort exhaustive}), instantiate_exhaustive_datatype))
       
   499 
   495 val active = Attrib.setup_config_bool @{binding quickcheck_exhaustive_active} (K true);
   500 val active = Attrib.setup_config_bool @{binding quickcheck_exhaustive_active} (K true);
   496 
   501 
   497 val setup =
   502 val setup =
   498   Datatype.interpretation (Quickcheck_Common.ensure_sort_datatype
   503   Datatype.interpretation (Quickcheck_Common.ensure_sort_datatype
   499       (((@{sort typerep}, @{sort term_of}), @{sort full_exhaustive}), instantiate_full_exhaustive_datatype))
   504       (((@{sort typerep}, @{sort term_of}), @{sort full_exhaustive}), instantiate_full_exhaustive_datatype))