Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -135,3 +135,7 @@ messages: [ ...@@ -135,3 +135,7 @@ messages: [
"The Frama-C/Wp native support for Coq is now deprecated (use TIP or Why-3 instead)." "The Frama-C/Wp native support for Coq is now deprecated (use TIP or Why-3 instead)."
{coq:installed} {coq:installed}
] ]
post-messages: [
"Why3 provers setup: rm -r ~/.why3.conf ; why3 config --detect"
]
...@@ -64,7 +64,6 @@ let find_opt s = ...@@ -64,7 +64,6 @@ let find_opt s =
try try
let config = Lazy.force cfg in let config = Lazy.force cfg in
let filter = Why3.Whyconf.parse_filter_prover s 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) Some ((Why3.Whyconf.filter_one_prover config filter).Why3.Whyconf.prover)
with with
| Why3.Whyconf.ProverNotFound _ | Why3.Whyconf.ProverNotFound _
...@@ -78,14 +77,18 @@ let find_fallback name = ...@@ -78,14 +77,18 @@ let find_fallback name =
match find_opt name with match find_opt name with
| Some prv -> Exact prv | Some prv -> Exact prv
| None -> | None ->
match String.split_on_char ',' name with (* Why3 should deal with this intermediate case *)
| shortname :: _ :: _ -> match find_opt (String.lowercase_ascii name) with
begin | Some prv -> Exact prv
match find_opt (String.lowercase_ascii shortname) with | None ->
| Some prv -> Fallback prv match String.split_on_char ',' name with
| None -> NotFound | shortname :: _ :: _ ->
end begin
| _ -> NotFound 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_why3 = Why3.Whyconf.prover_parseable_format
let print_wp s = let print_wp s =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment