src/HOL/Tools/SMT/yices_solver.ML
changeset 39811 0659e84bdc5f
parent 39809 dac3c3106746
child 40161 539d07b00e5f
equal deleted inserted replaced
39810:5c9fe600525e 39811:0659e84bdc5f
    21 
    21 
    22 fun core_oracle (output, _) =
    22 fun core_oracle (output, _) =
    23   let
    23   let
    24     val empty_line = (fn "" => true | _ => false)
    24     val empty_line = (fn "" => true | _ => false)
    25     val split_first = (fn [] => ("", []) | l :: ls => (l, ls))
    25     val split_first = (fn [] => ("", []) | l :: ls => (l, ls))
    26     val (l, _) = split_first (drop_while empty_line output)
    26     val (l, _) = split_first (snd (chop_while empty_line output))
    27   in
    27   in
    28     if String.isPrefix "unsat" l then @{cprop False}
    28     if String.isPrefix "unsat" l then @{cprop False}
    29     else if String.isPrefix "sat" l then raise_cex true
    29     else if String.isPrefix "sat" l then raise_cex true
    30     else if String.isPrefix "unknown" l then raise_cex false
    30     else if String.isPrefix "unknown" l then raise_cex false
    31     else raise SMT_Solver.SMT (solver_name ^ " failed")
    31     else raise SMT_Solver.SMT (solver_name ^ " failed")