let select_useful_things ~select_annot ~select_slice_pragma kf_entry =
let proj = new_project () in
assert (!call_in_to_check = []);
debug 1 "selecting function %a outputs and entry point@."
Kernel_function.pretty kf_entry;
let pdg = !Db.Pdg.get kf_entry in
if PdgTypes.Pdg.is_top pdg
then KfTopVisi.set proj kf_entry
else if PdgTypes.Pdg.is_bottom pdg
then debug 1 "unreachable entry point ?"
else begin
select_entry_point proj kf_entry pdg;
select_all_outputs proj kf_entry pdg;
if (select_annot || select_slice_pragma) then
select_annotations ~select_annot ~select_slice_pragma proj;
finalize proj
end;
proj