198 singleton (Attrib.eval_thms ctxt) (Facts.named isa_short_ext, [])) then |
198 singleton (Attrib.eval_thms ctxt) (Facts.named isa_short_ext, [])) then |
199 isa_short_ext |
199 isa_short_ext |
200 else |
200 else |
201 isa_ext |
201 isa_ext |
202 |
202 |
203 fun add_all_defs fact_names accum = |
203 fun add_non_rec_defs fact_names accum = |
204 Vector.foldl |
204 Vector.foldl |
205 (fn (facts, facts') => |
205 (fn (facts, facts') => |
206 union (op =) (filter (fn (_, (_, status)) => status = Def) facts) |
206 union (op =) |
|
207 (filter (fn (_, (_, status)) => status = Non_Rec_Def) facts) |
207 facts') |
208 facts') |
208 accum fact_names |
209 accum fact_names |
209 |
210 |
210 fun add_fact ctxt fact_names (Inference_Step ((_, ss), _, rule, deps)) = |
211 fun add_fact ctxt fact_names (Inference_Step ((_, ss), _, rule, deps)) = |
211 (if rule = leo2_ext then |
212 (if rule = leo2_ext then |
212 insert (op =) (ext_name ctxt, (Global, General)) |
213 insert (op =) (ext_name ctxt, (Global, General)) |
213 else if rule = leo2_unfold_def then |
214 else if rule = leo2_unfold_def then |
214 (* LEO 1.3.3 does not record definitions properly, leading to missing |
215 (* LEO 1.3.3 does not record definitions properly, leading to missing |
215 dependencies in the TSTP proof. Remove the next line once this is |
216 dependencies in the TSTP proof. Remove the next line once this is |
216 fixed. *) |
217 fixed. *) |
217 add_all_defs fact_names |
218 add_non_rec_defs fact_names |
218 else if rule = satallax_unsat_coreN then |
219 else if rule = satallax_unsat_coreN then |
219 (fn [] => |
220 (fn [] => |
220 (* Satallax doesn't include definitions in its unsatisfiable cores, |
221 (* Satallax doesn't include definitions in its unsatisfiable cores, |
221 so we assume the worst and include them all here. *) |
222 so we assume the worst and include them all here. *) |
222 [(ext_name ctxt, (Global, General))] |> add_all_defs fact_names |
223 [(ext_name ctxt, (Global, General))] |> add_non_rec_defs fact_names |
223 | facts => facts) |
224 | facts => facts) |
224 else |
225 else |
225 I) |
226 I) |
226 #> (if null deps then union (op =) (resolve_fact fact_names ss) |
227 #> (if null deps then union (op =) (resolve_fact fact_names ss) |
227 else I) |
228 else I) |