231 let |
231 let |
232 val ((cand as Prove (_, _, _, _, _, (lfs, _), _, _)) :: steps') = drop i steps |
232 val ((cand as Prove (_, _, _, _, _, (lfs, _), _, _)) :: steps') = drop i steps |
233 |
233 |
234 val succs = collect_successors steps' labels |
234 val succs = collect_successors steps' labels |
235 |
235 |
236 (* only touch steps that can be preplayed successfully *) |
236 (* only touch steps that can be preplayed successfully; FIXME: more generous *) |
237 val Played time = forced_intermediate_preplay_outcome_of_isar_step (!preplay_data) l |
237 val Played time = forced_intermediate_preplay_outcome_of_isar_step (!preplay_data) l |
238 |
238 |
239 val succs' = map (try_merge (!preplay_data) cand #> the) succs |
239 val succs' = map (try_merge (!preplay_data) cand #> the) succs |
240 |
240 |
241 (* FIXME: more generous! *) |
241 (* FIXME: more generous *) |
242 val times0 = map ((fn Played time => time) o |
242 val times0 = map ((fn Played time => time) o |
243 forced_intermediate_preplay_outcome_of_isar_step (!preplay_data)) labels |
243 forced_intermediate_preplay_outcome_of_isar_step (!preplay_data)) labels |
244 val time_slice = time_mult (1.0 / (Real.fromInt (length labels))) time |
244 val time_slice = time_mult (1.0 / (Real.fromInt (length labels))) time |
245 val timeouts = map (curry Time.+ time_slice #> slackify_merge_timeout) times0 |
245 val timeouts = map (curry Time.+ time_slice #> slackify_merge_timeout) times0 |
|
246 (* FIXME: "preplay_timeout" should be an ultimate maximum *) |
246 |
247 |
247 val meths_outcomess = map2 (preplay_isar_step ctxt) timeouts succs' |
248 val meths_outcomess = map2 (preplay_isar_step ctxt) timeouts succs' |
248 |
249 |
249 (* ensure none of the modified successors timed out *) |
250 (* ensure none of the modified successors timed out *) |
250 val times = map (fn (_, Played time) :: _ => time) meths_outcomess |
251 val times = map (fn (_, Played time) :: _ => time) meths_outcomess |