let exists_fun_callers fpred kf =
  let table = ref Cil_datatype.Varinfo.Set.empty in
  let rec exists_fun_callers kf =
    if fpred kf
    then true
    else let vf = Kernel_function.get_vi kf in
      if Cil_datatype.Varinfo.Set.mem vf !table
      then false (* no way to call the initial [kf]. *)
      else begin
        table := Cil_datatype.Varinfo.Set.add vf !table ;
        List.exists
          (fun (kf,_) -> exists_fun_callers kf)
          (!Db.Value.callers kf)
      end
  in
  exists_fun_callers kf