src/HOL/Tools/Mirabelle/mirabelle_arith.ML
author desharna
Sat, 22 Jan 2022 11:46:25 +0100
changeset 75003 f21e7e6172a0
parent 74948 15ce207f69c8
child 76183 8089593a364a
permissions -rw-r--r--
renamed run_action to run in Mirabelle.action record

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

Mirabelle action: "arith".
*)

structure Mirabelle_Arith: MIRABELLE_ACTION =
struct

fun make_action ({timeout, ...} : Mirabelle.action_context) =
  let
    fun run ({pre, ...} : Mirabelle.command) =
      (case Timing.timing (Mirabelle.can_apply timeout Arith_Data.arith_tac) pre of
        ({cpu, ...}, true) => "succeeded (" ^ Time.toString cpu ^ " s)"
      | (_, false) => "failed")
  in ("", {run = run, finalize = K ""}) end

val () = Mirabelle.register_action "arith" make_action

end