src/HOL/Tools/Sledgehammer/sledgehammer_provers.ML
changeset 52997 ea02bc4e9a5f
parent 52754 d9d90d29860e
child 53047 8dceafa07c4f
equal deleted inserted replaced
52996:9a47c8256054 52997:ea02bc4e9a5f
    14   type fact = Sledgehammer_Fact.fact
    14   type fact = Sledgehammer_Fact.fact
    15   type reconstructor = Sledgehammer_Reconstructor.reconstructor
    15   type reconstructor = Sledgehammer_Reconstructor.reconstructor
    16   type play = Sledgehammer_Reconstructor.play
    16   type play = Sledgehammer_Reconstructor.play
    17   type minimize_command = Sledgehammer_Reconstructor.minimize_command
    17   type minimize_command = Sledgehammer_Reconstructor.minimize_command
    18 
    18 
    19   datatype mode = Auto_Try | Try | Normal | MaSh | Auto_Minimize | Minimize
    19   datatype mode = Auto_Try | Try | Normal | Normal_Result | MaSh | Auto_Minimize | Minimize
    20 
    20 
    21   type params =
    21   type params =
    22     {debug : bool,
    22     {debug : bool,
    23      verbose : bool,
    23      verbose : bool,
    24      overlord : bool,
    24      overlord : bool,
   159 open Sledgehammer_Reconstruct
   159 open Sledgehammer_Reconstruct
   160 
   160 
   161 
   161 
   162 (** The Sledgehammer **)
   162 (** The Sledgehammer **)
   163 
   163 
   164 datatype mode = Auto_Try | Try | Normal | MaSh | Auto_Minimize | Minimize
   164 datatype mode = Auto_Try | Try | Normal | Normal_Result | MaSh | Auto_Minimize | Minimize
   165 
   165 
   166 (* Identifier that distinguishes Sledgehammer from other tools that could use
   166 (* Identifier that distinguishes Sledgehammer from other tools that could use
   167    "Async_Manager". *)
   167    "Async_Manager". *)
   168 val SledgehammerN = "Sledgehammer"
   168 val SledgehammerN = "Sledgehammer"
   169 
   169 
   665          (max_new_instances |> the_default best_max_new_instances)
   665          (max_new_instances |> the_default best_max_new_instances)
   666 
   666 
   667 fun suffix_of_mode Auto_Try = "_try"
   667 fun suffix_of_mode Auto_Try = "_try"
   668   | suffix_of_mode Try = "_try"
   668   | suffix_of_mode Try = "_try"
   669   | suffix_of_mode Normal = ""
   669   | suffix_of_mode Normal = ""
       
   670   | suffix_of_mode Normal_Result = ""
   670   | suffix_of_mode MaSh = ""
   671   | suffix_of_mode MaSh = ""
   671   | suffix_of_mode Auto_Minimize = "_min"
   672   | suffix_of_mode Auto_Minimize = "_min"
   672   | suffix_of_mode Minimize = "_min"
   673   | suffix_of_mode Minimize = "_min"
   673 
   674 
   674 (* Give the ATPs some slack before interrupting them the hard way. "z3_tptp" on
   675 (* Give the ATPs some slack before interrupting them the hard way. "z3_tptp" on
   928       else File.write (Path.explode (Path.implode prob_path ^ "_proof")) output
   929       else File.write (Path.explode (Path.implode prob_path ^ "_proof")) output
   929     val ((_, (_, pool, fact_names, lifted, sym_tab)),
   930     val ((_, (_, pool, fact_names, lifted, sym_tab)),
   930          (output, run_time, used_from, atp_proof, outcome)) =
   931          (output, run_time, used_from, atp_proof, outcome)) =
   931       with_cleanup clean_up run () |> tap export
   932       with_cleanup clean_up run () |> tap export
   932     val important_message =
   933     val important_message =
   933       if mode = Normal andalso
   934       if (mode = Normal orelse mode = Normal_Result) andalso
   934          random_range 0 (atp_important_message_keep_quotient - 1) = 0 then
   935          random_range 0 (atp_important_message_keep_quotient - 1) = 0 then
   935         extract_important_message output
   936         extract_important_message output
   936       else
   937       else
   937         ""
   938         ""
   938     val (used_facts, preplay, message, message_tail) =
   939     val (used_facts, preplay, message, message_tail) =