src/HOL/Tools/ATP_Manager/atp_manager.ML
changeset 32451 8f0dc876fb1b
parent 32327 0971cc0b6a57
child 32510 1b56f8b1e5cc
equal deleted inserted replaced
32434:6b93b73a712b 32451:8f0dc876fb1b
    22   val info: unit -> unit
    22   val info: unit -> unit
    23   val messages: int option -> unit
    23   val messages: int option -> unit
    24   type prover = int -> (thm * (string * int)) list option ->
    24   type prover = int -> (thm * (string * int)) list option ->
    25     (thm * (string * int)) list option -> string -> int ->
    25     (thm * (string * int)) list option -> string -> int ->
    26     Proof.context * (thm list * thm) ->
    26     Proof.context * (thm list * thm) ->
    27     bool * string * string * string vector * (thm * (string * int)) list
    27     bool * (string * string list) * string * string vector * (thm * (string * int)) list
    28   val add_prover: string -> prover -> theory -> theory
    28   val add_prover: string -> prover -> theory -> theory
    29   val print_provers: theory -> unit
    29   val print_provers: theory -> unit
    30   val get_prover: string -> theory -> prover option
    30   val get_prover: string -> theory -> prover option
    31   val sledgehammer: string list -> Proof.state -> unit
    31   val sledgehammer: string list -> Proof.state -> unit
    32 end;
    32 end;
   303 (* named provers *)
   303 (* named provers *)
   304 
   304 
   305 type prover = int -> (thm * (string * int)) list option ->
   305 type prover = int -> (thm * (string * int)) list option ->
   306   (thm * (string * int)) list option -> string -> int ->
   306   (thm * (string * int)) list option -> string -> int ->
   307   Proof.context * (thm list * thm) ->
   307   Proof.context * (thm list * thm) ->
   308   bool * string * string * string vector * (thm * (string * int)) list
   308   bool * (string * string list) * string * string vector * (thm * (string * int)) list
   309 
   309 
   310 fun err_dup_prover name = error ("Duplicate prover: " ^ quote name);
   310 fun err_dup_prover name = error ("Duplicate prover: " ^ quote name);
   311 
   311 
   312 structure Provers = TheoryDataFun
   312 structure Provers = TheoryDataFun
   313 (
   313 (
   343             Syntax.string_of_term ctxt (Thm.term_of (Thm.cprem_of goal i))
   343             Syntax.string_of_term ctxt (Thm.term_of (Thm.cprem_of goal i))
   344         val _ = SimpleThread.fork true (fn () =>
   344         val _ = SimpleThread.fork true (fn () =>
   345           let
   345           let
   346             val _ = register birthtime deadtime (Thread.self (), desc)
   346             val _ = register birthtime deadtime (Thread.self (), desc)
   347             val result =
   347             val result =
   348               let val (success, message, _, _, _) =
   348               let val (success, (message, _), _, _, _) =
   349                 prover (get_timeout ()) NONE NONE name i (Proof.get_goal proof_state)
   349                 prover (get_timeout ()) NONE NONE name i (Proof.get_goal proof_state)
   350               in (success, message) end
   350               in (success, message) end
   351               handle ResHolClause.TOO_TRIVIAL
   351               handle ResHolClause.TOO_TRIVIAL
   352                 => (true, "Empty clause: Try this command: " ^ Markup.markup Markup.sendback "apply metis")
   352                 => (true, "Empty clause: Try this command: " ^ Markup.markup Markup.sendback "apply metis")
   353               | ERROR msg
   353               | ERROR msg