src/HOL/Tools/Mirabelle/mirabelle_try0.ML
author paulson <lp15@cam.ac.uk>
Fri, 18 Feb 2022 21:40:01 +0000
changeset 75101 f0e2023f361a
parent 75003 f21e7e6172a0
child 76183 8089593a364a
permissions -rw-r--r--
one new lemma

(*  Title:      HOL/Mirabelle/Tools/mirabelle_try0.ML
    Author:     Jasmin Blanchette, TU Munich
    Author:     Makarius
    Author:     Martin Desharnais, UniBw Munich

Mirabelle action: "try0".
*)

structure Mirabelle_Try0: MIRABELLE_ACTION =
struct

fun make_action ({timeout, ...} : Mirabelle.action_context) =
  let
    val generous_timeout = Time.scale 10.0 timeout

    fun run ({pre, ...} : Mirabelle.command) =
      if Timeout.apply generous_timeout (Try0.try0 (SOME timeout) ([], [], [], [])) pre then
        "succeeded"
      else
        ""
  in ("", {run = run, finalize = K ""}) end

val () = Mirabelle.register_action "try0" make_action

end