265 fun insert_tms [] tms_names = tms_names |
265 fun insert_tms [] tms_names = tms_names |
266 | insert_tms ((tm,name)::tms_names) tms_names' = |
266 | insert_tms ((tm,name)::tms_names) tms_names' = |
267 if mem_tm tm tms_names' then insert_tms tms_names tms_names' |
267 if mem_tm tm tms_names' then insert_tms tms_names tms_names' |
268 else insert_tms tms_names ((tm,name)::tms_names'); |
268 else insert_tms tms_names ((tm,name)::tms_names'); |
269 |
269 |
270 fun warning_thms [] = () |
270 fun display_thms [] = () |
271 | warning_thms ((name,thm)::nthms) = |
271 | display_thms ((name,thm)::nthms) = |
272 let val nthm = name ^ ": " ^ (string_of_thm thm) |
272 let val nthm = name ^ ": " ^ (string_of_thm thm) |
273 in warning nthm; warning_thms nthms end; |
273 in Output.debug nthm; display_thms nthms end; |
274 |
274 |
275 (*Write out the claset, simpset and atpset rules of the supplied theory.*) |
275 (*Write out the claset, simpset and atpset rules of the supplied theory.*) |
276 (* also write supplied user rules, they are not relevance filtered *) |
276 (* also write supplied user rules, they are not relevance filtered *) |
277 fun get_clasimp_atp_lemmas ctxt goals user_thms (use_claset, use_simpset', use_atpset) run_filter = |
277 fun get_clasimp_atp_lemmas ctxt goals user_thms (use_claset, use_simpset', use_atpset) run_filter = |
278 let val claset_thms = |
278 let val claset_thms = |
285 else [] |
285 else [] |
286 val atpset_thms = |
286 val atpset_thms = |
287 if use_atpset then |
287 if use_atpset then |
288 map put_name_pair (ResAxioms.atpset_rules_of_ctxt ctxt) |
288 map put_name_pair (ResAxioms.atpset_rules_of_ctxt ctxt) |
289 else [] |
289 else [] |
290 val _ = warning_thms atpset_thms |
290 val _ = if !Output.show_debug_msgs then (Output.debug "ATP theorems: "; display_thms atpset_thms) else () |
291 val user_rules = |
291 val user_rules = |
292 case user_thms of (*use whitelist if there are no user-supplied rules*) |
292 case user_thms of (*use whitelist if there are no user-supplied rules*) |
293 [] => map (put_name_pair o ResAxioms.pairname) (!whitelist) |
293 [] => map (put_name_pair o ResAxioms.pairname) (!whitelist) |
294 | _ => map put_name_pair user_thms |
294 | _ => map put_name_pair user_thms |
295 val banned = make_banned_test (map #1 (user_rules@atpset_thms@claset_thms@simpset_thms)) |
295 val banned = make_banned_test (map #1 (user_rules@atpset_thms@claset_thms@simpset_thms)) |