better error reporting;
authorblanchet
Sat, 24 Apr 2010 16:05:42 +0200
changeset 36383 6adf1068ac0f
parent 36382 b90fc0d75bca
child 36384 76d5fd5a45fb
better error reporting; in particular, users shouldn't panic if "metis" can prove "False", especially in "neg_clausify"-style proofs
src/HOL/Tools/ATP_Manager/atp_manager.ML
src/HOL/Tools/Sledgehammer/metis_tactics.ML
--- a/src/HOL/Tools/ATP_Manager/atp_manager.ML	Fri Apr 23 19:36:49 2010 +0200
+++ b/src/HOL/Tools/ATP_Manager/atp_manager.ML	Sat Apr 24 16:05:42 2010 +0200
@@ -352,7 +352,7 @@
         val message =
           #message (prover params (minimize_command name) timeout problem)
           handle Sledgehammer_HOL_Clause.TRIVIAL => metis_line i n []
-               | ERROR msg => "Error: " ^ msg ^ ".\n";
+               | ERROR message => "Error: " ^ message ^ "\n"
         val _ = unregister params message (Thread.self ());
       in () end)
   in () end
--- a/src/HOL/Tools/Sledgehammer/metis_tactics.ML	Fri Apr 23 19:36:49 2010 +0200
+++ b/src/HOL/Tools/Sledgehammer/metis_tactics.ML	Sat Apr 24 16:05:42 2010 +0200
@@ -693,10 +693,11 @@
                 val unused = th_cls_pairs |> map_filter (fn (name, cls) =>
                   if common_thm used cls then NONE else SOME name)
             in
-                if not (common_thm used cls) then
-                  warning "Metis: The goal is provable because the context is \
-                          \inconsistent."
-                else if not (null unused) then
+                if not (null cls) andalso not (common_thm used cls) then
+                  warning "Metis: The assumptions are inconsistent."
+                else
+                  ();
+                if not (null unused) then
                   warning ("Metis: Unused theorems: " ^ commas_quote unused
                            ^ ".")
                 else