let select_annotations ~select_annot ~select_slice_pragma proj =
let visit_fun kf =
try
debug 1 "look for annotations in function %s@."
(Kernel_function.get_name kf);
let filter annot = match annot.Cil_types.annot_content with
| Cil_types.APragma (Cil_types.Slice_pragma _) -> select_slice_pragma
| _ -> select_annot in
let f = Kernel_function.get_definition kf in
let pdg = !Db.Pdg.get kf in
let visit = new annot_visitor ~filter pdg in
ignore (Visitor.visitFramacFunction (visit:>Visitor.frama_c_visitor) f);
let to_select = visit#get_select in
select_pdg_elements proj pdg to_select
with Kernel_function.No_Definition ->
()
in
Globals.Functions.iter visit_fun