set Metis option on correct context, lest it be ignored
authorblanchet
Thu, 25 Nov 2010 13:26:12 +0100
changeset 40693 a4171afcc3c4
parent 40692 7fa054c3f810
child 40694 77435a7853d1
child 40695 1b2573c3b222
set Metis option on correct context, lest it be ignored
src/HOL/Tools/Sledgehammer/sledgehammer.ML
--- a/src/HOL/Tools/Sledgehammer/sledgehammer.ML	Thu Nov 25 12:11:12 2010 +0100
+++ b/src/HOL/Tools/Sledgehammer/sledgehammer.ML	Thu Nov 25 13:26:12 2010 +0100
@@ -516,16 +516,16 @@
 
 val smt_metis_timeout = seconds 0.5
 
-fun can_apply_metis state i ths =
-  can_apply smt_metis_timeout (fn ctxt => Metis_Tactics.metis_tac ctxt ths)
-            state i
+fun can_apply_metis debug state i ths =
+  can_apply smt_metis_timeout
+            (Config.put Metis_Tactics.verbose debug
+             #> (fn ctxt => Metis_Tactics.metis_tac ctxt ths)) state i
 
 fun run_smt_solver auto remote (params as {debug, ...}) minimize_command
         ({state, subgoal, subgoal_count, facts, ...} : prover_problem) =
   let
     val repair_context =
-      Config.put Metis_Tactics.verbose debug
-      #> Config.put SMT_Config.verbose debug
+      Config.put SMT_Config.verbose debug
       #> Config.put SMT_Config.monomorph_limit smt_monomorph_limit
     val state = state |> Proof.map_context repair_context
     val thy = Proof.theory_of state
@@ -538,8 +538,10 @@
         NONE =>
         let
           val method =
-            if can_apply_metis state subgoal (map snd used_facts) then "metis"
-            else "smt"
+            if can_apply_metis debug state subgoal (map snd used_facts) then
+              "metis"
+            else
+              "smt"
         in
           try_command_line (proof_banner auto)
                            (apply_on_subgoal subgoal subgoal_count ^