diff options
Diffstat (limited to 'src/verit')
-rw-r--r-- | src/verit/verit.ml | 13 | ||||
-rw-r--r-- | src/verit/veritSyntax.ml | 4 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/verit/verit.ml b/src/verit/verit.ml index 17a230f..39f60c0 100644 --- a/src/verit/verit.ml +++ b/src/verit/verit.ml @@ -185,20 +185,27 @@ let call_verit _ rt ro ra' rf' first lsmt = let win = open_in wname in - let raise_warnings () = + let raise_warnings_errors () = try while true do let l = input_line win in + let n = String.length l in if l = "warning : proof_done: status is still open" then raise Unknown + else if l = "Invalid memory reference" then + Structures.warning "verit-warning" ("veriT outputted the warning: " ^ l) + else if n >= 7 && String.sub l 0 7 = "warning" then + Structures.warning "verit-warning" ("veriT outputted the warning: " ^ (String.sub l 7 (n-7))) + else if n >= 8 && String.sub l 0 8 = "error : " then + Structures.error ("veriT failed with the error: " ^ (String.sub l 8 (n-8))) else - Structures.warning "verit-warning" ("Verit.call_verit: command " ^ command ^ " outputs the warning: " ^ l); + Structures.error ("veriT failed with the error: " ^ l) done with End_of_file -> () in try if exit_code <> 0 then Structures.warning "verit-non-zero-exit-code" ("Verit.call_verit: command " ^ command ^ " exited with code " ^ string_of_int exit_code); - raise_warnings (); + raise_warnings_errors (); let res = import_trace ra' rf' logfilename (Some first) lsmt in close_in win; Sys.remove wname; res with x -> close_in win; Sys.remove wname; diff --git a/src/verit/veritSyntax.ml b/src/verit/veritSyntax.ml index b1a6304..862a628 100644 --- a/src/verit/veritSyntax.ml +++ b/src/verit/veritSyntax.ml @@ -150,7 +150,7 @@ let mkCongrPred p = (* Linear arithmetic *) let mkMicromega cl = - let _tbl, _f, cert = Lia.build_lia_certif cl in + let cert = Lia.build_lia_certif cl in let c = match cert with | None -> failwith "VeritSyntax.mkMicromega: micromega can't solve this" @@ -168,7 +168,7 @@ let mkSplArith orig cl = match orig.value with | Some [orig'] -> orig' | _ -> failwith "VeritSyntax.mkSplArith: wrong number of literals in the premise clause" in - let _tbl, _f, cert = Lia.build_lia_certif [Form.neg orig';res] in + let cert = Lia.build_lia_certif [Form.neg orig';res] in let c = match cert with | None -> failwith "VeritSyntax.mkSplArith: micromega can't solve this" |