src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML
changeset 55263 4d63fffcde8d
parent 55260 ada3ae6458d4
child 55264 43473497fb65
equal deleted inserted replaced
55262:16724746ad89 55263:4d63fffcde8d
   287           |> enrich_context_with_local_facts canonical_isar_proof
   287           |> enrich_context_with_local_facts canonical_isar_proof
   288           |> silence_reconstructors debug
   288           |> silence_reconstructors debug
   289 
   289 
   290         val preplay_data = Unsynchronized.ref Canonical_Label_Tab.empty
   290         val preplay_data = Unsynchronized.ref Canonical_Label_Tab.empty
   291 
   291 
   292         fun reset_preplay_outcomes (step as Prove (_, _, l, _, _, (_, meths))) =
   292         fun init_preplay_outcomes (step as Prove (_, _, l, _, _, (_, meths))) =
   293             set_preplay_outcomes_of_isar_step preplay_data l (map (fn meth => (meth,
   293             set_preplay_outcomes_of_isar_step preplay_data l (map (fn meth => (meth,
   294                 Lazy.lazy (fn () => preplay_isar_step preplay_ctxt preplay_timeout meth step)))
   294                 Lazy.lazy (fn () => preplay_isar_step preplay_ctxt preplay_timeout meth step)))
   295               meths)
   295               meths)
   296           | reset_preplay_outcomes _ = ()
   296           | init_preplay_outcomes _ = ()
   297 
   297 
   298         val _ = fold_isar_steps (K o reset_preplay_outcomes)
   298         val _ = fold_isar_steps (K o init_preplay_outcomes)
   299           (steps_of_isar_proof canonical_isar_proof) ()
   299           (steps_of_isar_proof canonical_isar_proof) ()
   300 
   300 
   301         fun str_of_preplay_outcome outcome =
   301         fun str_of_preplay_outcome outcome =
   302           if Lazy.is_finished outcome then string_of_play_outcome (Lazy.force outcome) else "?"
   302           if Lazy.is_finished outcome then string_of_play_outcome (Lazy.force outcome) else "?"
   303 
   303