src/HOL/Tools/Sledgehammer/sledgehammer_proof_methods.ML
changeset 58061 3d060f43accb
parent 57948 75724d71013c
child 58072 a86c962de77f
equal deleted inserted replaced
58060:835b5443b978 58061:3d060f43accb
    10   type stature = ATP_Problem_Generate.stature
    10   type stature = ATP_Problem_Generate.stature
    11 
    11 
    12   datatype proof_method =
    12   datatype proof_method =
    13     Metis_Method of string option * string option |
    13     Metis_Method of string option * string option |
    14     Meson_Method |
    14     Meson_Method |
    15     SMT2_Method |
    15     SMT_Method |
    16     SATx_Method |
    16     SATx_Method |
    17     Blast_Method |
    17     Blast_Method |
    18     Simp_Method |
    18     Simp_Method |
    19     Simp_Size_Method |
    19     Simp_Size_Method |
    20     Auto_Method |
    20     Auto_Method |
    49 open ATP_Proof_Reconstruct
    49 open ATP_Proof_Reconstruct
    50 
    50 
    51 datatype proof_method =
    51 datatype proof_method =
    52   Metis_Method of string option * string option |
    52   Metis_Method of string option * string option |
    53   Meson_Method |
    53   Meson_Method |
    54   SMT2_Method |
    54   SMT_Method |
    55   SATx_Method |
    55   SATx_Method |
    56   Blast_Method |
    56   Blast_Method |
    57   Simp_Method |
    57   Simp_Method |
    58   Simp_Size_Method |
    58   Simp_Size_Method |
    59   Auto_Method |
    59   Auto_Method |
    71 type one_line_params =
    71 type one_line_params =
    72   ((string * stature) list * (proof_method * play_outcome)) * string * int * int
    72   ((string * stature) list * (proof_method * play_outcome)) * string * int * int
    73 
    73 
    74 fun is_proof_method_direct (Metis_Method _) = true
    74 fun is_proof_method_direct (Metis_Method _) = true
    75   | is_proof_method_direct Meson_Method = true
    75   | is_proof_method_direct Meson_Method = true
    76   | is_proof_method_direct SMT2_Method = true
    76   | is_proof_method_direct SMT_Method = true
    77   | is_proof_method_direct Simp_Method = true
    77   | is_proof_method_direct Simp_Method = true
    78   | is_proof_method_direct Simp_Size_Method = true
    78   | is_proof_method_direct Simp_Size_Method = true
    79   | is_proof_method_direct _ = false
    79   | is_proof_method_direct _ = false
    80 
    80 
    81 fun maybe_paren s = s |> not (Symbol_Pos.is_identifier s) ? enclose "(" ")"
    81 fun maybe_paren s = s |> not (Symbol_Pos.is_identifier s) ? enclose "(" ")"
    86       (case meth of
    86       (case meth of
    87         Metis_Method (NONE, NONE) => "metis"
    87         Metis_Method (NONE, NONE) => "metis"
    88       | Metis_Method (type_enc_opt, lam_trans_opt) =>
    88       | Metis_Method (type_enc_opt, lam_trans_opt) =>
    89         "metis (" ^ commas (map_filter I [type_enc_opt, lam_trans_opt]) ^ ")"
    89         "metis (" ^ commas (map_filter I [type_enc_opt, lam_trans_opt]) ^ ")"
    90       | Meson_Method => "meson"
    90       | Meson_Method => "meson"
    91       | SMT2_Method => "smt2"
    91       | SMT_Method => "smt"
    92       | SATx_Method => "satx"
    92       | SATx_Method => "satx"
    93       | Blast_Method => "blast"
    93       | Blast_Method => "blast"
    94       | Simp_Method => if null ss then "simp" else "simp add:"
    94       | Simp_Method => if null ss then "simp" else "simp add:"
    95       | Simp_Size_Method => "simp add: " ^ short_thm_name ctxt @{thm size_ne_size_imp_ne}
    95       | Simp_Size_Method => "simp add: " ^ short_thm_name ctxt @{thm size_ne_size_imp_ne}
    96       | Auto_Method => "auto"
    96       | Auto_Method => "auto"
   112     let val ctxt = Config.put Metis_Tactic.verbose false ctxt in
   112     let val ctxt = Config.put Metis_Tactic.verbose false ctxt in
   113       Metis_Tactic.metis_tac [type_enc_opt |> the_default (hd partial_type_encs)]
   113       Metis_Tactic.metis_tac [type_enc_opt |> the_default (hd partial_type_encs)]
   114         (lam_trans_opt |> the_default default_metis_lam_trans) ctxt global_facts
   114         (lam_trans_opt |> the_default default_metis_lam_trans) ctxt global_facts
   115     end
   115     end
   116   | Meson_Method => Meson_Tactic.meson_general_tac (silence_methods ctxt) global_facts
   116   | Meson_Method => Meson_Tactic.meson_general_tac (silence_methods ctxt) global_facts
   117   | SMT2_Method =>
   117   | SMT_Method =>
   118     let val ctxt = Config.put SMT2_Config.verbose false ctxt in
   118     let val ctxt = Config.put SMT_Config.verbose false ctxt in
   119       SMT2_Solver.smt2_tac ctxt global_facts
   119       SMT_Solver.smt_tac ctxt global_facts
   120     end
   120     end
   121   | Simp_Method => Simplifier.asm_full_simp_tac (silence_methods ctxt addsimps global_facts)
   121   | Simp_Method => Simplifier.asm_full_simp_tac (silence_methods ctxt addsimps global_facts)
   122   | Simp_Size_Method =>
   122   | Simp_Size_Method =>
   123     Simplifier.asm_full_simp_tac
   123     Simplifier.asm_full_simp_tac
   124       (silence_methods ctxt addsimps (@{thm size_ne_size_imp_ne} :: global_facts))
   124       (silence_methods ctxt addsimps (@{thm size_ne_size_imp_ne} :: global_facts))