src/HOL/Tools/ATP_Manager/atp_wrapper.ML
changeset 35010 d6e492cea6e4
parent 33316 6a72af4e84b8
child 35570 0e30eef52d85
equal deleted inserted replaced
35009:5408e5207131 35010:d6e492cea6e4
   166     fun split_time' s =
   166     fun split_time' s =
   167       if Config.get ctxt measure_runtime then split_time s else (s, 0)
   167       if Config.get ctxt measure_runtime then split_time s else (s, 0)
   168     fun run_on probfile =
   168     fun run_on probfile =
   169       if File.exists cmd then
   169       if File.exists cmd then
   170         write probfile clauses
   170         write probfile clauses
   171         |> pair (apfst split_time' (system_out (cmd_line probfile)))
   171         |> pair (apfst split_time' (bash_output (cmd_line probfile)))
   172       else error ("Bad executable: " ^ Path.implode cmd);
   172       else error ("Bad executable: " ^ Path.implode cmd);
   173 
   173 
   174     (* if problemfile has not been exported, delete problemfile; otherwise export proof, too *)
   174     (* if problemfile has not been exported, delete problemfile; otherwise export proof, too *)
   175     fun cleanup probfile = if destdir' = "" then try File.rm probfile else NONE;
   175     fun cleanup probfile = if destdir' = "" then try File.rm probfile else NONE;
   176     fun export probfile (((proof, _), _), _) =
   176     fun export probfile (((proof, _), _), _) =
   304 
   304 
   305 val systems = Synchronized.var "atp_wrapper_systems" ([]: string list);
   305 val systems = Synchronized.var "atp_wrapper_systems" ([]: string list);
   306 
   306 
   307 fun get_systems () =
   307 fun get_systems () =
   308   let
   308   let
   309     val (answer, rc) = system_out ("\"$ISABELLE_ATP_MANAGER/SystemOnTPTP\" -w")
   309     val (answer, rc) = bash_output ("\"$ISABELLE_ATP_MANAGER/SystemOnTPTP\" -w")
   310   in
   310   in
   311     if rc <> 0 then error ("Failed to get available systems from SystemOnTPTP:\n" ^ answer)
   311     if rc <> 0 then error ("Failed to get available systems from SystemOnTPTP:\n" ^ answer)
   312     else split_lines answer
   312     else split_lines answer
   313   end;
   313   end;
   314 
   314