src/HOL/Tools/ATP/atp_reconstruct.ML
changeset 43233 2749c357f865
parent 43228 2ed2f092e990
child 43291 9f33b4ec866c
equal deleted inserted replaced
43232:bd4d26327633 43233:2749c357f865
    40     -> string proof -> (string * locality) list
    40     -> string proof -> (string * locality) list
    41   val used_facts_in_unsound_atp_proof :
    41   val used_facts_in_unsound_atp_proof :
    42     Proof.context -> type_sys -> int list list -> int
    42     Proof.context -> type_sys -> int list list -> int
    43     -> (string * locality) list vector -> 'a proof -> string list option
    43     -> (string * locality) list vector -> 'a proof -> string list option
    44   val uses_typed_helpers : int list -> 'a proof -> bool
    44   val uses_typed_helpers : int list -> 'a proof -> bool
    45   val reconstructor_name : reconstructor -> string
       
    46   val one_line_proof_text : one_line_params -> string
    45   val one_line_proof_text : one_line_params -> string
    47   val make_tvar : string -> typ
    46   val make_tvar : string -> typ
    48   val make_tfree : Proof.context -> string -> typ
    47   val make_tfree : Proof.context -> string -> typ
    49   val term_from_atp :
    48   val term_from_atp :
    50     Proof.context -> bool -> int Symtab.table -> typ option -> string fo_term
    49     Proof.context -> bool -> int Symtab.table -> typ option -> string fo_term
   252 
   251 
   253 
   252 
   254 (** Soft-core proof reconstruction: Metis one-liner **)
   253 (** Soft-core proof reconstruction: Metis one-liner **)
   255 
   254 
   256 (* unfortunate leaking abstraction *)
   255 (* unfortunate leaking abstraction *)
   257 fun reconstructor_name Metis = "metis"
   256 fun name_of_reconstructor Metis = "metis"
   258   | reconstructor_name Metis_Full_Types = "metis (full_types)"
   257   | name_of_reconstructor Metis_Full_Types = "metis (full_types)"
   259   | reconstructor_name Metis_No_Types = "metis (no_types)"
   258   | name_of_reconstructor Metis_No_Types = "metis (no_types)"
   260   | reconstructor_name (SMT _) = "smt"
   259   | name_of_reconstructor (SMT _) = "smt"
   261 
   260 
   262 fun reconstructor_settings (SMT settings) = settings
   261 fun reconstructor_settings (SMT settings) = settings
   263   | reconstructor_settings _ = ""
   262   | reconstructor_settings _ = ""
   264 
   263 
   265 fun string_for_label (s, num) = s ^ string_of_int num
   264 fun string_for_label (s, num) = s ^ string_of_int num
   281   | using_labels ls =
   280   | using_labels ls =
   282     "using " ^ space_implode " " (map string_for_label ls) ^ " "
   281     "using " ^ space_implode " " (map string_for_label ls) ^ " "
   283 fun reconstructor_command reconstructor i n (ls, ss) =
   282 fun reconstructor_command reconstructor i n (ls, ss) =
   284   using_labels ls ^
   283   using_labels ls ^
   285   apply_on_subgoal (reconstructor_settings reconstructor) i n ^
   284   apply_on_subgoal (reconstructor_settings reconstructor) i n ^
   286   command_call (reconstructor_name reconstructor) ss
   285   command_call (name_of_reconstructor reconstructor) ss
   287 fun minimize_line _ [] = ""
   286 fun minimize_line _ [] = ""
   288   | minimize_line minimize_command ss =
   287   | minimize_line minimize_command ss =
   289     case minimize_command ss of
   288     case minimize_command ss of
   290       "" => ""
   289       "" => ""
   291     | command => "\nTo minimize: " ^ Markup.markup Markup.sendback command ^ "."
   290     | command => "\nTo minimize: " ^ Markup.markup Markup.sendback command ^ "."