Commit f9610df7 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

Merge branch 'fix/wp/why3-prover-detection' into 'stable/titanium'

Fix Why3 prover detection

See merge request frama-c/frama-c!2926
parents 2dd72a21 e5f87adf
......@@ -135,3 +135,7 @@ messages: [
"The Frama-C/Wp native support for Coq is now deprecated (use TIP or Why-3 instead)."
{coq:installed}
]
post-messages: [
"Why3 provers setup: rm -r ~/.why3.conf ; why3 config --detect"
]
......@@ -64,7 +64,6 @@ let find_opt s =
try
let config = Lazy.force cfg in
let filter = Why3.Whyconf.parse_filter_prover s in
let filter = Why3.Whyconf.filter_prover_with_shortcut config filter in
Some ((Why3.Whyconf.filter_one_prover config filter).Why3.Whyconf.prover)
with
| Why3.Whyconf.ProverNotFound _
......@@ -78,14 +77,18 @@ let find_fallback name =
match find_opt name with
| Some prv -> Exact prv
| None ->
match String.split_on_char ',' name with
| shortname :: _ :: _ ->
begin
match find_opt (String.lowercase_ascii shortname) with
| Some prv -> Fallback prv
| None -> NotFound
end
| _ -> NotFound
(* Why3 should deal with this intermediate case *)
match find_opt (String.lowercase_ascii name) with
| Some prv -> Exact prv
| None ->
match String.split_on_char ',' name with
| shortname :: _ :: _ ->
begin
match find_opt (String.lowercase_ascii shortname) with
| Some prv -> Fallback prv
| None -> NotFound
end
| _ -> NotFound
let print_why3 = Why3.Whyconf.prover_parseable_format
let print_wp s =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment