let run_and_prove (main_ui:Design.main_window_extension_points) localizable =
try
let kf_opt, bhv, annot_id = get_annot_opt localizable in
let annot_id = match annot_id with
| Some (Property.IPBehavior _) -> None
| _ -> annot_id
in
let fstr = match kf_opt with None -> "all functions"
| Some kf -> ("function '"^( Kernel_function.get_name kf)^"'")
in
let pstr = match annot_id with None -> "all properties"
| Some id -> (WpAnnot.id_prop_txt id)
in
let bstr = match bhv with None -> "all behaviors"
| Some b -> Pretty_utils.sfprintf "%a behavior%s"
(Pretty_utils.pp_list ~sep:"_" Format.pp_print_string) b
(if List.length b > 1 then "s" else "")
in
let mstr = Wp_parameters.Model.get () in
Wp_parameters.log "compututing WP on %s, for %s, in %s with model %s"
fstr pstr bstr mstr;
Register.wp_compute kf_opt bhv annot_id;
main_ui#rehighlight ()
with Stop -> ()