postprocess ATP output in "overlord" mode to make it more readable
authorblanchet
Thu, 22 Apr 2010 10:13:02 +0200
changeset 36284 0e24322474a4
parent 36283 25e69e93954d
child 36285 d868b34d604c
postprocess ATP output in "overlord" mode to make it more readable
src/HOL/Tools/ATP_Manager/atp_wrapper.ML
--- a/src/HOL/Tools/ATP_Manager/atp_wrapper.ML	Wed Apr 21 17:06:26 2010 +0200
+++ b/src/HOL/Tools/ATP_Manager/atp_wrapper.ML	Thu Apr 22 10:13:02 2010 +0200
@@ -112,12 +112,17 @@
 
     (* write out problem file and call prover *)
     fun cmd_line probfile =
-      if Config.get ctxt measure_runtime then
-        "TIMEFORMAT='%3U'; { time " ^ space_implode " " [File.shell_path cmd,
-        args, File.shell_path probfile] ^ " ; } 2>&1"
-      else
-        space_implode " " ["exec", File.shell_path cmd, args,
-        File.shell_path probfile, "2>&1"];
+      (if Config.get ctxt measure_runtime then
+         "TIMEFORMAT='%3U'; { time " ^ space_implode " " [File.shell_path cmd,
+         args, File.shell_path probfile] ^ " ; } 2>&1"
+       else
+         space_implode " " ["exec", File.shell_path cmd, args,
+         File.shell_path probfile, "2>&1"]) ^
+      (if overlord then
+         " | sed 's/,/, /g' | sed 's/\\([=|]\\)/ \\1 /g' | sed 's/! =/ !=/g' \
+         \| sed 's/  / /g'"
+       else
+         "")
     fun split_time s =
       let
         val split = String.tokens (fn c => str c = "\n");
@@ -160,7 +165,7 @@
       if success then
         proof_text ctxt minimize_command proof internal_thm_names th subgoal
       else if failure <> "" then
-        (failure, [])
+        (failure ^ "\n", [])
       else
         ("Unknown ATP error: " ^ proof ^ ".\n", [])
   in