src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML
changeset 57918 f5d73caba4e5
parent 57814 7a9aaddb3203
child 58028 e4250d370657
equal deleted inserted replaced
57917:8ce97e5d545f 57918:f5d73caba4e5
   523     ({pre=st, timeout, log, pos, ...}: Mirabelle.run_args) =
   523     ({pre=st, timeout, log, pos, ...}: Mirabelle.run_args) =
   524   let
   524   let
   525     fun do_method named_thms ctxt =
   525     fun do_method named_thms ctxt =
   526       let
   526       let
   527         val ref_of_str =
   527         val ref_of_str =
   528           suffix ";" #> Outer_Syntax.scan Position.none #> Parse_Spec.xthm
   528           suffix ";" #> Outer_Syntax.scan (Keyword.get_lexicons ()) Position.none #> Parse_Spec.xthm
   529           #> fst
   529           #> fst
   530         val thms = named_thms |> maps snd
   530         val thms = named_thms |> maps snd
   531         val facts = named_thms |> map (ref_of_str o fst o fst)
   531         val facts = named_thms |> map (ref_of_str o fst o fst)
   532         val fact_override = {add = facts, del = [], only = true}
   532         val fact_override = {add = facts, del = [], only = true}
   533         fun my_timeout time_slice =
   533         fun my_timeout time_slice =
   549             ATP_Proof_Reconstruct.default_metis_lam_trans ctxt thms
   549             ATP_Proof_Reconstruct.default_metis_lam_trans ctxt thms
   550         else if String.isPrefix "metis (" (!meth) then
   550         else if String.isPrefix "metis (" (!meth) then
   551           let
   551           let
   552             val (type_encs, lam_trans) =
   552             val (type_encs, lam_trans) =
   553               !meth
   553               !meth
   554               |> Outer_Syntax.scan Position.start
   554               |> Outer_Syntax.scan (Keyword.get_lexicons ()) Position.start
   555               |> filter Token.is_proper |> tl
   555               |> filter Token.is_proper |> tl
   556               |> Metis_Tactic.parse_metis_options |> fst
   556               |> Metis_Tactic.parse_metis_options |> fst
   557               |>> the_default [ATP_Proof_Reconstruct.partial_typesN]
   557               |>> the_default [ATP_Proof_Reconstruct.partial_typesN]
   558               ||> the_default ATP_Proof_Reconstruct.default_metis_lam_trans
   558               ||> the_default ATP_Proof_Reconstruct.default_metis_lam_trans
   559           in Metis_Tactic.metis_tac type_encs lam_trans ctxt thms end
   559           in Metis_Tactic.metis_tac type_encs lam_trans ctxt thms end