src/HOL/Mirabelle/Tools/mirabelle_refute.ML
changeset 32496 4ab00a2642c3
parent 32467 1ad7d4fc0954
child 32518 e3c4e337196c
equal deleted inserted replaced
32495:6decc1ffdbed 32496:4ab00a2642c3
       
     1 (* Title:  mirabelle_refute.ML
       
     2    Author: Jasmin Blanchette and Sascha Boehme
       
     3 *)
       
     4 
       
     5 structure Mirabelle_Refute : MIRABELLE_ACTION =
       
     6 struct
       
     7 
       
     8 
       
     9 (* FIXME:
       
    10 fun refute_action args timeout {pre=st, ...} = 
       
    11   let
       
    12     val subgoal = 0
       
    13     val thy     = Proof.theory_of st
       
    14     val thm = goal_thm_of st
       
    15 
       
    16     val refute = Refute.refute_subgoal thy args thm
       
    17     val _ = TimeLimit.timeLimit timeout refute subgoal
       
    18   in
       
    19     val writ_log = Substring.full (the (Symtab.lookup tab "writeln"))
       
    20     val warn_log = Substring.full (the (Symtab.lookup tab "warning"))
       
    21 
       
    22     val r =
       
    23       if Substring.isSubstring "model found" writ_log
       
    24       then
       
    25         if Substring.isSubstring "spurious" warn_log
       
    26         then SOME "potential counterexample"
       
    27         else SOME "real counterexample (bug?)"
       
    28       else
       
    29         if Substring.isSubstring "time limit" writ_log
       
    30         then SOME "no counterexample (time out)"
       
    31         else if Substring.isSubstring "Search terminated" writ_log
       
    32         then SOME "no counterexample (normal termination)"
       
    33         else SOME "no counterexample (unknown)"
       
    34   in r end
       
    35 *)
       
    36 
       
    37 fun invoke args = I (*Mirabelle.register ("refute", refute_action args)*)
       
    38 
       
    39 end