renamed mirabelle Tools directory to Actions, to make consistent with 'usage' description;
1 (* Title: HOL/Mirabelle/Actions/mirabelle_refute.ML
2 Author: Jasmin Blanchette and Sascha Boehme, TU Munich
5 structure Mirabelle_Refute : MIRABELLE_ACTION =
10 fun refute_action args timeout {pre=st, ...} =
13 val thy = Proof.theory_of st
14 val thm = #goal (Proof.raw_goal st)
16 val refute = Refute.refute_goal thy args thm
17 val _ = TimeLimit.timeLimit timeout refute subgoal
19 val writ_log = Substring.full (the (Symtab.lookup tab "writeln"))
20 val warn_log = Substring.full (the (Symtab.lookup tab "warning"))
23 if Substring.isSubstring "model found" writ_log
25 if Substring.isSubstring "spurious" warn_log
26 then SOME "potential counterexample"
27 else SOME "real counterexample (bug?)"
29 if Substring.isSubstring "time limit" writ_log
30 then SOME "no counterexample (timeout)"
31 else if Substring.isSubstring "Search terminated" writ_log
32 then SOME "no counterexample (normal termination)"
33 else SOME "no counterexample (unknown)"
37 fun invoke args = I (*Mirabelle.register ("refute", refute_action args)*)