let cfg ?(with_bot=false) goals cfg annots =
let kf = Cil2cfg.cfg_kf cfg in
let g = Cil2cfg.cfg_graph cfg in
let wenv = W.new_env () in
let he = HE.create 97 in
let env = (kf, g, annots, he, wenv) in
use_bottom := with_bot;
CFG.iter_edges_e (fun e -> ignore (compute_edge env e)) g;
let annot_cfg = build_cfg_annots g he in
let basename = (W.model_name)^"_"^(Kernel_function.get_name kf) in
let bhv =
match annots.WpAnnot.behavior_name with
| None -> Macros.name_of_default_behavior
| Some bhv -> bhv
in
let basename = basename^"_"^bhv in
let obligs = get_result cfg env basename goals in
obligs, annot_cfg