let get_init_funcs cg =
  let entry_point_name = Parameters.MainFunction.get () in
  let init_funcs = (* entry point is always a root *)
    Cilutil.StringSet.add entry_point_name (InitFunc.get ()) 
  in
  (* Add the callees of entry point as roots *)
  Cilutil.StringSet.union 
    (try 
       let callees = 
         (Hashtbl.find cg entry_point_name).Callgraph.cnCallees
       in
       Inthash.fold (fun _ v acc -> match v.Callgraph.cnInfo with
                     | Callgraph.NIVar ({vname=n},_) -> 
                         Cilutil.StringSet.add n acc
                     | _ -> acc)
         callees Cilutil.StringSet.empty
     with Not_found -> Cilutil.StringSet.empty)
    init_funcs