improved ad hoc success detection in Mirabelle -- if the metis call fails and the structured proof succeeds, remember only the success
authorblanchet
Mon, 19 Aug 2013 12:05:33 +0200
changeset 53081 2a62d848a56a
parent 53080 d815e25ead03
child 53082 369e39511555
improved ad hoc success detection in Mirabelle -- if the metis call fails and the structured proof succeeds, remember only the success
src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML
--- a/src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML	Sun Aug 18 23:37:38 2013 +0200
+++ b/src/HOL/Mirabelle/Tools/mirabelle_sledgehammer.ML	Mon Aug 19 12:05:33 2013 +0200
@@ -383,14 +383,18 @@
 
 type stature = ATP_Problem_Generate.stature
 
+fun good_line s =
+  (String.isSubstring " ms)" s orelse String.isSubstring " s)" s)
+  andalso not (String.isSubstring "(> " s)
+  andalso not (String.isSubstring ", > " s)
+  andalso not (String.isSubstring "may fail" s)
+
 (* Fragile hack *)
 fun reconstructor_from_msg args msg =
   (case AList.lookup (op =) args reconstructorK of
     SOME name => name
   | NONE =>
-    if (String.isSubstring " ms)" msg orelse String.isSubstring " s)" msg)
-       andalso not (String.isSubstring "(> " msg)
-       andalso not (String.isSubstring ", > " msg) then
+    if exists good_line (split_lines msg) then
       "none" (* trust the preplayed proof *)
     else if String.isSubstring "metis (" msg then
       msg |> Substring.full