src/HOL/Tools/Mirabelle/mirabelle_try0.ML
author wenzelm
Wed, 22 Jan 2025 22:22:19 +0100
changeset 81954 6f2bcdfa9a19
parent 81363 fec95447c5bd
child 82364 5af097d05e99
permissions -rw-r--r--
misc tuning: more concise operations on prems (without change of exceptions); discontinue odd clone Drule.cprems_of (see also 991a3feaf270);

(*  Title:      HOL/Tools/Mirabelle/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 (not o null o Try0.try0 (SOME timeout) []) pre then
        "succeeded"
      else
        ""
  in ("", {run = run, finalize = K ""}) end

val () = Mirabelle.register_action "try0" make_action

end