src/HOL/Tools/ATP/atp_systems.ML
changeset 57672 6be755147695
parent 57671 dc5e1b1db9ba
child 57707 0242e9578828
equal deleted inserted replaced
57671:dc5e1b1db9ba 57672:6be755147695
   259      |> map (fn (s, w) => "," ^ s ^ ":" ^
   259      |> map (fn (s, w) => "," ^ s ^ ":" ^
   260                           scaled_e_selection_weight ctxt heuristic w)
   260                           scaled_e_selection_weight ctxt heuristic w)
   261      |> implode) ^
   261      |> implode) ^
   262     "),3*ConjectureGeneralSymbolWeight(PreferNonGoals,200,100,200,50,50,1,100,\
   262     "),3*ConjectureGeneralSymbolWeight(PreferNonGoals,200,100,200,50,50,1,100,\
   263     \1.5,1.5,1),1*Clauseweight(PreferProcessed,1,1,1),1*\
   263     \1.5,1.5,1),1*Clauseweight(PreferProcessed,1,1,1),1*\
   264     \FIFOWeight(PreferProcessed))'"
   264     \FIFOWeight(PreferProcessed))' "
   265   else
   265   else
   266     "-xAuto"
   266     "-xAuto "
   267 
   267 
   268 val e_ord_weights =
   268 val e_ord_weights =
   269   map (fn (s, w) => s ^ ":" ^ string_of_int w) #> space_implode ","
   269   map (fn (s, w) => s ^ ":" ^ string_of_int w) #> space_implode ","
   270 fun e_ord_precedence [_] = ""
   270 fun e_ord_precedence [_] = ""
   271   | e_ord_precedence info = info |> map fst |> space_implode "<"
   271   | e_ord_precedence info = info |> map fst |> space_implode "<"
   272 
   272 
   273 fun e_term_order_info_arguments false false _ = ""
   273 fun e_term_order_info_arguments false false _ = ""
   274   | e_term_order_info_arguments gen_weights gen_prec ord_info =
   274   | e_term_order_info_arguments gen_weights gen_prec ord_info =
   275     let val ord_info = ord_info () in
   275     let val ord_info = ord_info () in
   276       (if gen_weights then "--order-weights='" ^ e_ord_weights ord_info ^ "' "
   276       (if gen_weights then "--order-weights='" ^ e_ord_weights ord_info ^ "' " else "") ^
   277        else "") ^
   277       (if gen_prec then "--precedence='" ^ e_ord_precedence ord_info ^ "' " else "")
   278       (if gen_prec then "--precedence='" ^ e_ord_precedence ord_info ^ "' "
       
   279        else "")
       
   280     end
   278     end
   281 
   279 
   282 val e_config : atp_config =
   280 val e_config : atp_config =
   283   {exec = fn full_proofs => (["E_HOME"],
   281   {exec = fn full_proofs => (["E_HOME"],
   284      if full_proofs orelse not (is_e_at_least_1_8 ()) then ["eproof_ram", "eproof"]
   282      if full_proofs orelse not (is_e_at_least_1_8 ()) then ["eproof_ram", "eproof"]
   285      else ["eprover"]),
   283      else ["eprover"]),
   286    arguments = fn ctxt => fn full_proofs => fn heuristic => fn timeout => fn file_name =>
   284    arguments = fn ctxt => fn full_proofs => fn heuristic => fn timeout => fn file_name =>
   287      fn ({is_lpo, gen_weights, gen_prec, ...}, ord_info, sel_weights) =>
   285      fn ({is_lpo, gen_weights, gen_prec, ...}, ord_info, sel_weights) =>
   288        (if is_e_at_least_1_8 () then "--auto-schedule " else "") ^
   286        (if is_e_at_least_1_8 () then "--auto-schedule " else "") ^
   289        "--tstp-in --tstp-out --silent " ^
   287        "--tstp-in --tstp-out --silent " ^
   290        e_selection_weight_arguments ctxt heuristic sel_weights ^ " " ^
   288        e_selection_weight_arguments ctxt heuristic sel_weights ^
   291        e_term_order_info_arguments gen_weights gen_prec ord_info ^ " " ^
   289        e_term_order_info_arguments gen_weights gen_prec ord_info ^
   292        "--term-ordering=" ^ (if is_lpo then "LPO4" else "KBO6") ^ " " ^
   290        "--term-ordering=" ^ (if is_lpo then "LPO4" else "KBO6") ^ " " ^
   293        "--cpu-limit=" ^ string_of_int (to_secs 2 timeout) ^
   291        "--cpu-limit=" ^ string_of_int (to_secs 2 timeout) ^
   294        (if full_proofs orelse not (is_e_at_least_1_8 ()) then
   292        (if full_proofs orelse not (is_e_at_least_1_8 ()) then
   295           " --output-level=5 --pcl-shell-level=" ^ (if full_proofs then "0" else "2")
   293           " --output-level=5 --pcl-shell-level=" ^ (if full_proofs then "0" else "2")
   296         else
   294         else