let compute_pdg kf =
  if not (Db.Value.is_computed ()) then !Db.Value.compute ();

  P.feedback "computing for function %a" 
    Kernel_function.pretty_name kf;
  
  try

    if is_variadic kf then
      Extlib.not_yet_implemented "PDG for a variadic function";

    let pdg = compute_pdg_for_f kf in

    P.feedback "done for function %a"
      Kernel_function.pretty_name kf;
    
    (* Datascope.compute kf; *)
    pdg

  with
    | Err_Bot what -> 
        P.warning "%s" what ;
        degenerated false kf
          
    | PdgTypes.Pdg_Internal_Error what -> 
        P.failure "%s" what ;
        degenerated true kf

    | State.Cannot_fold -> 
        P.failure "too imprecise value analysis : abort" ;
        degenerated true kf

    | Extlib.NotYetImplemented why_nyi ->
        P.failure "%s not implemented yet" why_nyi ;
        degenerated true kf