detailed information on atp-failure via Output.debug
authorimmler@in.tum.de
Fri, 20 Feb 2009 11:04:18 +0100
changeset 30015 1baeda435aa6
parent 30001 dd27e16677b2
child 30016 76b58a07e704
detailed information on atp-failure via Output.debug
src/HOL/Tools/atp_wrapper.ML
--- a/src/HOL/Tools/atp_wrapper.ML	Thu Feb 19 23:18:28 2009 -0800
+++ b/src/HOL/Tools/atp_wrapper.ML	Fri Feb 20 11:04:18 2009 +0100
@@ -78,10 +78,14 @@
     val failure = find_failure proof
     val success = rc = 0 andalso is_none failure
     val message =
-      if isSome failure then "Could not prove: " ^ the failure
-      else if rc <> 0
-      then "Exited with return code " ^ string_of_int rc ^ ": " ^ proof 
-      else "Try this command: " ^ produce_answer (proof, thm_names, ctxt, goal, subgoalno)
+      if success then "Try this command: " ^ produce_answer (proof, thm_names, ctxt, goal, subgoalno)
+      else "Could not prove."
+    val _ = if isSome failure
+      then Output.debug (fn () => "Sledgehammer failure: " ^ the failure ^ "\nOutput: " ^ proof)
+      else ()
+    val _ = if rc <> 0
+      then Output.debug (fn () => "Sledgehammer exited with return code " ^ string_of_int rc ^ ":\n" ^ proof)
+      else ()
   in (success, message) end;