src/HOL/Tools/Sledgehammer/sledgehammer_util.ML
changeset 50557 31313171deb5
parent 50485 3c6ac2da2f45
child 50608 5977de2993ac
equal deleted inserted replaced
50556:6209bc89faa3 50557:31313171deb5
    17   val parse_time_option : string -> string -> Time.time option
    17   val parse_time_option : string -> string -> Time.time option
    18   val subgoal_count : Proof.state -> int
    18   val subgoal_count : Proof.state -> int
    19   val reserved_isar_keyword_table : unit -> unit Symtab.table
    19   val reserved_isar_keyword_table : unit -> unit Symtab.table
    20   val thms_in_proof : string Symtab.table option -> thm -> string list
    20   val thms_in_proof : string Symtab.table option -> thm -> string list
    21   val thms_of_name : Proof.context -> string -> thm list
    21   val thms_of_name : Proof.context -> string -> thm list
       
    22   val one_day : Time.time
       
    23   val one_year : Time.time
       
    24   val time_limit : Time.time option -> ('a -> 'b) -> 'a -> 'b
    22   val with_vanilla_print_mode : ('a -> 'b) -> 'a -> 'b
    25   val with_vanilla_print_mode : ('a -> 'b) -> 'a -> 'b
    23 end;
    26 end;
    24 
    27 
    25 structure Sledgehammer_Util : SLEDGEHAMMER_UTIL =
    28 structure Sledgehammer_Util : SLEDGEHAMMER_UTIL =
    26 struct
    29 struct
   117     |> Token.source_proper
   120     |> Token.source_proper
   118     |> Source.source Token.stopper (Parse_Spec.xthms1 >> get) NONE
   121     |> Source.source Token.stopper (Parse_Spec.xthms1 >> get) NONE
   119     |> Source.exhaust
   122     |> Source.exhaust
   120   end
   123   end
   121 
   124 
       
   125 val one_day = seconds (24.0 * 60.0 * 60.0)
       
   126 val one_year = seconds (365.0 * 24.0 * 60.0 * 60.0)
       
   127 
       
   128 fun time_limit NONE = I
       
   129   | time_limit (SOME delay) = TimeLimit.timeLimit delay
       
   130 
   122 fun with_vanilla_print_mode f x =
   131 fun with_vanilla_print_mode f x =
   123   Print_Mode.setmp (filter (curry (op =) Symbol.xsymbolsN)
   132   Print_Mode.setmp (filter (curry (op =) Symbol.xsymbolsN)
   124                            (print_mode_value ())) f x
   133                            (print_mode_value ())) f x
   125 
   134 
   126 end;
   135 end;