src/HOL/Tools/sat_funcs.ML
changeset 44058 ae85c5d64913
parent 41491 a2ad5b824051
child 45740 132a3e1c0fe5
equal deleted inserted replaced
44057:fda143b5c2f5 44058:ae85c5d64913
   151           | GREATER => find_res_hyps (h1 :: hyps1, hyps2) (h2 :: acc))
   151           | GREATER => find_res_hyps (h1 :: hyps1, hyps2) (h2 :: acc))
   152 
   152 
   153         fun resolution (c1, hyps1) (c2, hyps2) =
   153         fun resolution (c1, hyps1) (c2, hyps2) =
   154           let
   154           let
   155             val _ =
   155             val _ =
   156               if ! trace_sat then
   156               if ! trace_sat then  (* FIXME !? *)
   157                 tracing ("Resolving clause: " ^ Display.string_of_thm_without_context c1 ^
   157                 tracing ("Resolving clause: " ^ Display.string_of_thm_without_context c1 ^
   158                   " (hyps: " ^ ML_Syntax.print_list (Syntax.string_of_term_global (theory_of_thm c1)) (#hyps (rep_thm c1))
   158                   " (hyps: " ^ ML_Syntax.print_list
       
   159                     (Syntax.string_of_term_global (theory_of_thm c1)) (Thm.hyps_of c1)
   159                   ^ ")\nwith clause: " ^ Display.string_of_thm_without_context c2 ^
   160                   ^ ")\nwith clause: " ^ Display.string_of_thm_without_context c2 ^
   160                   " (hyps: " ^ ML_Syntax.print_list (Syntax.string_of_term_global (theory_of_thm c2)) (#hyps (rep_thm c2)) ^ ")")
   161                   " (hyps: " ^ ML_Syntax.print_list
       
   162                     (Syntax.string_of_term_global (theory_of_thm c2)) (Thm.hyps_of c2) ^ ")")
   161               else ()
   163               else ()
   162 
   164 
   163             (* the two literals used for resolution *)
   165             (* the two literals used for resolution *)
   164             val (hyp1_is_neg, hyp1, hyp2, new_hyps) = find_res_hyps (hyps1, hyps2) []
   166             val (hyp1_is_neg, hyp1, hyp2, new_hyps) = find_res_hyps (hyps1, hyps2) []
   165 
   167 
   187 
   189 
   188             val _ =
   190             val _ =
   189               if !trace_sat then
   191               if !trace_sat then
   190                 tracing ("Resulting clause: " ^ Display.string_of_thm_without_context c_new ^
   192                 tracing ("Resulting clause: " ^ Display.string_of_thm_without_context c_new ^
   191                   " (hyps: " ^ ML_Syntax.print_list
   193                   " (hyps: " ^ ML_Syntax.print_list
   192                       (Syntax.string_of_term_global (theory_of_thm c_new)) (#hyps (rep_thm c_new)) ^ ")")
   194                       (Syntax.string_of_term_global (theory_of_thm c_new)) (Thm.hyps_of c_new) ^ ")")
   193               else ()
   195               else ()
   194             val _ = Unsynchronized.inc counter
   196             val _ = Unsynchronized.inc counter
   195           in
   197           in
   196             (c_new, new_hyps)
   198             (c_new, new_hyps)
   197           end
   199           end