make profiling depend on reference Quickcheck.timing
authorbulwahn
Wed Apr 21 12:10:53 2010 +0200 (2010-04-21)
changeset 3626101ccbaa3f49f
parent 36260 c0ab79a100e4
child 36262 d7d1d87276b7
make profiling depend on reference Quickcheck.timing
src/HOL/Tools/Predicate_Compile/predicate_compile_core.ML
     1.1 --- a/src/HOL/Tools/Predicate_Compile/predicate_compile_core.ML	Wed Apr 21 12:10:52 2010 +0200
     1.2 +++ b/src/HOL/Tools/Predicate_Compile/predicate_compile_core.ML	Wed Apr 21 12:10:53 2010 +0200
     1.3 @@ -2824,18 +2824,18 @@
     1.4      val _ = print_modes options thy' modes
     1.5      val _ = print_step options "Defining executable functions..."
     1.6      val thy'' =
     1.7 -      Output.cond_timeit true "Defining executable functions..."
     1.8 +      Output.cond_timeit (!Quickcheck.timing) "Defining executable functions..."
     1.9        (fn _ => fold (#define_functions (dest_steps steps) options preds) modes thy'
    1.10        |> Theory.checkpoint)
    1.11      val _ = print_step options "Compiling equations..."
    1.12      val compiled_terms =
    1.13 -      (*Output.cond_timeit true "Compiling equations...." (fn _ =>*)
    1.14 +      Output.cond_timeit (!Quickcheck.timing) "Compiling equations...." (fn _ =>
    1.15          compile_preds options
    1.16 -          (#comp_modifiers (dest_steps steps)) thy'' all_vs param_vs preds moded_clauses
    1.17 +          (#comp_modifiers (dest_steps steps)) thy'' all_vs param_vs preds moded_clauses)
    1.18      val _ = print_compiled_terms options thy'' compiled_terms
    1.19      val _ = print_step options "Proving equations..."
    1.20      val result_thms =
    1.21 -      Output.cond_timeit true "Proving equations...." (fn _ =>
    1.22 +      Output.cond_timeit (!Quickcheck.timing) "Proving equations...." (fn _ =>
    1.23        #prove (dest_steps steps) options thy'' clauses preds moded_clauses compiled_terms)
    1.24      val result_thms' = #add_code_equations (dest_steps steps) thy'' preds
    1.25        (maps_modes result_thms)
    1.26 @@ -2843,7 +2843,7 @@
    1.27      val attrib = fn thy => Attrib.attribute_i thy (Attrib.internal (K (Thm.declaration_attribute
    1.28        (fn thm => Context.mapping (Code.add_eqn thm) I))))
    1.29      val thy''' =
    1.30 -      Output.cond_timeit true "Setting code equations...." (fn _ =>
    1.31 +      Output.cond_timeit (!Quickcheck.timing) "Setting code equations...." (fn _ =>
    1.32        fold (fn (name, result_thms) => fn thy => snd (PureThy.add_thmss
    1.33        [((Binding.qualify true (Long_Name.base_name name) (Binding.name qname), result_thms),
    1.34          [attrib thy ])] thy))