191 Classical.appWrappers cs |
191 Classical.appWrappers cs |
192 (Classical.instp_step_tac cs APPEND' Classical.haz_step_tac cs); |
192 (Classical.instp_step_tac cs APPEND' Classical.haz_step_tac cs); |
193 |
193 |
194 in |
194 in |
195 |
195 |
196 fun nodup_depth_tac cs m i state = |
196 fun nodup_depth_tac cs m i st = |
197 SELECT_GOAL |
197 SELECT_GOAL |
198 (Classical.safe_steps_tac cs 1 THEN_ELSE |
198 (Classical.safe_steps_tac cs 1 THEN_ELSE |
199 (DEPTH_SOLVE (nodup_depth_tac cs m 1), |
199 (DEPTH_SOLVE (nodup_depth_tac cs m 1), |
200 Classical.inst0_step_tac cs 1 APPEND COND (K (m = 0)) no_tac |
200 Classical.inst0_step_tac cs 1 APPEND COND (K (m = 0)) no_tac |
201 (slow_step_tac' cs 1 THEN DEPTH_SOLVE (nodup_depth_tac cs (m - 1) 1)))) i state; |
201 (slow_step_tac' cs 1 THEN DEPTH_SOLVE (nodup_depth_tac cs (m - 1) 1)))) i st; |
|
202 |
202 end; |
203 end; |
203 |
204 |
204 (*Designed to be idempotent, except if blast_depth_tac instantiates variables |
205 (*Designed to be idempotent, except if blast_depth_tac instantiates variables |
205 in some of the subgoals*) |
206 in some of the subgoals*) |
206 fun mk_auto_tac (cs, ss) m n = |
207 fun mk_auto_tac (cs, ss) m n = |
209 val main_tac = |
210 val main_tac = |
210 blast_depth_tac cs m (* fast but can't use wrappers *) |
211 blast_depth_tac cs m (* fast but can't use wrappers *) |
211 ORELSE' |
212 ORELSE' |
212 (CHANGED o nodup_depth_tac cs' n); (* slower but more general *) |
213 (CHANGED o nodup_depth_tac cs' n); (* slower but more general *) |
213 in |
214 in |
214 EVERY [PARALLEL_GOALS (ALLGOALS (Simplifier.asm_full_simp_tac ss)), |
215 PARALLEL_GOALS (ALLGOALS (Simplifier.asm_full_simp_tac ss)) THEN |
215 TRY (Classical.safe_tac cs), |
216 TRY (Classical.safe_tac cs) THEN |
216 REPEAT_DETERM (FIRSTGOAL main_tac), |
217 REPEAT_DETERM (FIRSTGOAL main_tac) THEN |
217 TRY (Classical.safe_tac (cs addSss ss)), |
218 TRY (Classical.safe_tac (cs addSss ss)) THEN |
218 prune_params_tac] |
219 prune_params_tac |
219 end; |
220 end; |
220 |
221 |
221 fun auto_tac css = mk_auto_tac css 4 2; |
222 fun auto_tac css = mk_auto_tac css 4 2; |
222 |
223 |
223 |
224 |
224 (* force_tac *) |
225 (* force_tac *) |
225 |
226 |
226 (* aimed to solve the given subgoal totally, using whatever tools possible *) |
227 (* aimed to solve the given subgoal totally, using whatever tools possible *) |
227 fun force_tac (cs, ss) = |
228 fun force_tac (cs, ss) = |
228 let val cs' = cs addss ss in |
229 let val cs' = cs addss ss in |
229 SELECT_GOAL (EVERY [ |
230 SELECT_GOAL |
230 Classical.clarify_tac cs' 1, |
231 (Classical.clarify_tac cs' 1 THEN |
231 IF_UNSOLVED (Simplifier.asm_full_simp_tac ss 1), |
232 IF_UNSOLVED (Simplifier.asm_full_simp_tac ss 1) THEN |
232 ALLGOALS (Classical.first_best_tac cs')]) |
233 ALLGOALS (Classical.first_best_tac cs')) |
233 end; |
234 end; |
234 |
235 |
235 |
236 |
236 (* basic combinations *) |
237 (* basic combinations *) |
237 |
238 |